(()=>{var e={6734:function(e,t,r){"use strict";// EXPORTS
r.d(t,{A:()=>/* binding */eR});// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
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 o(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 a=/*#__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(o(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}();// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
/**
 * @param {number}
 * @return {number}
 */var s=Math.abs;/**
 * @param {number}
 * @return {string}
 */var l=String.fromCharCode;/**
 * @param {object}
 * @return {object}
 */var c=Object.assign;/**
 * @param {string} value
 * @param {number} length
 * @return {number}
 */function u(e,t){return v(e,0)^45?(((t<<2^v(e,0))<<2^v(e,1))<<2^v(e,2))<<2^v(e,3):0}/**
 * @param {string} value
 * @return {string}
 */function d(e){return e.trim()}/**
 * @param {string} value
 * @param {RegExp} pattern
 * @return {string?}
 */function f(e,t){return(e=t.exec(e))?e[0]:e}/**
 * @param {string} value
 * @param {(string|RegExp)} pattern
 * @param {string} replacement
 * @return {string}
 */function p(e,t,r){return e.replace(t,r)}/**
 * @param {string} value
 * @param {string} search
 * @return {number}
 */function h(e,t){return e.indexOf(t)}/**
 * @param {string} value
 * @param {number} index
 * @return {number}
 */function v(e,t){return e.charCodeAt(t)|0}/**
 * @param {string} value
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function m(e,t,r){return e.slice(t,r)}/**
 * @param {string} value
 * @return {number}
 */function g(e){return e.length}/**
 * @param {any[]} value
 * @return {number}
 */function b(e){return e.length}/**
 * @param {any} value
 * @param {any[]} array
 * @return {any}
 */function _(e,t){return t.push(e),e}/**
 * @param {string[]} array
 * @param {function} callback
 * @return {string}
 */function y(e,t){return e.map(t).join("")};// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js
var x=1;var w=1;var A=0;var E=0;var I=0;var k="";/**
 * @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 S(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:x,column:w,length:a,return:""}}/**
 * @param {object} root
 * @param {object} props
 * @return {object}
 */function O(e,t){return c(S("",null,null,"",null,null,0),e,{length:-e.length},t)}/**
 * @return {number}
 */function T(){return I}/**
 * @return {number}
 */function C(){I=E>0?v(k,--E):0;if(w--,I===10)w=1,x--;return I}/**
 * @return {number}
 */function R(){I=E<A?v(k,E++):0;if(w++,I===10)w=1,x++;return I}/**
 * @return {number}
 */function D(){return v(k,E)}/**
 * @return {number}
 */function F(){return E}/**
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function Y(e,t){return m(k,e,t)}/**
 * @param {number} type
 * @return {number}
 */function M(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 j(e){return x=w=1,A=g(k=e),E=0,[]}/**
 * @param {any} value
 * @return {any}
 */function P(e){return k="",e}/**
 * @param {number} type
 * @return {string}
 */function L(e){return d(Y(E-1,K(e===91?e+2:e===40?e+1:e)))}/**
 * @param {string} value
 * @return {string[]}
 */function N(e){return P(V(j(e)))}/**
 * @param {number} type
 * @return {string}
 */function H(e){while(I=D())if(I<33)R();else break;return M(e)>2||M(I)>3?"":" "}/**
 * @param {string[]} children
 * @return {string[]}
 */function V(e){while(R())switch(M(I)){case 0:append(z(E-1),e);break;case 2:append(L(I),e);break;default:append(from(I),e)}return e}/**
 * @param {number} index
 * @param {number} count
 * @return {string}
 */function U(e,t){while(--t&&R())// not 0-9 A-F a-f
if(I<48||I>102||I>57&&I<65||I>70&&I<97)break;return Y(e,F()+(t<6&&D()==32&&R()==32))}/**
 * @param {number} type
 * @return {number}
 */function K(e){while(R())switch(I){// ] ) " '
case e:return E;// " '
case 34:case 39:if(e!==34&&e!==39)K(I);break;// (
case 40:if(e===41)K(e);break;// \
case 92:R();break}return E}/**
 * @param {number} type
 * @param {number} index
 * @return {number}
 */function B(e,t){while(R())// //
if(e+I===47+10)break;else if(e+I===42+42&&D()===47)break;return"/*"+Y(t,E-1)+"*"+l(e===47?e:R())}/**
 * @param {number} index
 * @return {string}
 */function z(e){while(!M(D()))R();return Y(e,E)};// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
var q="-ms-";var W="-moz-";var G="-webkit-";var $="comm";var Q="rule";var X="decl";var J="@page";var Z="@media";var ee="@import";var et="@charset";var er="@viewport";var en="@supports";var ei="@document";var eo="@namespace";var ea="@keyframes";var es="@font-face";var el="@counter-style";var ec="@font-feature-values";var eu="@layer";// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function ed(e,t){var r="";var n=b(e);for(var i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function ef(e,t,r,n){switch(e.type){case eu:if(e.children.length)break;case ee:case X:return e.return=e.return||e.value;case $:return"";case ea:return e.return=e.value+"{"+ed(e.children,n)+"}";case Q:e.value=e.props.join(",")}return g(r=ed(e.children,n))?e.return=e.value+"{"+r+"}":""};// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js
/**
 * @param {function[]} collection
 * @return {function}
 */function ep(e){var t=b(e);return function(r,n,i,o){var a="";for(var s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}/**
 * @param {function} callback
 * @return {function}
 */function eh(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 ev(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 em(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}}})})}};// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
/**
 * @param {string} value
 * @return {object[]}
 */function eg(e){return P(eb("",null,null,null,[""],e=j(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 eb(e,t,r,n,i,o,a,s,c){var u=0;var d=0;var f=a;var m=0;var b=0;var y=0;var x=1;var w=1;var A=1;var E=0;var I="";var k=i;var S=o;var O=n;var T=I;while(w)switch(y=E,E=R()){// (
case 40:if(y!=108&&v(T,f-1)==58){if(h(T+=p(L(E),"&","&\f"),"&\f")!=-1)A=-1;break}// " ' [
case 34:case 39:case 91:T+=L(E);break;// \t \n \r \s
case 9:case 10:case 13:case 32:T+=H(y);break;// \
case 92:T+=U(F()-1,7);continue;// /
case 47:switch(D()){case 42:case 47:_(ey(B(R(),F()),t,r),c);break;default:T+="/"}break;// {
case 123*x:s[u++]=g(T)*A;// } ; \0
case 125*x:case 59:case 0:switch(E){// \0 }
case 0:case 125:w=0;// ;
case 59+d:if(A==-1)T=p(T,/\f/g,"");if(b>0&&g(T)-f)_(b>32?ex(T+";",n,r,f-1):ex(p(T," ","")+";",n,r,f-2),c);break;// @ ;
case 59:T+=";";// { rule/at-rule
default:_(O=e_(T,t,r,u,d,i,s,I,k=[],S=[],f),o);if(E===123)if(d===0)eb(T,t,O,O,k,o,f,s,S);else switch(m===99&&v(T,3)===110?100:m){// d l m s
case 100:case 108:case 109:case 115:eb(e,O,O,n&&_(e_(e,O,O,0,0,i,s,I,i,k=[],f),S),i,S,f,s,n?k:S);break;default:eb(T,O,O,O,[""],S,0,s,S)}}u=d=b=0,x=A=1,I=T="",f=a;break;// :
case 58:f=1+g(T),b=y;default:if(x<1){if(E==123)--x;else if(E==125&&x++==0&&C()==125)continue}switch(T+=l(E),E*x){// &
case 38:A=d>0?1:(T+="\f",-1);break;// ,
case 44:s[u++]=(g(T)-1)*A,A=1;break;// @
case 64:// -
if(D()===45)T+=L(R());m=D(),d=f=g(I=T+=z(F())),E++;break;// -
case 45:if(y===45&&g(T)==2)x=0}}return o}/**
 * @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 e_(e,t,r,n,i,o,a,l,c,u,f){var h=i-1;var v=i===0?o:[""];var g=b(v);for(var _=0,y=0,x=0;_<n;++_)for(var w=0,A=m(e,h+1,h=s(y=a[_])),E=e;w<g;++w)if(E=d(y>0?v[w]+" "+A:p(A,/&\f/g,v[w])))c[x++]=E;return S(e,t,r,i===0?Q:l,c,u,f)}/**
 * @param {number} value
 * @param {object} root
 * @param {object?} parent
 * @return {object}
 */function ey(e,t,r){return S(e,t,r,$,l(T()),m(e,2,-2),0)}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} length
 * @return {object}
 */function ex(e,t,r,n){return S(e,t,r,X,m(e,0,n),m(e,n+1,-1),n)};// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var ew=function e(e,t,r){var n=0;var i=0;while(true){n=i;i=D();// &\f
if(n===38&&i===12){t[r]=1}if(M(i)){break}R()}return Y(e,E)};var eA=function e(e,t){// pretend we've started with a comma
var r=-1;var n=44;do{switch(M(n)){case 0:// &\f
if(n===38&&D()===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]+=ew(E-1,t,r);break;case 2:e[r]+=L(n);break;case 4:// comma
if(n===44){// colon
e[++r]=D()===58?"&\f":"";t[r]=e[r].length;break}// fallthrough
default:e[r]+=l(n)}}while(n=R())return e};var eE=function e(e,t){return P(eA(j(e),t))};// WeakSet would be more appropriate, but only WeakMap is supported in IE11
var eI=/* #__PURE__ */new WeakMap;var ek=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&&!eI.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}eI.set(e,true);var i=[];var o=eE(t,i);var a=r.props;for(var s=0,l=0;s<o.length;s++){for(var c=0;c<a.length;c++,l++){e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}};var eS=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 eO(e,t){switch(u(e,t)){// color-adjust
case 5103:return G+"print-"+e+e;// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return G+e+e;// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:case 4246:case 4810:case 6968:case 2756:return G+e+W+e+q+e+e;// flex, flex-direction
case 6828:case 4268:return G+e+q+e+e;// order
case 6165:return G+e+q+"flex-"+e+e;// align-items
case 5187:return G+e+p(e,/(\w+).+(:[^]+)/,G+"box-$1$2"+q+"flex-$1$2")+e;// align-self
case 5443:return G+e+q+"flex-item-"+p(e,/flex-|-self/,"")+e;// align-content
case 4675:return G+e+q+"flex-line-pack"+p(e,/align-content|flex-|-self/,"")+e;// flex-shrink
case 5548:return G+e+q+p(e,"shrink","negative")+e;// flex-basis
case 5292:return G+e+q+p(e,"basis","preferred-size")+e;// flex-grow
case 6060:return G+"box-"+p(e,"-grow","")+G+e+q+p(e,"grow","positive")+e;// transition
case 4554:return G+p(e,/([^-])(transform)/g,"$1"+G+"$2")+e;// cursor
case 6187:return p(p(p(e,/(zoom-|grab)/,G+"$1"),/(image-set)/,G+"$1"),e,"")+e;// background, background-image
case 5495:case 3959:return p(e,/(image-set\([^]*)/,G+"$1"+"$`$1");// justify-content
case 4968:return p(p(e,/(.+:)(flex-)?(.*)/,G+"box-pack:$3"+q+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+G+e+e;// (margin|padding)-inline-(start|end)
case 4095:case 3583:case 4068:case 2532:return p(e,/(.+)-inline(.+)/,G+"$1$2")+e;// (min|max)?(width|height|inline-size|block-size)
case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:// stretch, max-content, min-content, fill-available
if(g(e)-1-t>6)switch(v(e,t+1)){// (m)ax-content, (m)in-content
case 109:// -
if(v(e,t+4)!==45)break;// (f)ill-available, (f)it-content
case 102:return p(e,/(.+:)(.+)-([^]+)/,"$1"+G+"$2-$3"+"$1"+W+(v(e,t+3)==108?"$3":"$2-$3"))+e;// (s)tretch
case 115:return~h(e,"stretch")?eO(p(e,"stretch","fill-available"),t)+e:e}break;// position: sticky
case 4949:// (s)ticky?
if(v(e,t+1)!==115)break;// display: (flex|inline-flex)
case 6444:switch(v(e,g(e)-3-(~h(e,"!important")&&10))){// stic(k)y
case 107:return p(e,":",":"+G)+e;// (inline-)?fl(e)x
case 101:return p(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+G+(v(e,14)===45?"inline-":"")+"box$3"+"$1"+G+"$2$3"+"$1"+q+"$2box$3")+e}break;// writing-mode
case 5936:switch(v(e,t+11)){// vertical-l(r)
case 114:return G+e+q+p(e,/[svh]\w+-[tblr]{2}/,"tb")+e;// vertical-r(l)
case 108:return G+e+q+p(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;// horizontal(-)tb
case 45:return G+e+q+p(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return G+e+q+e+e}return e}var eT=function e(e,t,r,n){if(e.length>-1){if(!e["return"])switch(e.type){case X:e["return"]=eO(e.value,e.length);break;case ea:return ed([O(e,{value:p(e.value,"@","@"+G)})],n);case Q:if(e.length)return y(e.props,function(t){switch(f(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return ed([O(e,{props:[p(t,/:(read-\w+)/,":"+W+"$1")]})],n);// :placeholder
case"::placeholder":return ed([O(e,{props:[p(t,/:(plac\w+)/,":"+G+"input-$1")]}),O(e,{props:[p(t,/:(plac\w+)/,":"+W+"$1")]}),O(e,{props:[p(t,/:(plac\w+)/,q+"input-$1")]})],n)}return""})}}};var eC=[eT];var eR=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 n=e.stylisPlugins||eC;var i={};var o;var s=[];{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++){i[t[r]]=true}s.push(e)})}var l;var c=[ek,eS];{var u;var d=[ef,eh(function(e){u.insert(e)})];var f=ep(c.concat(n,d));var p=function e(e){return ed(eg(e),f)};l=function e(e,t,r,n){u=r;p(e?e+"{"+t.styles+"}":t.styles);if(n){h.inserted[t.name]=true}}}var h={key:t,sheet:new a({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:l};h.sheet.hydrate(s);return h}},2517:function(e,t,r){"use strict";r.d(t,{C:()=>f,E:()=>k,T:()=>v,c:()=>A,h:()=>x,i:()=>u,w:()=>h});/* import */var n=r(1594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var o=r(6734);/* import */var a=r(3595);/* import */var s=r(5631);/* import */var l=r(5035);var c=false;var u=typeof document!=="undefined";var d=/* #__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,o/* ["default"] */.A)({key:"css"}):null);var f=d.Provider;var p=function e(){return useContext(d)};var h=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)(d);return e(t,i,r)})};if(!u){h=function e(e){return function(t){var r=(0,n.useContext)(d);if(r===null){// yes, we're potentially creating this on every render
// it doesn't actually matter though since it's only on the server
// so there will only every be a single render
// that could change in the future because of suspense and etc. but for now,
// this works and i don't want to optimise for a future thing that we aren't sure about
r=(0,o/* ["default"] */.A)({key:"css"});return /*#__PURE__*/n.createElement(d.Provider,{value:r},e(t,r))}else{return e(t,r)}}}}var v=/* #__PURE__ */n.createContext({});var m=function e(){return React.useContext(v)};var g=function e(e,t){if(typeof t==="function"){var r=t(e);return r}return _extends({},e,t)};var b=/* #__PURE__ *//* unused pure expression or super */null&&weakMemoize(function(e){return weakMemoize(function(t){return g(e,t)})});var _=function e(e){var t=React.useContext(v);if(e.theme!==t){t=b(t)(e.theme)}return /*#__PURE__*/React.createElement(v.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(v);return /*#__PURE__*/React.createElement(e,_extends({theme:n,ref:r},t))});r.displayName="WithTheme("+t+")";return hoistNonReactStatics(r,e)}var x={}.hasOwnProperty;var w="__EMOTION_TYPE_PLEASE_DO_NOT_USE__";var A=function e(e,t){var r={};for(var n in t){if(x.call(t,n)){r[n]=t[n]}}r[w]=e;// Runtime labeling is an opt-in feature because:
return r};var E=function e(e){var t=e.cache,r=e.serialized,i=e.isStringTag;(0,a/* .registerStyles */.SF)(t,r,i);var o=(0,l/* .useInsertionEffectAlwaysWithSyncFallback */.s)(function(){return(0,a/* .insertStyles */.sk)(t,r,i)});if(!u&&o!==undefined){var s;var c=r.name;var d=r.next;while(d!==undefined){c+=" "+d.name;d=d.next}return /*#__PURE__*/n.createElement("style",(s={},s["data-emotion"]=t.key+" "+c,s.dangerouslySetInnerHTML={__html:o},s.nonce=t.sheet.nonce,s))}return null};var I=/* #__PURE__ */h(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 o=e[w];var l=[i];var u="";if(typeof e.className==="string"){u=(0,a/* .getRegisteredStyles */.Rk)(t.registered,l,e.className)}else if(e.className!=null){u=e.className+" "}var d=(0,s/* .serializeStyles */.J)(l,undefined,n.useContext(v));u+=t.key+"-"+d.name;var f={};for(var p in e){if(x.call(e,p)&&p!=="css"&&p!==w&&!c){f[p]=e[p]}}f.className=u;if(r){f.ref=r}return /*#__PURE__*/n.createElement(n.Fragment,null,/*#__PURE__*/n.createElement(E,{cache:t,serialized:d,isStringTag:typeof o==="string"}),/*#__PURE__*/n.createElement(o,f))});var k=I},5757:function(e,t,r){"use strict";r.d(t,{AH:()=>h,i7:()=>v,mL:()=>p});/* import */var n=r(2517);/* import */var i=r(1594);/* import */var o=/*#__PURE__*/r.n(i);/* import */var a=r(3595);/* import */var s=r(5035);/* import */var l=r(5631);/* import */var c=r(6734);/* import */var u=r(1035);/* import */var d=/*#__PURE__*/r.n(u);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 o=r.length;var a=new Array(o);a[0]=n.E;a[1]=(0,n.c)(e,t);for(var s=2;s<o;s++){a[s]=r[s]}return i.createElement.apply(null,a)};(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 o=(0,l/* .serializeStyles */.J)([r],undefined,i.useContext(n.T));if(!n.i){var c;var u=o.name;var d=o.styles;var f=o.next;while(f!==undefined){u+=" "+f.name;d+=f.styles;f=f.next}var p=t.compat===true;var h=t.insert("",{name:u,styles:d},t.sheet,p);if(p){return null}return /*#__PURE__*/i.createElement("style",(c={},c["data-emotion"]=t.key+"-global "+u,c.dangerouslySetInnerHTML={__html:h},c.nonce=t.sheet.nonce,c))}// yes, i know these hooks are used conditionally
// 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 v=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+" "+o.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])}v.current=[r,n];return function(){r.flush()}},[t]);(0,s/* .useInsertionEffectWithLayoutFallback */.i)(function(){var e=v.current;var r=e[0],n=e[1];if(n){e[1]=false;return}if(o.next!==undefined){// insert keyframes
(0,a/* .insertStyles */.sk)(t,o.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("",o,r,false)},[t,o.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,l/* .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 o=t[n];if(o==null)continue;var a=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o)){a=e(o)}else{a="";for(var s in o){if(o[s]&&s){a&&(a+=" ");a+=s}}}break}default:{a=o}}if(a){i&&(i+=" ");i+=a}}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;var n=useInsertionEffectAlwaysWithSyncFallback(function(){var e="";for(var n=0;n<r.length;n++){var i=insertStyles(t,r[n],false);if(!isBrowser&&i!==undefined){e+=i}}if(!isBrowser){return e}});if(!isBrowser&&n.length!==0){var i;return /*#__PURE__*/React.createElement("style",(i={},i["data-emotion"]=t.key+" "+r.map(function(e){return e.name}).join(" "),i.dangerouslySetInnerHTML={__html:n},i.nonce=t.sheet.nonce,i))}return null};var _=/* #__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),o=0;o<e;o++){i[o]=arguments[o]}var a=serializeStyles(i,t.registered);n.push(a);// registration has to happen here as the result of this might get consumed by `cx`
registerStyles(t,a,false);return t.key+"-"+a.name};var o=function e(){if(r&&isDevelopment){throw new Error("cx can only be used during render")}for(var e=arguments.length,n=new Array(e),o=0;o<e;o++){n[o]=arguments[o]}return g(t.registered,i,m(n))};var a={css:i,cx:o,theme:React.useContext(ThemeContext)};var s=e.children(a);r=true;return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(b,{cache:t,serializedArr:n}),s)})},2025:function(e,t,r){"use strict";r.d(t,{FD:()=>p,FK:()=>d,Y:()=>f});/* import */var n=r(6070);/* import */var i=r(2517);/* import */var o=r(1594);/* import */var a=/*#__PURE__*/r.n(o);/* import */var s=r(6734);/* import */var l=r(1035);/* import */var c=/*#__PURE__*/r.n(l);/* import */var u=r(5035);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)}},5631:function(e,t,r){"use strict";// EXPORTS
r.d(t,{J:()=>/* binding */b});// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js
/* 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)};// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
var i={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};// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
function o(e){var t=Object.create(null);return function(r){if(t[r]===undefined)t[r]=e(r);return t[r]}};// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
var a=false;var s=/[A-Z]|^ms/g;var l=/_EMO_([^_]+?)_([^]*?)_EMO_/g;var c=function e(e){return e.charCodeAt(1)===45};var u=function e(e){return e!=null&&typeof e!=="boolean"};var d=/* #__PURE__ */o(function(e){return c(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(l,function(e,t,r){g={name:t,styles:r,next:g};return t})}}}if(i[e]!==1&&!c(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 o=r;if(o.styles!==undefined){var a=o.next;if(a!==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(a!==undefined){g={name:a.name,styles:a.styles,next:g};a=a.next}}var s=o.styles+";";return s}return v(e,t,r)}case"function":{if(e!==undefined){var l=g;var c=r(e);g=l;return h(e,t,c)}break}}// finalize string values (regular strings and functions interpolated into css calls)
var u=r;if(t==null){return u}var d=t[u];return d!==undefined?d:u}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 o in r){var s=r[o];if(typeof s!=="object"){var l=s;if(t!=null&&t[l]!==undefined){n+=o+"{"+t[l]+"}"}else if(u(l)){n+=d(o)+":"+f(o,l)+";"}}else{if(o==="NO_COMPONENT_SELECTOR"&&a){throw new Error(p)}if(Array.isArray(s)&&typeof s[0]==="string"&&(t==null||t[s[0]]===undefined)){for(var c=0;c<s.length;c++){if(u(s[c])){n+=d(o)+":"+f(o,s[c])+";"}}}else{var v=h(e,t,s);switch(o){case"animation":case"animationName":{n+=d(o)+":"+v+";";break}default:{n+=o+"{"+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 o="";g=undefined;var a=e[0];if(a==null||a.raw===undefined){i=false;o+=h(r,t,a)}else{var s=a;o+=s[0]}// we start at 1 since we've already handled the first arg
for(var l=1;l<e.length;l++){o+=h(r,t,e[l]);if(i){var c=a;o+=c[l]}}// using a global regex with .exec is stateful so lastIndex has to be reset each time
m.lastIndex=0;var u="";var d;// https://esbench.com/bench/5b809c2cf2949800a0f61fb5
while((d=m.exec(o))!==null){u+="-"+d[1]}var f=n(o)+u;return{name:f,styles:o,next:g}}},5035:function(e,t,r){"use strict";r.d(t,{i:()=>l,s:()=>s});/* import */var n=r(1594);/* import */var i=/*#__PURE__*/r.n(n);var o=function e(e){return e()};var a=n["useInsertion"+"Effect"]?n["useInsertion"+"Effect"]:false;var s=a||o;var l=a||n.useLayoutEffect},3595:function(e,t,r){"use strict";r.d(t,{Rk:()=>i,SF:()=>o,sk:()=>a});var n=true;function i(e,t,r){var n="";r.split(" ").forEach(function(r){if(e[r]!==undefined){t.push(e[r]+";")}else if(r){n+=r+" "}});return n}var o=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 a=function e(e,t,r){o(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)}}},4634:function(e,t,r){"use strict";r.d(t,{A:()=>l});/* import */var n=r(8491);/* import */var i=/*#__PURE__*/r.n(n);/* import */var o=r(3988);/* import */var a=/*#__PURE__*/r.n(o);// Imports
var s=a()(i());// Module
s.push([e.id,`/* Variables declaration */
.rdp-root {
  --rdp-accent-color: blue; /* The accent color used for selected days and UI elements. */
  --rdp-accent-background-color: #f0f0ff; /* The accent background color used for selected days and UI elements. */

  --rdp-day-height: 44px; /* The height of the day cells. */
  --rdp-day-width: 44px; /* The width of the day cells. */

  --rdp-day_button-border-radius: 100%; /* The border radius of the day cells. */
  --rdp-day_button-border: 2px solid transparent; /* The border of the day cells. */
  --rdp-day_button-height: 42px; /* The height of the day cells. */
  --rdp-day_button-width: 42px; /* The width of the day cells. */

  --rdp-selected-border: 2px solid var(--rdp-accent-color); /* The border of the selected days. */
  --rdp-disabled-opacity: 0.5; /* The opacity of the disabled days. */
  --rdp-outside-opacity: 0.75; /* The opacity of the days outside the current month. */
  --rdp-today-color: var(--rdp-accent-color); /* The color of the today's date. */

  --rdp-dropdown-gap: 0.5rem; /* The gap between the dropdowns used in the month captons. */

  --rdp-months-gap: 2rem; /* The gap between the months in the multi-month view. */

  --rdp-nav_button-disabled-opacity: 0.5; /* The opacity of the disabled navigation buttons. */
  --rdp-nav_button-height: 2.25rem; /* The height of the navigation buttons. */
  --rdp-nav_button-width: 2.25rem; /* The width of the navigation buttons. */
  --rdp-nav-height: 2.75rem; /* The height of the navigation bar. */

  --rdp-range_middle-background-color: var(--rdp-accent-background-color); /* The color of the background for days in the middle of a range. */
  --rdp-range_middle-color: inherit; /* The color of the range text. */

  --rdp-range_start-color: white; /* The color of the range text. */
  --rdp-range_start-background: linear-gradient(
    var(--rdp-gradient-direction),
    transparent 50%,
    var(--rdp-range_middle-background-color) 50%
  ); /* Used for the background of the start of the selected range. */
  --rdp-range_start-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the start of the selected range. */

  --rdp-range_end-background: linear-gradient(
    var(--rdp-gradient-direction),
    var(--rdp-range_middle-background-color) 50%,
    transparent 50%
  ); /* Used for the background of the end of the selected range. */
  --rdp-range_end-color: white; /* The color of the range text. */
  --rdp-range_end-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the end of the selected range. */

  --rdp-week_number-border-radius: 100%; /* The border radius of the week number. */
  --rdp-week_number-border: 2px solid transparent; /* The border of the week number. */

  --rdp-week_number-height: var(--rdp-day-height); /* The height of the week number cells. */
  --rdp-week_number-opacity: 0.75; /* The opacity of the week number. */
  --rdp-week_number-width: var(--rdp-day-width); /* The width of the week number cells. */
  --rdp-weeknumber-text-align: center; /* The text alignment of the weekday cells. */

  --rdp-weekday-opacity: 0.75; /* The opacity of the weekday. */
  --rdp-weekday-padding: 0.5rem 0rem; /* The padding of the weekday. */
  --rdp-weekday-text-align: center; /* The text alignment of the weekday cells. */

  --rdp-gradient-direction: 90deg;

  --rdp-animation_duration: 0.3s;
  --rdp-animation_timing: cubic-bezier(0.4, 0, 0.2, 1);
}

.rdp-root[dir="rtl"] {
  --rdp-gradient-direction: -90deg;
}

.rdp-root[data-broadcast-calendar="true"] {
  --rdp-outside-opacity: unset;
}

/* Root of the component. */
.rdp-root {
  position: relative; /* Required to position the navigation toolbar. */
  box-sizing: border-box;
}

.rdp-root * {
  box-sizing: border-box;
}

.rdp-day {
  width: var(--rdp-day-width);
  height: var(--rdp-day-height);
  text-align: center;
}

.rdp-day_button {
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  justify-content: center;
  align-items: center;
  display: flex;

  width: var(--rdp-day_button-width);
  height: var(--rdp-day_button-height);
  border: var(--rdp-day_button-border);
  border-radius: var(--rdp-day_button-border-radius);
}

.rdp-day_button:disabled {
  cursor: revert;
}

.rdp-caption_label {
  z-index: 1;

  position: relative;
  display: inline-flex;
  align-items: center;

  white-space: nowrap;
  border: 0;
}

.rdp-dropdown:focus-visible ~ .rdp-caption_label {
  outline: 5px auto Highlight;
  /* biome-ignore lint/suspicious/noDuplicateProperties: backward compatibility */
  outline: 5px auto -webkit-focus-ring-color;
}

.rdp-button_next,
.rdp-button_previous {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -moz-appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  appearance: none;

  width: var(--rdp-nav_button-width);
  height: var(--rdp-nav_button-height);
}

.rdp-button_next:disabled,
.rdp-button_next[aria-disabled="true"],
.rdp-button_previous:disabled,
.rdp-button_previous[aria-disabled="true"] {
  cursor: revert;

  opacity: var(--rdp-nav_button-disabled-opacity);
}

.rdp-chevron {
  display: inline-block;
  fill: var(--rdp-accent-color);
}

.rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {
  transform: rotate(180deg);
  transform-origin: 50%;
}

.rdp-dropdowns {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--rdp-dropdown-gap);
}
.rdp-dropdown {
  z-index: 2;

  /* Reset */
  opacity: 0;
  appearance: none;
  position: absolute;
  inset-block-start: 0;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  cursor: inherit;
  border: none;
  line-height: inherit;
}

.rdp-dropdown_root {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.rdp-dropdown_root[data-disabled="true"] .rdp-chevron {
  opacity: var(--rdp-disabled-opacity);
}

.rdp-month_caption {
  display: flex;
  align-content: center;
  height: var(--rdp-nav-height);
  font-weight: bold;
  font-size: large;
}

.rdp-root[data-nav-layout="around"] .rdp-month,
.rdp-root[data-nav-layout="after"] .rdp-month {
  position: relative;
}

.rdp-root[data-nav-layout="around"] .rdp-month_caption {
  justify-content: center;
  margin-inline-start: var(--rdp-nav_button-width);
  margin-inline-end: var(--rdp-nav_button-width);
  position: relative;
}

.rdp-root[data-nav-layout="around"] .rdp-button_previous {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  height: var(--rdp-nav-height);
  display: inline-flex;
}

.rdp-root[data-nav-layout="around"] .rdp-button_next {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  height: var(--rdp-nav-height);
  display: inline-flex;
  justify-content: center;
}

.rdp-months {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rdp-months-gap);
  max-width: fit-content;
}

.rdp-month_grid {
  border-collapse: collapse;
}

.rdp-nav {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;

  display: flex;
  align-items: center;

  height: var(--rdp-nav-height);
}

.rdp-weekday {
  opacity: var(--rdp-weekday-opacity);
  padding: var(--rdp-weekday-padding);
  font-weight: 500;
  font-size: smaller;
  text-align: var(--rdp-weekday-text-align);
  text-transform: var(--rdp-weekday-text-transform);
}

.rdp-week_number {
  opacity: var(--rdp-week_number-opacity);
  font-weight: 400;
  font-size: small;
  height: var(--rdp-week_number-height);
  width: var(--rdp-week_number-width);
  border: var(--rdp-week_number-border);
  border-radius: var(--rdp-week_number-border-radius);
  text-align: var(--rdp-weeknumber-text-align);
}

/* DAY MODIFIERS */
.rdp-today:not(.rdp-outside) {
  color: var(--rdp-today-color);
}

.rdp-selected {
  font-weight: bold;
  font-size: large;
}

.rdp-selected .rdp-day_button {
  border: var(--rdp-selected-border);
}

.rdp-outside {
  opacity: var(--rdp-outside-opacity);
}

.rdp-disabled:not(.rdp-selected) {
  opacity: var(--rdp-disabled-opacity);
}

.rdp-hidden {
  visibility: hidden;
  color: var(--rdp-range_start-color);
}

.rdp-range_start {
  background: var(--rdp-range_start-background);
}

.rdp-range_start .rdp-day_button {
  background-color: var(--rdp-range_start-date-background-color);
  color: var(--rdp-range_start-color);
}

.rdp-range_middle {
  background-color: var(--rdp-range_middle-background-color);
}

.rdp-range_middle .rdp-day_button {
  border: unset;
  border-radius: unset;
  color: var(--rdp-range_middle-color);
}

.rdp-range_end {
  background: var(--rdp-range_end-background);
  color: var(--rdp-range_end-color);
}

.rdp-range_end .rdp-day_button {
  color: var(--rdp-range_start-color);
  background-color: var(--rdp-range_end-date-background-color);
}

.rdp-range_start.rdp-range_end {
  background: revert;
}

.rdp-focusable {
  cursor: pointer;
}

@keyframes rdp-slide_in_left {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes rdp-slide_in_right {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes rdp-slide_out_left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes rdp-slide_out_right {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

.rdp-weeks_before_enter {
  animation: rdp-slide_in_left var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-weeks_before_exit {
  animation: rdp-slide_out_left var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-weeks_after_enter {
  animation: rdp-slide_in_right var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-weeks_after_exit {
  animation: rdp-slide_out_right var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-root[dir="rtl"] .rdp-weeks_after_enter {
  animation: rdp-slide_in_left var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-root[dir="rtl"] .rdp-weeks_before_exit {
  animation: rdp-slide_out_right var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-root[dir="rtl"] .rdp-weeks_before_enter {
  animation: rdp-slide_in_right var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-root[dir="rtl"] .rdp-weeks_after_exit {
  animation: rdp-slide_out_left var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

@keyframes rdp-fade_in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rdp-fade_out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.rdp-caption_after_enter {
  animation: rdp-fade_in var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-caption_after_exit {
  animation: rdp-fade_out var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-caption_before_enter {
  animation: rdp-fade_in var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}

.rdp-caption_before_exit {
  animation: rdp-fade_out var(--rdp-animation_duration)
    var(--rdp-animation_timing) forwards;
}
`,""]);// Exports
/* export default */const l=s},3988:function(e){"use strict";/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/e.exports=function(e){var t=[];// return the list of modules as css string
t.toString=function t(){return this.map(function(t){var r="";var n=typeof t[5]!=="undefined";if(t[4]){r+="@supports (".concat(t[4],") {")}if(t[2]){r+="@media ".concat(t[2]," {")}if(n){r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")}r+=e(t);if(n){r+="}"}if(t[2]){r+="}"}if(t[4]){r+="}"}return r}).join("")};// import a list of modules into the list
t.i=function e(e,r,n,i,o){if(typeof e==="string"){e=[[null,e,undefined]]}var a={};if(n){for(var s=0;s<this.length;s++){var l=this[s][0];if(l!=null){a[l]=true}}}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);if(n&&a[u[0]]){continue}if(typeof o!=="undefined"){if(typeof u[5]==="undefined"){u[5]=o}else{u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}");u[5]=o}}if(r){if(!u[2]){u[2]=r}else{u[1]="@media ".concat(u[2]," {").concat(u[1],"}");u[2]=r}}if(i){if(!u[4]){u[4]="".concat(i)}else{u[1]="@supports (".concat(u[4],") {").concat(u[1],"}");u[4]=i}}t.push(u)}};return t}},8491:function(e){"use strict";e.exports=function(e){return e[1]}},1035:function(e,t,r){"use strict";var n=r(5959);/**
 * 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 o={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true};var a={"$$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 l={};l[n.ForwardRef]=a;l[n.Memo]=s;function c(e){// React v16.11 and below
if(n.isMemo(e)){return s}// React v16.12 and above
return l[e["$$typeof"]]||i}var u=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 a=c(e);var s=c(t);for(var l=0;l<i.length;++l){var g=i[l];if(!o[g]&&!(r&&r[g])&&!(s&&s[g])&&!(a&&a[g])){var b=p(t,g);try{// Avoid failures from read-only properties
u(e,g,b)}catch(e){}}}}return e}e.exports=m},9576:function(e,t,r){"use strict";var n=r(5206);if(true){t.createRoot=n.createRoot;t.hydrateRoot=n.hydrateRoot}else{var i}},5843: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,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=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,_=r?Symbol.for("react.responder"):60118,y=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case u:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof,e){case c:case f:case m:case v:case l:return e;default:return t}}case i:return t}}}function w(e){return x(e)===d}t.AsyncMode=u;t.ConcurrentMode=d;t.ContextConsumer=c;t.ContextProvider=l;t.Element=n;t.ForwardRef=f;t.Fragment=o;t.Lazy=m;t.Memo=v;t.Portal=i;t.Profiler=s;t.StrictMode=a;t.Suspense=p;t.isAsyncMode=function(e){return w(e)||x(e)===u};t.isConcurrentMode=w;t.isContextConsumer=function(e){return x(e)===c};t.isContextProvider=function(e){return x(e)===l};t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n};t.isForwardRef=function(e){return x(e)===f};t.isFragment=function(e){return x(e)===o};t.isLazy=function(e){return x(e)===m};t.isMemo=function(e){return x(e)===v};t.isPortal=function(e){return x(e)===i};t.isProfiler=function(e){return x(e)===s};t.isStrictMode=function(e){return x(e)===a};t.isSuspense=function(e){return x(e)===p};t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===_||e.$$typeof===y||e.$$typeof===g)};t.typeOf=x},5959:function(e,t,r){"use strict";if(true){e.exports=r(5843)}else{}},7462: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(1594),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,u=null;void 0!==r&&(c=""+r);void 0!==t.key&&(c=""+t.key);void 0!==t.ref&&(u=t.ref);for(n in t)a.call(t,n)&&!l.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o;t.jsx=c;t.jsxs=c},6070:function(e,t,r){"use strict";if(true){e.exports=r(7462)}else{}},6615:function(e){"use strict";var t=[];function r(e){var r=-1;for(var n=0;n<t.length;n++){if(t[n].identifier===e){r=n;break}}return r}function n(e,n){var o={};var a=[];for(var s=0;s<e.length;s++){var l=e[s];var c=n.base?l[0]+n.base:l[0];var u=o[c]||0;var d="".concat(c," ").concat(u);o[c]=u+1;var f=r(d);var p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(f!==-1){t[f].references++;t[f].updater(p)}else{var h=i(p,n);n.byIndex=s;t.splice(s,0,{identifier:d,updater:h,references:1})}a.push(d)}return a}function i(e,t){var r=t.domAPI(t);r.update(e);var n=function t(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer){return}r.update(e=t)}else{r.remove()}};return n}e.exports=function(e,i){i=i||{};e=e||[];var o=n(e,i);return function e(e){e=e||[];for(var a=0;a<o.length;a++){var s=o[a];var l=r(s);t[l].references--}var c=n(e,i);for(var u=0;u<o.length;u++){var d=o[u];var f=r(d);if(t[f].references===0){t[f].updater();t.splice(f,1)}}o=c}}},8840:function(e){"use strict";var t={};/* istanbul ignore next  */function r(e){if(typeof t[e]==="undefined"){var r=document.querySelector(e);// Special case to return head of iframe instead of iframe itself
if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement){try{// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
r=r.contentDocument.head}catch(e){// istanbul ignore next
r=null}}t[e]=r}return t[e]}/* istanbul ignore next  */function n(e,t){var n=r(e);if(!n){throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.")}n.appendChild(t)}e.exports=n},9619:function(e){"use strict";/* istanbul ignore next  */function t(e){var t=document.createElement("style");e.setAttributes(t,e.attributes);e.insert(t,e.options);return t}e.exports=t},879:function(e,t,r){"use strict";/* istanbul ignore next  */function n(e){var t=true?r.nc:0;if(t){e.setAttribute("nonce",t)}}e.exports=n},8612:function(e){"use strict";/* istanbul ignore next  */function t(e,t,r){var n="";if(r.supports){n+="@supports (".concat(r.supports,") {")}if(r.media){n+="@media ".concat(r.media," {")}var i=typeof r.layer!=="undefined";if(i){n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")}n+=r.css;if(i){n+="}"}if(r.media){n+="}"}if(r.supports){n+="}"}var o=r.sourceMap;if(o&&typeof btoa!=="undefined"){n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")}// For old IE
/* istanbul ignore if  */t.styleTagTransform(n,e,t.options)}function r(e){// istanbul ignore if
if(e.parentNode===null){return false}e.parentNode.removeChild(e)}/* istanbul ignore next  */function n(e){if(typeof document==="undefined"){return{update:function e(){},remove:function e(){}}}var n=e.insertStyleElement(e);return{update:function r(r){t(n,e,r)},remove:function e(){r(n)}}}e.exports=n},1536:function(e){"use strict";/* istanbul ignore next  */function t(e,t){if(t.styleSheet){t.styleSheet.cssText=e}else{while(t.firstChild){t.removeChild(t.firstChild)}t.appendChild(document.createTextNode(e))}}e.exports=t},234: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 o(){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"),o)}}}/**
 * 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`",o="`NOFLIP_CLASS`",a="`COMMENT`",// Patterns
s="[^\\u0020-\\u007e]",l="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",c="(?:[0-9]*\\.[0-9]+|[0-9]+)",u="(?: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="(?:"+l+"|\\\\[^\\r\\n\\f0-9a-f])",_="(?:[_a-z]|"+s+"|"+b+")",y="(?:[_a-z0-9-]|"+s+"|"+b+")",x="-?"+_+y+"*",w=c+"(?:\\s*"+u+"|"+x+")?",A="((?:-?"+w+")|(?:inherit|auto))",E="(?:-?"+c+"(?:\\s*"+u+")?)",I="(?:\\+|\\-|\\*|\\/)",k="(?:\\(|\\)|\\t| )",S="(?:"+k+"|"+E+"|"+I+"){3,}",O="(?:calc\\((?:"+S+")\\))",T="((?:-?"+w+")|(?:inherit|auto)|"+O+")",C="((?:margin|padding|border-width)\\s*:\\s*)",R="((?:-color|border-style)\\s*:\\s*)",D="(#?"+y+"+|(?: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>.
F="(?:"+f+"|"+s+"|"+b+")*?",Y="(?![a-zA-Z])",M="(?!("+y+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+a+")*?{)",j="(?!"+F+p+"\\))",P="(?="+F+p+"\\))",L="(\\s*(?:!important\\s*)?[;}])",// Regular expressions
N=/`TMP`/g,H=/`TMPLTR`/g,V=/`TMPRTL`/g,U=new RegExp(g,"gi"),K=new RegExp("("+m+M+"[^;}]+;?)","gi"),B=new RegExp("("+m+v+"})","gi"),z=new RegExp("("+d+")ltr","gi"),q=new RegExp("("+d+")rtl","gi"),W=new RegExp(h+"(left)"+Y+j+M,"gi"),G=new RegExp(h+"(right)"+Y+j+M,"gi"),$=new RegExp(h+"(left)"+P,"gi"),Q=new RegExp(h+"(right)"+P,"gi"),X=/(:dir\( *)ltr( *\))/g,J=/(:dir\( *)rtl( *\))/g,Z=new RegExp(h+"(ltr)"+P,"gi"),ee=new RegExp(h+"(rtl)"+P,"gi"),et=new RegExp(h+"([ns]?)e-resize","gi"),er=new RegExp(h+"([ns]?)w-resize","gi"),en=new RegExp(C+T+"(\\s+)"+T+"(\\s+)"+T+"(\\s+)"+T+L,"gi"),ei=new RegExp(R+D+"(\\s+)"+D+"(\\s+)"+D+"(\\s+)"+D+L,"gi"),eo=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+w+")","gi"),ea=new RegExp("(background-position-x\\s*:\\s*)(-?"+c+"%)","gi"),// border-radius: <length or percentage>{1,4} [optional: / <length or percentage>{1,4} ]
es=new RegExp("(border-radius\\s*:\\s*)"+A+"(?:(?:\\s+"+A+")(?:\\s+"+A+")?(?:\\s+"+A+")?)?"+"(?:(?:(?:\\s*\\/\\s*)"+A+")(?:\\s+"+A+")?(?:\\s+"+A+")?(?:\\s+"+A+")?)?"+L,"gi"),el=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+A,"gi"),ec=new RegExp("(text-shadow\\s*:\\s*)"+A+"(\\s*)"+D,"gi"),eu=new RegExp("(text-shadow\\s*:\\s*)"+D+"(\\s*)"+A,"gi"),ed=new RegExp("(text-shadow\\s*:\\s*)"+A,"gi"),ef=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+A+"(\\s*\\))","gi"),ep=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+A+"((?:\\s*,\\s*"+A+"){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}),o=n.slice(6,10).filter(function(e){return e}),a=n[10]||"";if(o.length){r=ev(i)+" / "+ev(o)}else{r=ev(i)}return t+r+a}/**
	 * 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 e_(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 ey(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,l){// Use single quotes in this object literal key for closure compiler.
// Tokenizers
var c=new n(K,i),u=new n(B,o),d=new n(U,a);// Tokenize
s=d.tokenize(u.tokenize(c.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(l.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(H,"ltr").replace(V,"rtl")}if(l.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(z,"$1"+e).replace(q,"$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(el,eb).replace(ec,ey).replace(eu,ey).replace(ed,eb)// Translate
.replace(ef,e_).replace(ep,e_)// 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(eo,eh).replace(ea,eh);// Detokenize
s=c.detokenize(u.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}},875:function(e,t,r){"use strict";t.__esModule=true;t["default"]=v;var n=a(r(4489));var i=a(r(7261));var o=a(r(8675));function a(e){return e&&e.__esModule?e:{"default":e}}var s=/^#[a-fA-F0-9]{6}$/;var l=/^#[a-fA-F0-9]{8}$/;var c=/^#[a-fA-F0-9]{3}$/;var u=/^#[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 o["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(l)){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(c)){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(u)){var a=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:a}}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 _=parseInt(""+g[2],10)/100;var y=parseInt(""+g[3],10)/100;var x="rgb("+(0,n["default"])(b,_,y)+")";var w=d.exec(x);if(!w){throw new o["default"](4,t,x)}return{red:parseInt(""+w[1],10),green:parseInt(""+w[2],10),blue:parseInt(""+w[3],10)}}var A=h.exec(t.substring(0,50));if(A){var E=parseInt(""+A[1],10);var I=parseInt(""+A[2],10)/100;var k=parseInt(""+A[3],10)/100;var S="rgb("+(0,n["default"])(E,I,k)+")";var O=d.exec(S);if(!O){throw new o["default"](4,t,S)}return{red:parseInt(""+O[1],10),green:parseInt(""+O[2],10),blue:parseInt(""+O[3],10),alpha:parseFloat(""+A[4])>1?parseFloat(""+A[4])/100:parseFloat(""+A[4])}}throw new o["default"](5)}e.exports=t["default"]},4299:function(e,t,r){"use strict";t.__esModule=true;t["default"]=s;var n=a(r(2084));var i=a(r(3355));var o=a(r(8675));function a(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 o["default"](6)}e.exports=t["default"]},8212:function(e,t,r){"use strict";t.__esModule=true;t["default"]=s;var n=a(r(875));var i=a(r(4299));var o=a(r(8675));function a(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,a){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 a==="number"){return a>=1?(0,i["default"])(e,t,r):"rgba("+e+","+t+","+r+","+a+")"}else if(typeof e==="object"&&t===undefined&&r===undefined&&a===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 o["default"](7)}e.exports=t["default"]},8675: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;l(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 o(e,arguments,c(this).constructor)}r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}});return l(r,e)};return i(e)}function o(e,t,r){if(a())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&l(i,r.prototype),i}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function t(){return!!e})()}function s(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e==="function"}}function l(e,t){l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(e,t){e.__proto__=t;return e};return l(e,t)}function c(e){c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function e(e){return e.__proto__||Object.getPrototypeOf(e)};return c(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 u=/* 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 o;for(o=1;o<t.length;o+=1){i.push(t[o])}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,o,a}return r(n)}return t}(/*#__PURE__*/i(Error));e.exports=t["default"]},4489: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 o=(e%360+360)%360/60;var a=(1-Math.abs(2*r-1))*t;var s=a*(1-Math.abs(o%2-1));var l=0;var c=0;var u=0;if(o>=0&&o<1){l=a;c=s}else if(o>=1&&o<2){l=s;c=a}else if(o>=2&&o<3){c=a;u=s}else if(o>=3&&o<4){c=s;u=a}else if(o>=4&&o<5){l=s;u=a}else if(o>=5&&o<6){l=a;u=s}var d=r-a/2;var f=l+d;var p=c+d;var h=u+d;return i(f,p,h)}var o=t["default"]=i;e.exports=t["default"]},7261: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"]},3355: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"]},2084: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"]},6129: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 o={};if(typeof e!=="string"||e.length===0){return o}var a=/\+/g;e=e.split(r);var s=1e3;if(i&&typeof i.maxKeys==="number"){s=i.maxKeys}var l=e.length;// maxKeys <= 0 means that we should not limit keys count
if(s>0&&l>s){l=s}for(var c=0;c<l;++c){var u=e[c].replace(a,"%20"),d=u.indexOf(n),f,p,h,v;if(d>=0){f=u.substr(0,d);p=u.substr(d+1)}else{f=u;p=""}h=decodeURIComponent(f);v=decodeURIComponent(p);if(!t(o,h)){o[h]=v}else if(Array.isArray(o[h])){o[h].push(v)}else{o[h]=[o[h],v]}}return o}},8137: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 o=encodeURIComponent(t(i))+n;if(Array.isArray(e[i])){return e[i].map(function(e){return o+encodeURIComponent(t(e))}).join(r)}else{return o+encodeURIComponent(t(e[i]))}}).filter(Boolean).join(r)}if(!i)return"";return encodeURIComponent(t(i))+n+encodeURIComponent(t(e))}},9919:function(e,t,r){"use strict";var n;n=/* unused reexport */r(6129);n=t.stringify=r(8137)},9878:function(e,t,r){"use strict";r.d(t,{A:()=>x});/* import */var n=r(33);/* import */var i=r(1303);/* import */var o=r(2473);/* import */var a=r(690);/* import */var s=r(2025);/* import */var l=r(1594);/* import */var c=/*#__PURE__*/r.n(l);/* import */var u=r(5757);/* import */var d=r(4485);/* import */var f=r(7764);/* import */var p=r(983);/* import */var h=r(7367);/* import */var v=r(4958);function m(){var e=(0,a._)(["\n      color: transparent;\n    "]);m=function t(){return e};return e}function g(){var e=(0,a._)(["\n      margin-right: 0;\n      margin-left: ",";\n    "]);g=function t(){return e};return e}function b(){var e=(0,a._)(["\n      opacity: 0;\n    "]);b=function t(){return e};return e}function _(){var e=(0,a._)(["\n      margin-inline: 0;\n    "]);_=function t(){return e};return e}var y=/*#__PURE__*/c().forwardRef((e,t)=>{var{variant:r="primary",isOutlined:a=false,size:l="regular",loading:c=false,children:u,disabled:f=false,icon:p,iconPosition:h="left",buttonCss:v,buttonContentCss:m,as:g="button",tabIndex:b,isIconOnly:_=false}=e,y=(0,o._)(e,["variant","isOutlined","size","loading","children","disabled","icon","iconPosition","buttonCss","buttonContentCss","as","tabIndex","isIconOnly"]);var x=[I({variant:r,outlined:a?r:"none",size:l,isLoading:c?"true":"false",iconOnly:_?"true":"false"}),v];var w=/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[c&&!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:c,disabled:f}),m],children:[p&&h==="left"&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.buttonIcon({iconPosition:h,loading:c,hasChildren:!!u}),children:p}),u,p&&h==="right"&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.buttonIcon({iconPosition:h,loading:c,hasChildren:!!u}),children:p})]})]});if(g==="a"){var{href:A,target:k,rel:S,download:O,onClick:T}=y,C=(0,o._)(y,["href","target","rel","download","onClick"]);// Auto-add security attributes for external links
var R=typeof A==="string"&&(A.startsWith("http")||A.startsWith("//"));var D=k==="_blank"&&R?"".concat(S?"".concat(S," "):"","noopener noreferrer"):S;return/*#__PURE__*/(0,s/* .jsx */.Y)("a",(0,i._)((0,n._)({ref:t,css:x,href:f||c?undefined:A,target:f||c?undefined:k,rel:D,download:f||c?undefined:O,tabIndex:f||c?-1:b,"aria-disabled":f||c,onClick:f||c?e=>e.preventDefault():T,role:"button","data-size":l},C),{children:w}))}var{type:F="button",onClick:Y,form:M,name:j,value:P}=y,L=(0,o._)(y,["type","onClick","form","name","value"]);return/*#__PURE__*/(0,s/* .jsx */.Y)("button",(0,i._)((0,n._)({ref:t,type:F,css:x,disabled:f||c,tabIndex:b,onClick:Y,form:M,name:j,value:P,"data-size":l},L),{children:w}))});y.displayName="Button";/* export default */const x=y;var w=/*#__PURE__*/(0,u/* .keyframes */.i7)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var A={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"],";",A.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,";}",A.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,";}",A.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,";}",A.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,";",A.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,";}",A.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,";}",A.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,";}",A.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;",A.outlined,";"),danger:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;border:1px solid ",f/* .colorTokens.stroke.danger */.I6.stroke.danger,";",A.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,";}",A.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,";",A.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)(_()))},spinner:/*#__PURE__*/(0,u/* .css */.AH)("position:absolute;visibility:visible;display:flex;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);& svg{animation:",w," 1s linear infinite;}")};var I=(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)},4485:function(e,t,r){"use strict";r.d(t,{A:()=>g});/* import */var n=r(33);/* import */var i=r(1303);/* import */var o=r(2473);/* import */var a=r(690);/* import */var s=r(2025);/* import */var l=r(1594);/* import */var c=/*#__PURE__*/r.n(l);/* import */var u=r(5757);/* import */var d=r(4336);/* import */var f=r(9612);function p(){var e=(0,a._)(["\n      filter: grayscale(100%);\n    "]);p=function t(){return e};return e}var h={};var v=e=>{var{name:t,width:r=16,height:a=16,style:c,isColorIcon:u=false,ignoreKids:d}=e,p=(0,o._)(e,["name","width","height","style","isColorIcon","ignoreKids"]);var v,g;var{supportKidsIcon:_}=(0,f/* .useSVGIconConfig */.J)();var y=d!==null&&d!==void 0?d:!_;var x=y?"".concat(t,"-ignoreKids"):t;var[w,A]=(0,l.useState)(((v=h[x])===null||v===void 0?void 0:v.icon)||null);var[E,I]=(0,l.useState)(!((g=h[x])===null||g===void 0?void 0:g.icon));(0,l.useEffect)(()=>{var e;if((e=h[x])===null||e===void 0?void 0:e.icon){A(h[x].icon);I(false);return}I(true);m(t,x,r,a,y).then(e=>{A(e)}).catch(()=>{A(null)}).finally(()=>{I(false)})},[t,r,a,y,x]);var k=(0,n._)({},u&&{"data-colorize":true},p);var S=w?w.viewBox:"0 0 ".concat(r," ").concat(a);var O=w?w.fill:"none";if(!w&&!E){return/*#__PURE__*/(0,s/* .jsx */.Y)("svg",{viewBox:S,children:/*#__PURE__*/(0,s/* .jsx */.Y)("rect",{width:r,height:a,fill:"transparent"})})}return/*#__PURE__*/(0,s/* .jsx */.Y)("svg",(0,i._)((0,n._)({css:[c,{width:r,height:a},b.svg({isColorIcon:u})],xmlns:"http://www.w3.org/2000/svg",viewBox:S,fill:O},k),{role:"presentation","aria-hidden":true,dangerouslySetInnerHTML:{__html:w?w.icon:""}}))};function m(e,t,r,n,i){var o,a,s;if((o=h[t])===null||o===void 0?void 0:o.icon){// Icon already loaded
return Promise.resolve(h[t].icon)}if((a=h[t])===null||a===void 0?void 0:a.promise){// Fetch already in progress, return existing promise
return h[t].promise}var l=e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([a-zA-Z])(\d+)/g,"$1-$2").toLowerCase();var c=!i&&d/* .tutorConfig.is_kids_mode */.P.is_kids_mode&&((s=d/* .tutorConfig.kids_icons_registry */.P.kids_icons_registry)===null||s===void 0?void 0:s.includes(l));var u=c?"assets/icons/kids/":"assets/icons/";var f="".concat(d/* .tutorConfig.tutor_url */.P.tutor_url).concat(u).concat(l,".svg");var p=fetch(f).then(t=>{if(!t.ok){throw new Error("Failed to load icon: ".concat(e))}return t.text()}).then(e=>{var i=new DOMParser;var o=i.parseFromString(e,"image/svg+xml");var a=o.querySelector("svg");var s=(a===null||a===void 0?void 0:a.getAttribute("viewBox"))||"0 0 ".concat(r," ").concat(n);var l=(a===null||a===void 0?void 0:a.getAttribute("fill"))||"none";var c=(a===null||a===void 0?void 0:a.innerHTML)||"";var u={viewBox:s,fill:l,icon:c};h[t]={icon:u};return u}).catch(e=>{h[t]={error:e};throw e});h[t]={loading:true,promise:p};return p}v.displayName="SVGIcon";/* export default */const g=/*#__PURE__*/(0,l.memo)(v,(e,t)=>{var r,n;return e.name===t.name&&e.height===t.height&&e.width===t.width&&e.isColorIcon===t.isColorIcon&&e.ignoreKids===t.ignoreKids&&((r=e.style)===null||r===void 0?void 0:r.name)===((n=t.style)===null||n===void 0?void 0:n.name)});var b={svg:e=>{var{isColorIcon:t=false}=e;return/*#__PURE__*/(0,u/* .css */.AH)("transition:filter 0.3s ease-in-out;",t&&(0,u/* .css */.AH)(p()),";")}}},5570:function(e,t,r){"use strict";// EXPORTS
r.d(t,{A:()=>/* binding */g});// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js
var n=r(2025);// EXTERNAL MODULE: external "React"
var i=r(1594);// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.esm.js
var o=r(5757);// EXTERNAL MODULE: external "wp.i18n"
var a=r(2470);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/Button.tsx
var s=r(9878);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/SVGIcon.tsx
var l=r(4485);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/config.ts
var c=r(4336);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/styles.ts
var u=r(7764);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/typography.ts
var d=r(983);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/controls/Show.tsx
var f=r(6025);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/style-utils.ts
var p=r(4958);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/production-error.webp
const h=r.p+"images/production-error-24158233.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/production-error-2x.webp
const v=r.p+"images/production-error-2x-dc6519df.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/ErrorBoundaryProd.tsx
class m extends i.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:h,srcSet:"".concat(v," 2x"),alt:(0,a.__)("Error","tutor-pro")}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:d/* .typography.heading5 */.I.heading5("medium"),children:(0,a.__)("Oops! Something went wrong","tutor-pro")}),/*#__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-pro")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("ul",{children:[/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,a.__)("Refresh the page.","tutor-pro")}),/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,a.__)("Clear your browser cache.","tutor-pro")}),/*#__PURE__*/(0,n/* .jsx */.Y)(f/* ["default"] */.A,{when:c/* .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-pro")})})]})]})]}),/*#__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)(l/* ["default"] */.A,{name:"refresh",height:24,width:24}),onClick:()=>window.location.reload(),children:(0,a.__)("Reload","tutor-pro")})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.support,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,a.__)("Still having trouble?","tutor-pro")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,a.__)("Contact","tutor-pro")}),/*#__PURE__*/(0,n/* .jsx */.Y)("a",{href:c/* ["default"].TUTOR_SUPPORT_PAGE_URL */.A.TUTOR_SUPPORT_PAGE_URL,children:(0,a.__)("Support","tutor-pro")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,a.__)("for assistance.","tutor-pro")})]})]})]})})}return this.props.children}constructor(e){super(e);this.state={hasError:false}}}/* export default */const g=m;var b={container:/*#__PURE__*/(0,o/* .css */.AH)("width:100%;height:auto;display:flex;justify-content:center;align-items:center;"),productionErrorWrapper:/*#__PURE__*/(0,o/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",u/* .spacing["20"] */.YK["20"],";max-width:500px;width:100%;"),productionErrorHeader:/*#__PURE__*/(0,o/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;padding:",u/* .spacing["32"] */.YK["32"],";background:",u/* .colorTokens.background.white */.I6.background.white,";border-radius:",u/* .borderRadius["12"] */.Vq["12"],";box-shadow:0px -4px 0px 0px #ff0000;gap:",u/* .spacing["16"] */.YK["16"],";h5{text-align:center;}img{height:104px;width:101px;object-position:center;object-fit:contain;}"),instructions:/*#__PURE__*/(0,o/* .css */.AH)("width:100%;max-width:333px;p{width:100%;",d/* .typography.caption */.I.caption(),";margin-bottom:",u/* .spacing["4"] */.YK["4"],";}ul{padding-left:",u/* .spacing["16"] */.YK["16"],";li{",d/* .typography.caption */.I.caption(),";color:",u/* .colorTokens.text.title */.I6.text.title,";list-style:unset;margin-bottom:",u/* .spacing["2"] */.YK["2"],";&::marker{color:",u/* .colorTokens.icon["default"] */.I6.icon["default"],";}}}"),productionFooter:/*#__PURE__*/(0,o/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;gap:",u/* .spacing["12"] */.YK["12"],";"),support:/*#__PURE__*/(0,o/* .css */.AH)(p/* .styleUtils.flexCenter */.x.flexCenter("row"),";text-align:center;flex-wrap:wrap;gap:",u/* .spacing["4"] */.YK["4"],";",d/* .typography.caption */.I.caption(),";color:",u/* .colorTokens.text.title */.I6.text.title,";a{color:",u/* .colorTokens.text.brand */.I6.text.brand,";text-decoration:none;}")}},4336:function(e,t,r){"use strict";r.d(t,{A:()=>l,P:()=>a});/* eslint-disable @typescript-eslint/no-explicit-any */var n,i;var o={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:"",tutor_pn_vapid_key:"",tutor_pn_client_id:"",tutor_pn_subscription_saved:"",difficulty_levels:[],supported_video_sources:[],edd_products:[],bp_groups:[],timezones:{},addons_data:[],kids_icons_registry:[],is_kids_mode:false,user_preferences:{auto_play_next:false,contrast:"",font_scale:1,learning_mood:"modern",motion_effects:"auto",theme:"light",vision:"normal"},is_legacy_learning_mode:false,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:{learning_mode:"",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,pagination_per_page:10,has_active_membership_plans:false},tutor_currency:{symbol:"",currency:"",position:"",thousand_separator:"",decimal_separator:"",no_of_decimal:""},visibility_control:{course_builder:{}}};var a=window._tutorobject||o;window.ajaxurl=a.ajaxurl;var s={TUTOR_SITE_URL:a.site_url,WP_AJAX_BASE_URL:a.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(a.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=course#field_supported_video_sources"),MONETIZATION_SETTINGS_URL:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=monetization"),TUTOR_PRICING_PAGE:"https://tutorlms.com/pricing/",TUTOR_ADDONS_PAGE:"".concat(a.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(a.tutor_frontend_dashboard_url,"/my-courses"),TUTOR_SUPPORT_PAGE_URL:"https://tutorlms.com/support",TUTOR_SUBSCRIPTIONS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor-subscriptions"),TUTOR_ENROLLMENTS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=enrollments"),TUTOR_COUPONS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor_coupons"),TUTOR_IMPORT_EXPORT_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor-tools&sub_page=import_export")};/* export default */const l=s},7461:function(e,t,r){"use strict";r.d(t,{I4:()=>m,V8:()=>v,gt:()=>w,re:()=>l,w3:()=>o,yl:()=>y});/* import */var n=r(2470);/* import */var i=/*#__PURE__*/r.n(n);var o=5*1024*1024;var a=/* unused pure expression or super */null&&["image/jpeg","image/png","image/gif"];var s=10;var l=10;var c=48;var u=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 _=/* unused pure expression or super */null&&{isAboveDesktop:b>=DesktopBreakpoint,isAboveTablet:b>=TabletBreakpoint,isAboveMobile:b>=MobileBreakpoint,isAboveSmallMobile:b>=SmallMobileBreakpoint};var y={HEADER_HEIGHT:56,MARGIN_TOP:88,BASIC_MODAL_HEADER_HEIGHT:50,BASIC_MODAL_MAX_WIDTH:1218};var x=/* unused pure expression or super */null&&{MIN_NOTEBOOK_HEIGHT:430,MIN_NOTEBOOK_WIDTH:360,NOTEBOOK_HEADER:50};var w={ADMINISTRATOR:"administrator",TUTOR_INSTRUCTOR:"tutor_instructor",SUBSCRIBER:"subscriber"};var A=/*#__PURE__*//* unused pure expression or super */null&&function(e){e["notebook"]="tutor_course_builder_notebook";return e}({});var E=/*#__PURE__*//* unused pure expression or super */null&&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 I=/*#__PURE__*//* unused pure expression or super */null&&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 k=/* unused pure expression or super */null&&{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 S=[{label:(0,n.__)("Public","tutor-pro"),value:"publish"},{label:(0,n.__)("Password Protected","tutor-pro"),value:"password_protected"},{label:(0,n.__)("Private","tutor-pro"),value:"private"}];var O={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 T=/* unused pure expression or super */null&&{NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"};var C=/* 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}},7764:function(e,t,r){"use strict";r.d(t,{EA:()=>y,I6:()=>s,J:()=>c,K_:()=>d,Vq:()=>h,Wy:()=>u,YK:()=>l,fE:()=>v,iL:()=>x,mw:()=>a,r7:()=>p});var n=64;var i=355;var o=56;var a={inter:"'Inter', sans-serif;",roboto:"'Roboto', sans-serif;",sfProDisplay:"'SF Pro Display', sans-serif;"};var s={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:"rgba(201, 132, 254, 0.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",gray:"#f0f1f1"},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 l={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 c={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 u={thin:100,extraLight:200,light:300,regular:400,medium:500,semiBold:600,bold:700,extraBold:800,black:900};var d={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 f=/* unused pure expression or super */null&&{tight:"-0.05em",normal:"0",wide:"0.05em",extraWide:"0.1em"};var p={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 h={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 v={negative:-1,positive:1,dropdown:2,level:0,sidebar:9,header:10,footer:10,modal:25,notebook:1e5,highest:99999,toast:100001};var m=480;var g=782;var b=992;var _=1280;var y={smallMobile:"@media(max-width: ".concat(m,"px)"),mobile:"@media(max-width: ".concat(g,"px)"),smallTablet:"@media(max-width: ".concat(b-1,"px)"),tablet:"@media(max-width: ".concat(_-1,"px)"),desktop:"@media(min-width: ".concat(_,"px)")};var x=1006},983:function(e,t,r){"use strict";r.d(t,{I:()=>o});/* import */var n=r(5757);/* import */var i=r(7764);var o={heading1:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["80"] */.J["80"],";line-height:",i/* .lineHeight["81"] */.K_["81"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading2:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["60"] */.J["60"],";line-height:",i/* .lineHeight["70"] */.K_["70"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading3:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["40"] */.J["40"],";line-height:",i/* .lineHeight["48"] */.K_["48"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading4:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["30"] */.J["30"],";line-height:",i/* .lineHeight["40"] */.K_["40"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading5:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["24"] */.J["24"],";line-height:",i/* .lineHeight["34"] */.K_["34"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},heading6:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["20"] */.J["20"],";line-height:",i/* .lineHeight["30"] */.K_["30"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},body:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["16"] */.J["16"],";line-height:",i/* .lineHeight["26"] */.K_["26"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},caption:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["15"] */.J["15"],";line-height:",i/* .lineHeight["24"] */.K_["24"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},small:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["13"] */.J["13"],";line-height:",i/* .lineHeight["18"] */.K_["18"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")},tiny:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,n/* .css */.AH)("font-size:",i/* .fontSize["11"] */.J["11"],";line-height:",i/* .lineHeight["16"] */.K_["16"],";color:",i/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",i/* .fontWeight */.Wy[e],";font-family:",i/* .fontFamily.inter */.mw.inter,";")}}},9612:function(e,t,r){"use strict";r.d(t,{J:()=>l,j:()=>c});/* import */var n=r(2025);/* import */var i=r(1594);/* import */var o=/*#__PURE__*/r.n(i);var a={supportKidsIcon:false};var s=/*#__PURE__*/o().createContext(a);var l=()=>(0,i.useContext)(s);var c=e=>{var{children:t,supportKidsIcon:r=false}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(s.Provider,{value:{supportKidsIcon:r},children:t})}},6025:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(8638);var i=e=>{return(0,n/* .isDefined */.O9)(e)&&!!e};var o=e=>{var{when:t,children:r,fallback:n=null}=e;var o=i(t);if(o){return typeof r==="function"?r(t):r}return n};/* export default */const a=o},7367:function(e,t,r){"use strict";r.d(t,{s:()=>o});/* import */var n=r(8638);/* import */var i=r(8790);var o=(e,t)=>{return r=>{var{variants:o,defaultVariants:a}=e;var s=[];if((0,n/* .isDefined */.O9)(t)){s.push(t)}var l=(0,i/* .getObjectKeys */.Co)(o).map(e=>{var t=r[e];var n=a[e];if(t===null){return null}var i=t||n;return o[e][i]});s.push(...l.filter(n/* .isDefined */.O9));return s}}},4958:function(e,t,r){"use strict";r.d(t,{v:()=>u,x:()=>d});/* import */var n=r(690);/* import */var i=r(5757);/* import */var o=r(7764);/* import */var a=r(983);function s(){var e=(0,n._)(["\n      flex-direction: column;\n    "]);s=function t(){return e};return e}function l(){var e=(0,n._)(["\n      background-color: ",";\n    "]);l=function t(){return e};return e}function c(){var e=(0,n._)(["\n      cursor: grabbing;\n    "]);c=function t(){return e};return e}var u=()=>/*#__PURE__*/(0,i/* .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:",o/* .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,i/* .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,i/* .css */.AH)("display:flex;justify-content:center;align-items:center;flex-direction:row;",e==="column"&&(0,i/* .css */.AH)(s()))},boxReset:/*#__PURE__*/(0,i/* .css */.AH)("padding:0;"),ulReset:/*#__PURE__*/(0,i/* .css */.AH)("list-style:none;padding:0;margin:0;"),resetButton:/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;box-shadow:none;padding:0;margin:0;text-align:inherit;font-family:",o/* .fontFamily.inter */.mw.inter,";cursor:pointer;"),cardInnerSection:/*#__PURE__*/(0,i/* .css */.AH)("padding:",o/* .spacing["20"] */.YK["20"]," ",o/* .spacing["20"] */.YK["20"]," ",o/* .spacing["24"] */.YK["24"]," ",o/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;gap:",o/* .spacing["24"] */.YK["24"],";"),fieldGroups:e=>/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;gap:",o/* .spacing */.YK[e],";"),titleAliasWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;gap:",o/* .spacing["12"] */.YK["12"],";"),inlineSwitch:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;justify-content:space-between;align-items:center;"),overflowYAuto:/*#__PURE__*/(0,i/* .css */.AH)("overflow-y:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",o/* .colorTokens.primary["40"] */.I6.primary["40"],";width:3px;}::-webkit-scrollbar-thumb{background-color:",o/* .colorTokens.design.brand */.I6.design.brand,";border-radius:",o/* .borderRadius["30"] */.Vq["30"],";}"),overflowXAuto:/*#__PURE__*/(0,i/* .css */.AH)("overflow-x:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",o/* .colorTokens.primary["40"] */.I6.primary["40"],";height:3px;}::-webkit-scrollbar-thumb{background-color:",o/* .colorTokens.design.brand */.I6.design.brand,";border-radius:",o/* .borderRadius["30"] */.Vq["30"],";}"),textEllipsis:/*#__PURE__*/(0,i/* .css */.AH)("text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),container:/*#__PURE__*/(0,i/* .css */.AH)("width:",o/* .containerMaxWidth */.iL,"px;margin:0 auto;"),display:{flex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:",e,";")},inlineFlex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,i/* .css */.AH)("display:inline-flex;flex-direction:",e,";")},none:/*#__PURE__*/(0,i/* .css */.AH)("display:none;"),block:/*#__PURE__*/(0,i/* .css */.AH)("display:block;"),inlineBlock:/*#__PURE__*/(0,i/* .css */.AH)("display:inline-block;")},text:{ellipsis:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;return/*#__PURE__*/(0,i/* .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,i/* .css */.AH)("text-align:center;"),left:/*#__PURE__*/(0,i/* .css */.AH)("text-align:left;"),right:/*#__PURE__*/(0,i/* .css */.AH)("text-align:right;"),justify:/*#__PURE__*/(0,i/* .css */.AH)("text-align:justify;")}},inputFocus:/*#__PURE__*/(0,i/* .css */.AH)("box-shadow:none;border-color:",o/* .colorTokens.stroke["default"] */.I6.stroke["default"],";outline:2px solid ",o/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;"),dateAndTimeWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:grid;grid-template-columns:5.5fr 4.5fr;border-radius:",o/* .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:",o/* .borderRadius["6"] */.Vq["6"],";pointer-events:none;z-index:1;transition:outline-color 0.2s ease-in-out;}&:focus-within::before{outline-color:",o/* .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,i/* .css */.AH)("font-size:",o/* .fontSize["18"] */.J["18"],";color:",o/* .colorTokens.icon.subdued */.I6.icon.subdued,";"),crossButton:/*#__PURE__*/(0,i/* .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:",o/* .borderRadius.circle */.Vq.circle,";background:",o/* .colorTokens.background.white */.I6.background.white,";transition:opacity 0.3s ease-in-out;svg{color:",o/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",o/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",o/* .shadow.focus */.r7.focus,";}"),aiGradientText:/*#__PURE__*/(0,i/* .css */.AH)("background:",o/* .colorTokens.text.ai.gradient */.I6.text.ai.gradient,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;"),actionButton:/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;color:",o/* .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:",o/* .colorTokens.icon.brand */.I6.icon.brand,";}:disabled{color:",o/* .colorTokens.icon.disable.background */.I6.icon.disable.background,";cursor:not-allowed;}:focus-visible{outline:2px solid ",o/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;border-radius:",o/* .borderRadius["2"] */.Vq["2"],";}"),backButton:/*#__PURE__*/(0,i/* .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 ",o/* .colorTokens.border.neutral */.I6.border.neutral,";border-radius:",o/* .borderRadius["4"] */.Vq["4"],";outline:none;color:",o/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;cursor:pointer;:hover{color:",o/* .colorTokens.icon.hover */.I6.icon.hover,";}&:focus-visible{outline:2px solid ",o/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}"),optionCheckButton:/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",o/* .fontFamily.inter */.mw.inter,";cursor:pointer;height:32px;width:32px;border-radius:",o/* .borderRadius.circle */.Vq.circle,";opacity:0;:focus-visible{outline:2px solid ",o/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),optionCounter:e=>{var{isEditing:t,isSelected:r=false}=e;return/*#__PURE__*/(0,i/* .css */.AH)("height:",o/* .spacing["24"] */.YK["24"],";width:",o/* .spacing["24"] */.YK["24"],";border-radius:",o/* .borderRadius.min */.Vq.min,";",a/* .typography.caption */.I.caption("medium"),";color:",o/* .colorTokens.text.subdued */.I6.text.subdued,";background-color:",o/* .colorTokens.background["default"] */.I6.background["default"],";text-align:center;",r&&!t&&(0,i/* .css */.AH)(l(),o/* .colorTokens.bg.white */.I6.bg.white))},optionDragButton:e=>{var{isOverlay:t}=e;return/*#__PURE__*/(0,i/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",o/* .fontFamily.inter */.mw.inter,";cursor:grab;display:flex;align-items:center;justify-content:center;transform:rotate(90deg);color:",o/* .colorTokens.icon["default"] */.I6.icon["default"],";cursor:grab;place-self:center center;border-radius:",o/* .borderRadius["2"] */.Vq["2"],";&:focus,&:active,&:hover{background:none;color:",o/* .colorTokens.icon["default"] */.I6.icon["default"],";}:focus-visible{outline:2px solid ",o/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}",t&&(0,i/* .css */.AH)(c()))},optionInputWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;flex-direction:column;width:100%;gap:",o/* .spacing["12"] */.YK["12"],";input,textarea{background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",o/* .fontFamily.inter */.mw.inter,";",a/* .typography.caption */.I.caption(),";flex:1;color:",o/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",o/* .spacing["4"] */.YK["4"]," ",o/* .spacing["10"] */.YK["10"],";border:1px solid ",o/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",o/* .borderRadius["6"] */.Vq["6"],";resize:vertical;cursor:text;&:focus{box-shadow:none;border-color:",o/* .colorTokens.stroke["default"] */.I6.stroke["default"],";outline:2px solid ",o/* .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,i/* .css */.AH)("object-fit:",e,";object-position:",t,";")},inputClearButton:/*#__PURE__*/(0,i/* .css */.AH)("position:absolute;top:50%;right:",o/* .spacing["4"] */.YK["4"],";transform:translateY(-50%);background-color:",o/* .colorTokens.background.white */.I6.background.white,";border-radius:",o/* .borderRadius["2"] */.Vq["2"],";&:not(:disabled):not([aria-disabled='true']):hover,&:not(:disabled):not([aria-disabled='true']):focus{background-color:",o/* .colorTokens.background.hover */.I6.background.hover,";}")}},8638:function(e,t,r){"use strict";r.d(t,{$X:()=>f,Et:()=>c,Gv:()=>d,Kg:()=>a,Lm:()=>u,O9:()=>o});var n=(e,t)=>{return t in e};var i=e=>{return e.isAxiosError};var o=e=>{return e!==undefined&&e!==null};function a(e){return typeof e==="string"||e instanceof String}function s(e){return!!e&&Array.isArray(e)&&(!e.length||typeof e[0]!=="object")}function l(e){return s(e)&&(!e.length||typeof e[0]==="string"||e[0]instanceof String)}function c(e){return typeof e==="number"||e instanceof Number}function u(e){return typeof e==="boolean"||e instanceof Boolean}function d(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var f=e=>{return e instanceof Blob||e instanceof File};var p=/* unused pure expression or super */null&&{NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"}},8790:function(e,t,r){"use strict";// EXPORTS
r.d(t,{z3:()=>/* binding */eh,dS:()=>/* binding */ei,EL:()=>/* binding */eO,lQ:()=>/* binding */$,Ak:()=>/* binding */ee,y1:()=>/* binding */Q,g1:()=>/* binding */eI,u5:()=>/* binding */eM,G0:()=>/* binding */ec,GR:()=>/* binding */eR,TW:()=>/* binding */em,Co:()=>/* binding */ey,lW:()=>/* binding */eS,jT:()=>/* binding */eY});// UNUSED EXPORTS: covertSecondsToHMS, getCategoryLeftBarHeight, getObjectEntries, assertIsDefined, getValueInArray, makeFirstCharacterUpperCase, convertToGMT, extractIdOnly, mapInBetween, determinePostStatus, throttle, normalizeLineEndings, jsonParse, objectToQueryParams, hasDuplicateEntries, arrayRange, convertToSlug, formatSeconds, findSlotFields, wait, arrayIntersect, fetchImageUrlAsBase64, getObjectValues, generateCouponCode, isFileOrBlob, transformParams, moveTo, generateTree, formatReadAbleBytesToBytes
// EXTERNAL MODULE: external "wp.i18n"
var n=r(2470);// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js
/**
 * @module constants
 * @summary Useful constants
 * @description
 * Collection of useful date constants.
 *
 * The constants could be imported from `date-fns/constants`:
 *
 * ```ts
 * import { maxTime, minTime } from "./constants/date-fns/constants";
 *
 * function isAllowedTime(time) {
 *   return time <= maxTime && time >= minTime;
 * }
 * ```
 *//**
 * @constant
 * @name daysInWeek
 * @summary Days in 1 week.
 */const i=7;/**
 * @constant
 * @name daysInYear
 * @summary Days in 1 year.
 *
 * @description
 * How many days in a year.
 *
 * One years equals 365.2425 days according to the formula:
 *
 * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
 * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
 */const o=365.2425;/**
 * @constant
 * @name maxTime
 * @summary Maximum allowed time.
 *
 * @example
 * import { maxTime } from "./constants/date-fns/constants";
 *
 * const isValid = 8640000000000001 <= maxTime;
 * //=> false
 *
 * new Date(8640000000000001);
 * //=> Invalid Date
 */const a=Math.pow(10,8)*24*60*60*1e3;/**
 * @constant
 * @name minTime
 * @summary Minimum allowed time.
 *
 * @example
 * import { minTime } from "./constants/date-fns/constants";
 *
 * const isValid = -8640000000000001 >= minTime;
 * //=> false
 *
 * new Date(-8640000000000001)
 * //=> Invalid Date
 */const s=/* unused pure expression or super */null&&-a;/**
 * @constant
 * @name millisecondsInWeek
 * @summary Milliseconds in 1 week.
 */const l=6048e5;/**
 * @constant
 * @name millisecondsInDay
 * @summary Milliseconds in 1 day.
 */const c=864e5;/**
 * @constant
 * @name millisecondsInMinute
 * @summary Milliseconds in 1 minute
 */const u=6e4;/**
 * @constant
 * @name millisecondsInHour
 * @summary Milliseconds in 1 hour
 */const d=36e5;/**
 * @constant
 * @name millisecondsInSecond
 * @summary Milliseconds in 1 second
 */const f=1e3;/**
 * @constant
 * @name minutesInYear
 * @summary Minutes in 1 year.
 */const p=525600;/**
 * @constant
 * @name minutesInMonth
 * @summary Minutes in 1 month.
 */const h=43200;/**
 * @constant
 * @name minutesInDay
 * @summary Minutes in 1 day.
 */const v=1440;/**
 * @constant
 * @name minutesInHour
 * @summary Minutes in 1 hour.
 */const m=60;/**
 * @constant
 * @name monthsInQuarter
 * @summary Months in 1 quarter.
 */const g=3;/**
 * @constant
 * @name monthsInYear
 * @summary Months in 1 year.
 */const b=12;/**
 * @constant
 * @name quartersInYear
 * @summary Quarters in 1 year
 */const _=4;/**
 * @constant
 * @name secondsInHour
 * @summary Seconds in 1 hour.
 */const y=3600;/**
 * @constant
 * @name secondsInMinute
 * @summary Seconds in 1 minute.
 */const x=60;/**
 * @constant
 * @name secondsInDay
 * @summary Seconds in 1 day.
 */const w=/* unused pure expression or super */null&&y*24;/**
 * @constant
 * @name secondsInWeek
 * @summary Seconds in 1 week.
 */const A=/* unused pure expression or super */null&&w*7;/**
 * @constant
 * @name secondsInYear
 * @summary Seconds in 1 year.
 */const E=/* unused pure expression or super */null&&w*o;/**
 * @constant
 * @name secondsInMonth
 * @summary Seconds in 1 month
 */const I=/* unused pure expression or super */null&&E/12;/**
 * @constant
 * @name secondsInQuarter
 * @summary Seconds in 1 quarter.
 */const k=/* unused pure expression or super */null&&I*3;/**
 * @constant
 * @name constructFromSymbol
 * @summary Symbol enabling Date extensions to inherit properties from the reference date.
 *
 * The symbol is used to enable the `constructFrom` function to construct a date
 * using a reference date and a value. It allows to transfer extra properties
 * from the reference date to the new date. It's useful for extensions like
 * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
 * a constructor argument.
 */const S=Symbol.for("constructDateFrom");// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js
/**
 * @name constructFrom
 * @category Generic Helpers
 * @summary Constructs a date using the reference date and the value
 *
 * @description
 * The function constructs a new date using the constructor from the reference
 * date and the given value. It helps to build generic functions that accept
 * date extensions.
 *
 * It defaults to `Date` if the passed reference date is a number or a string.
 *
 * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
 * enabling to transfer extra properties from the reference date to the new date.
 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
 * that accept a time zone as a constructor argument.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 *
 * @param date - The reference date to take constructor from
 * @param value - The value to create the date
 *
 * @returns Date initialized using the given date and value
 *
 * @example
 * import { constructFrom } from "./constructFrom/date-fns";
 *
 * // A function that clones a date preserving the original type
 * function cloneDate<DateType extends Date>(date: DateType): DateType {
 *   return constructFrom(
 *     date, // Use constructor from the given date
 *     date.getTime() // Use the date value to create a new date
 *   );
 * }
 */function O(e,t){if(typeof e==="function")return e(t);if(e&&typeof e==="object"&&S in e)return e[S](t);if(e instanceof Date)return new e.constructor(t);return new Date(t)}// Fallback for modularized imports:
/* export default */const T=/* unused pure expression or super */null&&O;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js
/**
 * @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.
 *
 * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
 * enabling to transfer extra properties from the reference date to the new date.
 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
 * that accept a time zone as a constructor argument.
 *
 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param argument - The value to convert
 *
 * @returns The parsed date in the local time zone
 *
 * @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 C(e,t){// [TODO] Get rid of `toDate` or `constructFrom`?
return O(t||e,e)}// Fallback for modularized imports:
/* export default */const R=/* unused pure expression or super */null&&C;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addMinutes.js
/**
 * The {@link addMinutes} function options.
 *//**
 * @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.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param date - The date to be changed
 * @param amount - The amount of minutes to be added.
 * @param options - An object with options
 *
 * @returns The new date with the minutes added
 *
 * @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 D(e,t,r){const n=C(e,r?.in);n.setTime(n.getTime()+t*u);return n}// Fallback for modularized imports:
/* export default */const F=/* unused pure expression or super */null&&D;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/native.js
const Y=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);/* export default */const M={randomUUID:Y};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/uuid@9.0.1/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 j;const P=new Uint8Array(16);function L(){// lazy load so that environments that need to polyfill have a chance to do so
if(!j){// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
j=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!j){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return j(P)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/uuid@9.0.1/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 N=[];for(let e=0;e<256;++e){N.push((e+256).toString(16).slice(1))}function H(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 N[e[t+0]]+N[e[t+1]]+N[e[t+2]]+N[e[t+3]]+"-"+N[e[t+4]]+N[e[t+5]]+"-"+N[e[t+6]]+N[e[t+7]]+"-"+N[e[t+8]]+N[e[t+9]]+"-"+N[e[t+10]]+N[e[t+11]]+N[e[t+12]]+N[e[t+13]]+N[e[t+14]]+N[e[t+15]]}function V(e,t=0){const r=H(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 U=/* unused pure expression or super */null&&V;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js
function K(e,t,r){if(M.randomUUID&&!t&&!e){return M.randomUUID()}e=e||{};const n=e.random||(e.rng||L)();// 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 H(n)}/* export default */const B=K;// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/config.ts
var z=r(4336);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/constants.ts
var q=r(7461);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/types.ts
var W=r(8638);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/utils/util.ts
function G(e,t){if(e===undefined||e===null){throw new Error(t)}}var $=()=>{};var Q=e=>Array.from(Array(e).keys());var X=(e,t)=>Array.from({length:t-e},(t,r)=>r+e);var J=e=>{return e instanceof Blob||e instanceof File};var Z=e=>{return Array.isArray(e)?e:e?[e]:[]};// Generate unique id
var ee=()=>B();// Generate coupon code
var et=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 er=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 en=(e,t,r)=>{var n=[...e];var i=t;var o=r;if(t<0){i=e.length+t}if(t>=0&&t<e.length){if(r<0){o=e.length+r}var[a]=n.splice(i,1);if(a){n.splice(o,0,a)}}return n};var ei=e=>{var t=e.split(".");var r=t.pop();return r?".".concat(r):""};var eo=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:true;var n={};for(var i of e){var o,a;var s=t(i);s=r?s:s.toString().toLowerCase();(o=n)[a=s]||(o[a]=0);n[s]++;var l=n[s];if(l&&l>1){return true}}return false};var ea=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 i=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 i.reduce((t,n)=>{r.add(n.id);var i=ea(e,n.id,r);return[...t,_object_spread_props(_object_spread({},n),{children:i})]},[])};var es=(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 el=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 ec=(e,t)=>Math.floor(Math.random()*(t-e))+e;var eu=(e,t,r,n,i)=>{return(e-t)*(i-n)/(r-t)+n};var ed=e=>{return e.map(e=>e.id)};var ef=(e,t)=>{var r=new Set(e);var n=new Set(t);var i=[];for(var o of r){if(n.has(o)){i.push(o)}}return i};var ep=e=>{if(!e)return e;var t=e.charAt(0).toUpperCase();var r=e.slice(1);return"".concat(t).concat(r)};var eh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;if(!e||e<=1){return(0,n.__)("0 Bytes","tutor-pro")}var r=1024;var i=Math.max(0,t);var o=[(0,n.__)("Bytes","tutor-pro"),(0,n.__)("KB","tutor-pro"),(0,n.__)("MB","tutor-pro"),(0,n.__)("GB","tutor-pro"),(0,n.__)("TB","tutor-pro"),(0,n.__)("PB","tutor-pro"),(0,n.__)("EB","tutor-pro"),(0,n.__)("ZB","tutor-pro"),(0,n.__)("YB","tutor-pro")];var a=Math.floor(Math.log(e)/Math.log(r));return"".concat(Number.parseFloat((e/r**a).toFixed(i))," ").concat(o[a])};var ev=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 o=i.indexOf(r);if(o===-1){return 0}return n*1024**o};var em=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;return e.replace(r?t?/[^0-9-]/g:/[^0-9]/g:t?/[^0-9.-]/g:/[^0-9.]/g,"").replace(/(?!^)-/g,"").replace(r?/\./g:/(\..*)\./g,"$1")};var eg=(e,t)=>{var r=false;return function n(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++){i[o]=arguments[o]}if(!r){e.apply(this,i);r=true;setTimeout(()=>{r=false},t)}}};var eb=e=>{return JSON.parse(e)};var e_=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 ey=e=>{if(!(0,W/* .isDefined */.O9)(e)||!(0,W/* .isObject */.Gv)(e)){return[]}return Object.keys(e)};var ex=e=>{return Object.values(e)};var ew=e=>{return Object.entries(e)};function eA(e){var t=new URLSearchParams;for(var r in e){if(r in e){t.append(r,e[r])}}return t.toString()}var eE=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DateFormats.yearMonthDayHourMinuteSecond24H;var r=e.getTimezoneOffset();var n=addMinutes(e,r);return format(n,t)};var eI=e=>{var t=new Date(e);var r=t.getTimezoneOffset();return D(t,-r)};var ek=e=>{return(e||"").replace(/\r\n/g,"\n")};var eS=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 eO=e=>{if(!e||!e.response||!e.response.data){return(0,n.__)("Something went wrong","tutor-pro")}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,n.__)("Something went wrong","tutor-pro")};var eT=e=>_async_to_generator(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 eC=(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 eR=e=>{var t;return!!((t=z/* .tutorConfig.addons_data.find */.P.addons_data.find(t=>t.base_name===e))===null||t===void 0?void 0:t.is_enabled)};var eD=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 eF=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 eY=e=>{var t=new DOMParser;var r=t.parseFromString(e,"text/html");return r.body.textContent||""};var eM=e=>{var{unit:t="hour",value:r,useLySuffix:i=false,capitalize:o=true,showSingular:a=false}=e;if(t==="until_cancellation"){var s=(0,n.__)("Until Cancellation","tutor-pro");return o?ej(s):s}var l={hour:{// translators: %d: number of hours
plural:(0,n.__)("%d hours","tutor-pro"),// translators: %d: number of hours
singular:(0,n.__)("%d hour","tutor-pro"),suffix:(0,n.__)("hourly","tutor-pro"),base:(0,n.__)("hour","tutor-pro")},day:{// translators: %d: number of days
plural:(0,n.__)("%d days","tutor-pro"),// translators: %d: number of days
singular:(0,n.__)("%d day","tutor-pro"),suffix:(0,n.__)("daily","tutor-pro"),base:(0,n.__)("day","tutor-pro")},week:{// translators: %d is the number of weeks
plural:(0,n.__)("%d weeks","tutor-pro"),// translators: %d is the number of weeks
singular:(0,n.__)("%d week","tutor-pro"),suffix:(0,n.__)("weekly","tutor-pro"),base:(0,n.__)("week","tutor-pro")},month:{// translators: %d is the number of months
plural:(0,n.__)("%d months","tutor-pro"),// translators: %d is the number of months
singular:(0,n.__)("%d month","tutor-pro"),suffix:(0,n.__)("monthly","tutor-pro"),base:(0,n.__)("month","tutor-pro")},year:{// translators: %d is the number of years
plural:(0,n.__)("%d years","tutor-pro"),// translators: %d is the number of years
singular:(0,n.__)("%d year","tutor-pro"),suffix:(0,n.__)("yearly","tutor-pro"),base:(0,n.__)("year","tutor-pro")}};if(!l[t]){return""}var c="";if(r>1){c=(0,n.sprintf)(l[t].plural,r)}else if(a){c=(0,n.sprintf)(l[t].singular,r)}else if(i){c=l[t].suffix}else{c=l[t].base}return o?ej(c):c};var ej=e=>{return e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")};var eP=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}}},1594:function(e){"use strict";e.exports=React},5206:function(e){"use strict";e.exports=ReactDOM},2470:function(e){"use strict";e.exports=wp.i18n},33:function(e,t,r){"use strict";// EXPORTS
r.d(t,{_:()=>/* binding */i});// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_define_property.js
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};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js
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){n(e,t,r[t])})}return e}},1303: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}},2473:function(e,t,r){"use strict";// EXPORTS
r.d(t,{_:()=>/* binding */i});// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/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,o;for(o=0;o<n.length;o++){i=n[o];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js
function i(e,t){if(e==null)return{};var r=n(e,t);var i,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){i=a[o];if(t.indexOf(i)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,i))continue;r[i]=e[i]}}return r}},690: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)}}))}}};// 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 o=t[n]={id:n,exports:{}};// Execute the module function
e[n](o,o.exports,r);// Return the exports of the module
return o.exports}// 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/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/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.5"})();// 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/rspack_unique_id
(()=>{r.ruid="bundler=rspack@1.6.5"})();var n={};// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(()=>{"use strict";// NAMESPACE OBJECT: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/common/utils.js
var e={};r.r(e);r.d(e,{hasBrowserEnv:()=>yg,hasStandardBrowserEnv:()=>y_,hasStandardBrowserWebWorkerEnv:()=>yy,navigator:()=>yb,origin:()=>yx});// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js
var t=r(2025);// EXTERNAL MODULE: external "React"
var n=r(1594);var i=/*#__PURE__*/r.n(n);// EXTERNAL MODULE: ./node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js
var o=r(9576);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/ErrorBoundary.tsx
var a;if(false){}else{// eslint-disable-next-line @typescript-eslint/no-require-imports
a=r(5570)/* ["default"] */.A}var s=e=>{var{children:r}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)(a,{children:r})};/* export default */const l=s;// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.esm.js
var c=r(5757);// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/utils.js
// src/utils.ts
var u=typeof window==="undefined"||"Deno"in globalThis;function d(){}function f(e,t){return typeof e==="function"?e(t):e}function p(e){return typeof e==="number"&&e>=0&&e!==Infinity}function h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function v(e,t){return typeof e==="function"?e(t):e}function m(e,t){return typeof e==="function"?e(t):e}function g(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==_(a,t.options)){return false}}else if(!x(t.queryKey,a)){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(o&&!o(t)){return false}return true}function b(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey){return false}if(r){if(y(t.options.mutationKey)!==y(o)){return false}}else if(!x(t.options.mutationKey,o)){return false}}if(n&&t.state.status!==n){return false}if(i&&!i(t)){return false}return true}function _(e,t){const r=t?.queryKeyHashFn||y;return r(e)}function y(e){return JSON.stringify(e,(e,t)=>I(t)?Object.keys(t).sort().reduce((e,r)=>{e[r]=t[r];return e},{}):t)}function x(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).some(r=>!x(e[r],t[r]))}return false}function w(e,t){if(e===t){return e}const r=E(e)&&E(t);if(r||I(e)&&I(t)){const n=r?e:Object.keys(e);const i=n.length;const o=r?t:Object.keys(t);const a=o.length;const s=r?[]:{};let l=0;for(let i=0;i<a;i++){const a=r?i:o[i];if((!r&&n.includes(a)||r)&&e[a]===void 0&&t[a]===void 0){s[a]=void 0;l++}else{s[a]=w(e[a],t[a]);if(s[a]===e[a]&&e[a]!==void 0){l++}}}return i===a&&l===i?e:s}return t}function A(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 E(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function I(e){if(!k(e)){return false}const t=e.constructor;if(t===void 0){return true}const r=t.prototype;if(!k(r)){return false}if(!r.hasOwnProperty("isPrototypeOf")){return false}if(Object.getPrototypeOf(e)!==Object.prototype){return false}return true}function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function S(e){return new Promise(t=>{setTimeout(t,e)})}function O(e,t,r){if(typeof r.structuralSharing==="function"){return r.structuralSharing(e,t)}else if(r.structuralSharing!==false){if(false){}return w(e,t)}return t}function T(e){return e}function C(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function R(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var D=Symbol();function F(e,t){if(false){}if(!e.queryFn&&t?.initialPromise){return()=>t.initialPromise}if(!e.queryFn||e.queryFn===D){return()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}return e.queryFn}//# sourceMappingURL=utils.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/notifyManager.js
// src/notifyManager.ts
function Y(){let e=[];let t=0;let r=e=>{e()};let n=e=>{e()};let i=e=>setTimeout(e,0);const o=n=>{if(t){e.push(n)}else{i(()=>{r(n)})}};const a=()=>{const t=e;e=[];if(t.length){i(()=>{n(()=>{t.forEach(e=>{r(e)})})})}};return{batch:e=>{let r;t++;try{r=e()}finally{t--;if(!t){a()}}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=>{i=e}}}var M=Y();//# sourceMappingURL=notifyManager.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/subscribable.js
// src/subscribable.ts
var j=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
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/focusManager.js
// src/focusManager.ts
var P=class extends j{#e;#t;#r;constructor(){super();this.#r=e=>{if(!u&&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 L=new P;//# sourceMappingURL=focusManager.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/onlineManager.js
// src/onlineManager.ts
var N=class extends j{#n=true;#t;#r;constructor(){super();this.#r=e=>{if(!u&&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.#n!==e;if(t){this.#n=e;this.listeners.forEach(t=>{t(e)})}}isOnline(){return this.#n}};var H=new N;//# sourceMappingURL=onlineManager.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/thenable.js
// src/thenable.ts
function V(){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}//# sourceMappingURL=thenable.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/retryer.js
// src/retryer.ts
function U(e){return Math.min(1e3*2**e,3e4)}function K(e){return(e??"online")==="online"?H.isOnline():true}var B=class extends Error{constructor(e){super("CancelledError");this.revert=e?.revert;this.silent=e?.silent}};function z(e){return e instanceof B}function q(e){let t=false;let r=0;let n=false;let i;const o=V();const a=t=>{if(!n){p(new B(t));e.abort?.()}};const s=()=>{t=true};const l=()=>{t=false};const c=()=>L.isFocused()&&(e.networkMode==="always"||H.isOnline())&&e.canRun();const d=()=>K(e.networkMode)&&e.canRun();const f=t=>{if(!n){n=true;e.onSuccess?.(t);i?.();o.resolve(t)}};const p=t=>{if(!n){n=true;e.onError?.(t);i?.();o.reject(t)}};const h=()=>{return new Promise(t=>{i=e=>{if(n||c()){t(e)}};e.onPause?.()}).then(()=>{i=void 0;if(!n){e.onContinue?.()}})};const v=()=>{if(n){return}let i;const o=r===0?e.initialPromise:void 0;try{i=o??e.fn()}catch(e){i=Promise.reject(e)}Promise.resolve(i).then(f).catch(i=>{if(n){return}const o=e.retry??(u?0:3);const a=e.retryDelay??U;const s=typeof a==="function"?a(r,i):a;const l=o===true||typeof o==="number"&&r<o||typeof o==="function"&&o(r,i);if(t||!l){p(i);return}r++;e.onFail?.(r,i);S(s).then(()=>{return c()?void 0:h()}).then(()=>{if(t){p(i)}else{v()}})})};return{promise:o,cancel:a,continue:()=>{i?.();return o},cancelRetry:s,continueRetry:l,canStart:d,start:()=>{if(d()){v()}else{h().then(v)}return o}}}//# sourceMappingURL=retryer.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/removable.js
// src/removable.ts
var W=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout();if(p(this.gcTime)){this.#i=setTimeout(()=>{this.optionalRemove()},this.gcTime)}}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(u?Infinity:5*60*1e3))}clearGcTimeout(){if(this.#i){clearTimeout(this.#i);this.#i=void 0}}};//# sourceMappingURL=removable.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/query.js
// src/query.ts
var G=class extends W{#o;#a;#s;#l;#c;#u;constructor(e){super();this.#u=false;this.#c=e.defaultOptions;this.setOptions(e.options);this.observers=[];this.#s=e.cache;this.queryKey=e.queryKey;this.queryHash=e.queryHash;this.#o=Q(this.options);this.state=e.state??this.#o;this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#c,...e};this.updateGcTime(this.options.gcTime)}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle"){this.#s.remove(this)}}setData(e,t){const r=O(this.state.data,e,this.options);this.#d({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual});return r}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#l?.promise;this.#l?.cancel(e);return t?t.then(d).catch(d):Promise.resolve()}destroy(){super.destroy();this.cancel({silent:true})}reset(){this.destroy();this.setState(this.#o)}isActive(){return this.observers.some(e=>m(e.options.enabled,this)!==false)}isDisabled(){if(this.getObserversCount()>0){return!this.isActive()}return this.options.queryFn===D||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){if(this.state.isInvalidated){return true}if(this.getObserversCount()>0){return this.observers.some(e=>e.getCurrentResult().isStale)}return this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!h(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:false});this.#l?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:false});this.#l?.continue()}addObserver(e){if(!this.observers.includes(e)){this.observers.push(e);this.clearGcTimeout();this.#s.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.#l){if(this.#u){this.#l.cancel({revert:true})}else{this.#l.cancelRetry()}}this.scheduleGc()}this.#s.notify({type:"observerRemoved",query:this,observer:e})}}getObserversCount(){return this.observers.length}invalidate(){if(!this.state.isInvalidated){this.#d({type:"invalidate"})}}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch){this.cancel({silent:true})}else if(this.#l){this.#l.continueRetry();return this.#l.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 n=e=>{Object.defineProperty(e,"signal",{enumerable:true,get:()=>{this.#u=true;return r.signal}})};const i=()=>{const e=F(this.options,t);const r={queryKey:this.queryKey,meta:this.meta};n(r);this.#u=false;if(this.options.persister){return this.options.persister(e,r,this)}return e(r)};const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};n(o);this.options.behavior?.onFetch(o,this);this.#a=this.state;if(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta){this.#d({type:"fetch",meta:o.fetchOptions?.meta})}const a=e=>{if(!(z(e)&&e.silent)){this.#d({type:"error",error:e})}if(!z(e)){this.#s.config.onError?.(e,this);this.#s.config.onSettled?.(this.state.data,e,this)}this.scheduleGc()};this.#l=q({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(e===void 0){if(false){}a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){a(e);return}this.#s.config.onSuccess?.(e,this);this.#s.config.onSettled?.(e,this.state.error,this);this.scheduleGc()},onError:a,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>true});return this.#l.start()}#d(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,...$(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:false,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;if(z(r)&&r.revert&&this.#a){return{...this.#a,fetchStatus:"idle"}}return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:true};case"setState":return{...t,...e.state}}};this.state=t(this.state);M.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()});this.#s.notify({query:this,type:"updated",action:e})})}};function $(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:K(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Q(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
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/queryCache.js
// src/queryCache.ts
var X=class extends j{constructor(e={}){super();this.config=e;this.#f=/* @__PURE__ */new Map}#f;build(e,t,r){const n=t.queryKey;const i=t.queryHash??_(n,t);let o=this.get(i);if(!o){o=new G({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)});this.add(o)}return o}add(e){if(!this.#f.has(e.queryHash)){this.#f.set(e.queryHash,e);this.notify({type:"added",query:e})}}remove(e){const t=this.#f.get(e.queryHash);if(t){e.destroy();if(t===e){this.#f.delete(e.queryHash)}this.notify({type:"removed",query:e})}}clear(){M.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#f.get(e)}getAll(){return[...this.#f.values()]}find(e){const t={exact:true,...e};return this.getAll().find(e=>g(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>g(e,t)):t}notify(e){M.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){M.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){M.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};//# sourceMappingURL=queryCache.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/mutation.js
// src/mutation.ts
var J=class extends W{#p;#h;#l;constructor(e){super();this.mutationId=e.mutationId;this.#h=e.mutationCache;this.#p=[];this.state=e.state||Z();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.#p.includes(e)){this.#p.push(e);this.clearGcTimeout();this.#h.notify({type:"observerAdded",mutation:this,observer:e})}}removeObserver(e){this.#p=this.#p.filter(t=>t!==e);this.scheduleGc();this.#h.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){if(!this.#p.length){if(this.state.status==="pending"){this.scheduleGc()}else{this.#h.remove(this)}}}continue(){return this.#l?.continue()??// continuing a mutation assumes that variables are set, mutation must have been dehydrated before
this.execute(this.state.variables)}async execute(e){this.#l=q({fn:()=>{if(!this.options.mutationFn){return Promise.reject(new Error("No mutationFn found"))}return this.options.mutationFn(e)},onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#h.canRun(this)});const t=this.state.status==="pending";const r=!this.#l.canStart();try{if(!t){this.#d({type:"pending",variables:e,isPaused:r});await this.#h.config.onMutate?.(e,this);const t=await this.options.onMutate?.(e);if(t!==this.state.context){this.#d({type:"pending",context:t,variables:e,isPaused:r})}}const n=await this.#l.start();await this.#h.config.onSuccess?.(n,e,this.state.context,this);await this.options.onSuccess?.(n,e,this.state.context);await this.#h.config.onSettled?.(n,null,this.state.variables,this.state.context,this);await this.options.onSettled?.(n,null,e,this.state.context);this.#d({type:"success",data:n});return n}catch(t){try{await this.#h.config.onError?.(t,e,this.state.context,this);await this.options.onError?.(t,e,this.state.context);await this.#h.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this);await this.options.onSettled?.(void 0,t,e,this.state.context);throw t}finally{this.#d({type:"error",error:t})}}finally{this.#h.runNext(this)}}#d(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);M.batch(()=>{this.#p.forEach(t=>{t.onMutationUpdate(e)});this.#h.notify({mutation:this,type:"updated",action:e})})}};function Z(){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
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/mutationCache.js
// src/mutationCache.ts
var ee=class extends j{constructor(e={}){super();this.config=e;this.#v=/* @__PURE__ */new Set;this.#m=/* @__PURE__ */new Map;this.#g=0}#v;#m;#g;build(e,t,r){const n=new J({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:r});this.add(n);return n}add(e){this.#v.add(e);const t=et(e);if(typeof t==="string"){const r=this.#m.get(t);if(r){r.push(e)}else{this.#m.set(t,[e])}}this.notify({type:"added",mutation:e})}remove(e){if(this.#v.delete(e)){const t=et(e);if(typeof t==="string"){const r=this.#m.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.#m.delete(t)}}}}this.notify({type:"removed",mutation:e})}canRun(e){const t=et(e);if(typeof t==="string"){const r=this.#m.get(t);const n=r?.find(e=>e.state.status==="pending");return!n||n===e}else{return true}}runNext(e){const t=et(e);if(typeof t==="string"){const r=this.#m.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}else{return Promise.resolve()}}clear(){M.batch(()=>{this.#v.forEach(e=>{this.notify({type:"removed",mutation:e})});this.#v.clear();this.#m.clear()})}getAll(){return Array.from(this.#v)}find(e){const t={exact:true,...e};return this.getAll().find(e=>b(t,e))}findAll(e={}){return this.getAll().filter(t=>b(e,t))}notify(e){M.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return M.batch(()=>Promise.all(e.map(e=>e.continue().catch(d))))}};function et(e){return e.options.scope?.id}//# sourceMappingURL=mutationCache.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
// src/infiniteQueryBehavior.ts
function er(e){return{onFetch:(t,r)=>{const n=t.options;const i=t.fetchOptions?.meta?.fetchMore?.direction;const o=t.state.data?.pages||[];const a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]};let l=0;const c=async()=>{let r=false;const c=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 u=F(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 o={queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};c(o);const a=await u(o);const{maxPages:s}=t.options;const l=i?R:C;return{pages:l(e.pages,a,s),pageParams:l(e.pageParams,n,s)}};if(i&&o.length){const e=i==="backward";const t=e?ei:en;const r={pages:o,pageParams:a};const l=t(n,r);s=await d(r,l,e)}else{const t=e??o.length;do{const e=l===0?a[0]??n.initialPageParam:en(n,s);if(l>0&&e==null){break}s=await d(s,e);l++}while(l<t)}return s};if(t.options.persister){t.fetchFn=()=>{return t.options.persister?.(c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}}else{t.fetchFn=c}}}}function en(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 ei(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function eo(e,t){if(!t)return false;return en(e,t)!=null}function ea(e,t){if(!t||!e.getPreviousPageParam)return false;return ei(e,t)!=null}//# sourceMappingURL=infiniteQueryBehavior.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/queryClient.js
// src/queryClient.ts
var es=class{#b;#h;#c;#_;#y;#x;#w;#A;constructor(e={}){this.#b=e.queryCache||new X;this.#h=e.mutationCache||new ee;this.#c=e.defaultOptions||{};this.#_=/* @__PURE__ */new Map;this.#y=/* @__PURE__ */new Map;this.#x=0}mount(){this.#x++;if(this.#x!==1)return;this.#w=L.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#b.onFocus()}});this.#A=H.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#b.onOnline()}})}unmount(){this.#x--;if(this.#x!==0)return;this.#w?.();this.#w=void 0;this.#A?.();this.#A=void 0}isFetching(e){return this.#b.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#h.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#b.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e);const r=this.#b.build(this,t);const n=r.state.data;if(n===void 0){return this.fetchQuery(e)}if(e.revalidateIfStale&&r.isStaleByTime(v(t.staleTime,r))){void this.prefetchQuery(t)}return Promise.resolve(n)}getQueriesData(e){return this.#b.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.#b.get(n.queryHash);const o=i?.state.data;const a=f(t,o);if(a===void 0){return void 0}return this.#b.build(this,n).setData(a,{...r,manual:true})}setQueriesData(e,t,r){return M.batch(()=>this.#b.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#b.get(t.queryHash)?.state}removeQueries(e){const t=this.#b;M.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#b;const n={type:"active",...e};return M.batch(()=>{r.findAll(e).forEach(e=>{e.reset()});return this.refetchQueries(n,t)})}cancelQueries(e,t={}){const r={revert:true,...t};const n=M.batch(()=>this.#b.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(d).catch(d)}invalidateQueries(e,t={}){return M.batch(()=>{this.#b.findAll(e).forEach(e=>{e.invalidate()});if(e?.refetchType==="none"){return Promise.resolve()}const r={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??true};const n=M.batch(()=>this.#b.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,r);if(!r.throwOnError){t=t.catch(d)}return e.state.fetchStatus==="paused"?Promise.resolve():t}));return Promise.all(n).then(d)}fetchQuery(e){const t=this.defaultQueryOptions(e);if(t.retry===void 0){t.retry=false}const r=this.#b.build(this,t);return r.isStaleByTime(v(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(d).catch(d)}fetchInfiniteQuery(e){e.behavior=er(e.pages);return this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(d).catch(d)}ensureInfiniteQueryData(e){e.behavior=er(e.pages);return this.ensureQueryData(e)}resumePausedMutations(){if(H.isOnline()){return this.#h.resumePausedMutations()}return Promise.resolve()}getQueryCache(){return this.#b}getMutationCache(){return this.#h}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#_.set(y(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#_.values()];const r={};t.forEach(t=>{if(x(e,t.queryKey)){Object.assign(r,t.defaultOptions)}});return r}setMutationDefaults(e,t){this.#y.set(y(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#y.values()];let r={};t.forEach(t=>{if(x(e,t.mutationKey)){r={...r,...t.defaultOptions}}});return r}defaultQueryOptions(e){if(e._defaulted){return e}const t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:true};if(!t.queryHash){t.queryHash=_(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===D){t.enabled=false}return t}defaultMutationOptions(e){if(e?._defaulted){return e}return{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:true}}clear(){this.#b.clear();this.#h.clear()}};//# sourceMappingURL=queryClient.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
var el=r(6070);// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js
"use client";// src/QueryClientProvider.tsx
var ec=n.createContext(void 0);var eu=e=>{const t=n.useContext(ec);if(e){return e}if(!t){throw new Error("No QueryClient set, use QueryClientProvider to set one")}return t};var ed=({client:e,children:t})=>{n.useEffect(()=>{e.mount();return()=>{e.unmount()}},[e]);return/* @__PURE__ */(0,el.jsx)(ec.Provider,{value:e,children:t})};//# sourceMappingURL=QueryClientProvider.js.map
// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js + 1 modules
var ef=r(33);// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread_props.js
var ep=r(1303);// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_tagged_template_literal.js
var eh=r(690);// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@react-spring+rafz@9.7.5/node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.mjs
// src/index.ts
var ev=eD();var em=e=>eS(e,ev);var eg=eD();em.write=e=>eS(e,eg);var eb=eD();em.onStart=e=>eS(e,eb);var e_=eD();em.onFrame=e=>eS(e,e_);var ey=eD();em.onFinish=e=>eS(e,ey);var ex=[];em.setTimeout=(e,t)=>{const r=em.now()+t;const n=()=>{const e=ex.findIndex(e=>e.cancel==n);if(~e)ex.splice(e,1);eI-=~e?1:0};const i={time:r,handler:e,cancel:n};ex.splice(ew(r),0,i);eI+=1;eO();return i};var ew=e=>~(~ex.findIndex(t=>t.time>e)||~ex.length);em.cancel=e=>{eb.delete(e);e_.delete(e);ey.delete(e);ev.delete(e);eg.delete(e)};em.sync=e=>{ek=true;em.batchedUpdates(e);ek=false};em.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...e){t=e;em.onStart(r)}n.handler=e;n.cancel=()=>{eb.delete(r);t=null};return n};var eA=typeof window!="undefined"?window.requestAnimationFrame:// eslint-disable-next-line @typescript-eslint/no-empty-function
()=>{};em.use=e=>eA=e;em.now=typeof performance!="undefined"?()=>performance.now():Date.now;em.batchedUpdates=e=>e();em.catch=console.error;em.frameLoop="always";em.advance=()=>{if(em.frameLoop!=="demand"){console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand")}else{eR()}};var eE=-1;var eI=0;var ek=false;function eS(e,t){if(ek){t.delete(e);e(0)}else{t.add(e);eO()}}function eO(){if(eE<0){eE=0;if(em.frameLoop!=="demand"){eA(eC)}}}function eT(){eE=-1}function eC(){if(~eE){eA(eC);em.batchedUpdates(eR)}}function eR(){const e=eE;eE=em.now();const t=ew(eE);if(t){eF(ex.splice(0,t),e=>e.handler());eI-=t}if(!eI){eT();return}eb.flush();ev.flush(e?Math.min(64,eE-e):16.667);e_.flush();eg.flush();ey.flush()}function eD(){let e=/* @__PURE__ */new Set;let t=e;return{add(r){eI+=t==e&&!e.has(r)?1:0;e.add(r)},delete(r){eI-=t==e&&e.has(r)?1:0;return e.delete(r)},flush(r){if(t.size){e=/* @__PURE__ */new Set;eI-=t.size;eF(t,t=>t(r)&&e.add(t));eI+=e.size;t=e}}}}function eF(e,t){e.forEach(e=>{try{t(e)}catch(e){em.catch(e)}})}var eY=/* unused pure expression or super */null&&{/** The number of pending tasks */count(){return eI},/** Whether there's a raf update loop running */isRunning(){return eE>=0},/** Clear internal state. Never call from update loop! */clear(){eE=-1;ex=[];eb=eD();ev=eD();e_=eD();eg=eD();ey=eD();eI=0}};//# sourceMappingURL=react-spring_rafz.modern.mjs.map
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@react-spring+shared@9.7.5_react@18.3.1/node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs
var eM=Object.defineProperty;var ej=(e,t)=>{for(var r in t)eM(e,r,{get:t[r],enumerable:true})};// src/globals.ts
var eP={};ej(eP,{assign:()=>eZ,colors:()=>eQ,createStringInterpolator:()=>eG,skipAnimation:()=>eX,to:()=>e$,willAdvance:()=>eJ});// src/helpers.ts
function eL(){}var eN=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});var eH={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 eV(e,t){if(eH.arr(e)){if(!eH.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 eU=(e,t)=>e.forEach(t);function eK(e,t,r){if(eH.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 eB=e=>eH.und(e)?[]:eH.arr(e)?e:[e];function ez(e,t){if(e.size){const r=Array.from(e);e.clear();eU(r,t)}}var eq=(e,...t)=>ez(e,e=>e(...t));var eW=()=>typeof window==="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);// src/globals.ts
var eG;var e$;var eQ=null;var eX=false;var eJ=eL;var eZ=e=>{if(e.to)e$=e.to;if(e.now)em.now=e.now;if(e.colors!==void 0)eQ=e.colors;if(e.skipAnimation!=null)eX=e.skipAnimation;if(e.createStringInterpolator)eG=e.createStringInterpolator;if(e.requestAnimationFrame)em.use(e.requestAnimationFrame);if(e.batchedUpdates)em.batchedUpdates=e.batchedUpdates;if(e.willAdvance)eJ=e.willAdvance;if(e.frameLoop)em.frameLoop=e.frameLoop};// src/FrameLoop.ts
var e0=/* @__PURE__ */new Set;var e1=[];var e2=[];var e6=0;var e4={get idle(){return!e0.size&&!e1.length},/** Advance the given animation on every frame until idle. */start(e){if(e6>e.priority){e0.add(e);em.onStart(e5)}else{e3(e);em(e9)}},/** Advance all animations by the given time. */advance:e9,/** Call this when an animation's priority changes. */sort(e){if(e6){em.onFrame(()=>e4.sort(e))}else{const t=e1.indexOf(e);if(~t){e1.splice(t,1);e8(e)}}},/**
   * Clear all animations. For testing purposes.
   *
   * ☠️ Never call this from within the frameloop.
   */clear(){e1=[];e0.clear()}};function e5(){e0.forEach(e3);e0.clear();em(e9)}function e3(e){if(!e1.includes(e))e8(e)}function e8(e){e1.splice(e7(e1,t=>t.priority>e.priority),0,e)}function e9(e){const t=e2;for(let r=0;r<e1.length;r++){const n=e1[r];e6=n.priority;if(!n.idle){eJ(n);n.advance(e);if(!n.idle){t.push(n)}}}e6=0;e2=e1;e2.length=0;e1=t;return e1.length>0}function e7(e,t){const r=e.findIndex(t);return r<0?e.length:r}// src/clamp.ts
var te=(e,t,r)=>Math.min(Math.max(r,e),t);// src/colors.ts
var tt={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 tr="[-+]?\\d*\\.?\\d+";var tn=tr+"%";function ti(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var to=new RegExp("rgb"+ti(tr,tr,tr));var ta=new RegExp("rgba"+ti(tr,tr,tr,tr));var ts=new RegExp("hsl"+ti(tr,tn,tn));var tl=new RegExp("hsla"+ti(tr,tn,tn,tr));var tc=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var tu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var td=/^#([0-9a-fA-F]{6})$/;var tf=/^#([0-9a-fA-F]{8})$/;// src/normalizeColor.ts
function tp(e){let t;if(typeof e==="number"){return e>>>0===e&&e>=0&&e<=0xffffffff?e:null}if(t=td.exec(e))return parseInt(t[1]+"ff",16)>>>0;if(eQ&&eQ[e]!==void 0){return eQ[e]}if(t=to.exec(e)){return(tm(t[1])<<24|// r
tm(t[2])<<16|// g
tm(t[3])<<8|// b
255)>>>// a
0}if(t=ta.exec(e)){return(tm(t[1])<<24|// r
tm(t[2])<<16|// g
tm(t[3])<<8|// b
tb(t[4]))>>>// a
0}if(t=tc.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=tf.exec(e))return parseInt(t[1],16)>>>0;if(t=tu.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=ts.exec(e)){return(tv(tg(t[1]),// h
t_(t[2]),// s
t_(t[3]))|255)>>>// a
0}if(t=tl.exec(e)){return(tv(tg(t[1]),// h
t_(t[2]),// s
t_(t[3]))|tb(t[4]))>>>// a
0}return null}function th(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 tv(e,t,r){const n=r<.5?r*(1+t):r+t-r*t;const i=2*r-n;const o=th(i,n,e+1/3);const a=th(i,n,e);const s=th(i,n,e-1/3);return Math.round(o*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function tm(e){const t=parseInt(e,10);if(t<0)return 0;if(t>255)return 255;return t}function tg(e){const t=parseFloat(e);return(t%360+360)%360/360}function tb(e){const t=parseFloat(e);if(t<0)return 0;if(t>1)return 255;return Math.round(t*255)}function t_(e){const t=parseFloat(e);if(t<0)return 0;if(t>100)return 1;return t/100}// src/colorToRgba.ts
function ty(e){let t=tp(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 o=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${o})`}// src/createInterpolator.ts
var tx=(e,t,r)=>{if(eH.fun(e)){return e}if(eH.arr(e)){return tx({range:e,output:t,extrapolate:r})}if(eH.str(e.output[0])){return eG(e)}const n=e;const i=n.output;const o=n.range||[0,1];const a=n.extrapolateLeft||n.extrapolate||"extend";const s=n.extrapolateRight||n.extrapolate||"extend";const l=n.easing||(e=>e);return e=>{const t=tA(e,o);return tw(e,o[t],o[t+1],i[t],i[t+1],l,a,s,n.map)}};function tw(e,t,r,n,i,o,a,s,l){let c=l?l(e):e;if(c<t){if(a==="identity")return c;else if(a==="clamp")c=t}if(c>r){if(s==="identity")return c;else if(s==="clamp")c=r}if(n===i)return n;if(t===r)return e<=t?n:i;if(t===-Infinity)c=-c;else if(r===Infinity)c=c-t;else c=(c-t)/(r-t);c=o(c);if(n===-Infinity)c=-c;else if(i===Infinity)c=c+n;else c=c*(i-n)+n;return c}function tA(e,t){for(var r=1;r<t.length-1;++r)if(t[r]>=e)break;return r-1}// src/easings.ts
var tE=(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 te(0,1,i/e)};var tI=1.70158;var tk=tI*1.525;var tS=tI+1;var tO=2*Math.PI/3;var tT=2*Math.PI/4.5;var tC=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 tR={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=>tS*e*e*e-tI*e*e,easeOutBack:e=>1+tS*Math.pow(e-1,3)+tI*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((tk+1)*2*e-tk)/2:(Math.pow(2*e-2,2)*((tk+1)*(e*2-2)+tk)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*tO),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*tO)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*tT))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*tT)/2+1,easeInBounce:e=>1-tC(1-e),easeOutBounce:tC,easeInOutBounce:e=>e<.5?(1-tC(1-2*e))/2:(1+tC(2*e-1))/2,steps:tE};// src/fluids.ts
var tD=Symbol.for("FluidValue.get");var tF=Symbol.for("FluidValue.observers");var tY=e=>Boolean(e&&e[tD]);var tM=e=>e&&e[tD]?e[tD]():e;var tj=e=>e[tF]||null;function tP(e,t){if(e.eventObserved){e.eventObserved(t)}else{e(t)}}function tL(e,t){const r=e[tF];if(r){r.forEach(e=>{tP(e,t)})}}var tN=class{constructor(e){if(!e&&!(e=this.get)){throw Error("Unknown getter")}tH(this,e)}};tD,tF;var tH=(e,t)=>tK(e,tD,t);function tV(e,t){if(e[tD]){let r=e[tF];if(!r){tK(e,tF,r=/* @__PURE__ */new Set)}if(!r.has(t)){r.add(t);if(e.observerAdded){e.observerAdded(r.size,t)}}}return t}function tU(e,t){const r=e[tF];if(r&&r.has(t)){const n=r.size-1;if(n){r.delete(t)}else{e[tF]=null}if(e.observerRemoved){e.observerRemoved(n,t)}}}var tK=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});// src/regexs.ts
var tB=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var tz=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;var tq=new RegExp(`(${tB.source})(%|[a-z]+)`,"i");var tW=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;var tG=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;// src/variableToRgba.ts
var t$=e=>{const[t,r]=tQ(e);if(!t||eW()){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&&tG.test(r)){return t$(r)}else if(r){return r}return e};var tQ=e=>{const t=tG.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]};// src/stringInterpolation.ts
var tX;var tJ=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`;var tZ=e=>{if(!tX)tX=eQ?// match color names, ignore partial matches
new RegExp(`(${Object.keys(eQ).join("|")})(?!\\w)`,"g"):// never match
/^\b$/;const t=e.output.map(e=>{return tM(e).replace(tG,t$).replace(tz,ty).replace(tX,ty)});const r=t.map(e=>e.match(tB).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=>tx({...e,output:t}));return e=>{const r=!tq.test(t[0])&&t.find(e=>tq.test(e))?.replace(tB,"");let n=0;return t[0].replace(tB,()=>`${i[n++](e)}${r||""}`).replace(tW,tJ)}};// src/deprecations.ts
var t0="react-spring: ";var t1=e=>{const t=e;let r=false;if(typeof t!="function"){throw new TypeError(`${t0}once requires a function parameter`)}return(...e)=>{if(!r){t(...e);r=true}}};var t2=t1(console.warn);function t6(){t2(`${t0}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var t4=t1(console.warn);function t5(){t4(`${t0}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 t3(e){return eH.str(e)&&(e[0]=="#"||/\d/.test(e)||// Do not identify a CSS variable as an AnimatedString if its SSR
!eW()&&tG.test(e)||e in(eQ||{}))}// src/dom-events/scroll/index.ts
// src/dom-events/resize/resizeElement.ts
var t8;var t9=/* @__PURE__ */new WeakMap;var t7=e=>e.forEach(({target:e,contentRect:t})=>{return t9.get(e)?.forEach(e=>e(t))});function re(e,t){if(!t8){if(typeof ResizeObserver!=="undefined"){t8=new ResizeObserver(t7)}}let r=t9.get(t);if(!r){r=/* @__PURE__ */new Set;t9.set(t,r)}r.add(e);if(t8){t8.observe(t)}return()=>{const r=t9.get(t);if(!r)return;r.delete(e);if(!r.size&&t8){t8.unobserve(t)}}}// src/dom-events/resize/resizeWindow.ts
var rt=/* @__PURE__ */new Set;var rr;var rn=()=>{const e=()=>{rt.forEach(e=>e({width:window.innerWidth,height:window.innerHeight}))};window.addEventListener("resize",e);return()=>{window.removeEventListener("resize",e)}};var ri=e=>{rt.add(e);if(!rr){rr=rn()}return()=>{rt.delete(e);if(!rt.size&&rr){rr();rr=void 0}}};// src/dom-events/resize/index.ts
var ro=(e,{container:t=document.documentElement}={})=>{if(t===document.documentElement){return ri(e)}else{return re(e,t)}};// src/progress.ts
var ra=(e,t,r)=>t-e===0?1:(r-e)/(t-e);// src/dom-events/scroll/ScrollHandler.ts
var rs=/* unused pure expression or super */null&&{x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};var rl=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}=rs[e];t.current=this.container[`scroll${n}`];t.scrollLength=this.container[`scroll${r}`]-this.container[`client${r}`];t.progress=ra(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 rc=/* @__PURE__ */new WeakMap;var ru=/* @__PURE__ */new WeakMap;var rd=/* @__PURE__ */new WeakMap;var rf=e=>e===document.documentElement?window:e;var rp=(e,{container:t=document.documentElement}={})=>{let r=rd.get(t);if(!r){r=/* @__PURE__ */new Set;rd.set(t,r)}const n=new rl(e,t);r.add(n);if(!rc.has(t)){const e=()=>{r?.forEach(e=>e.advance());return true};rc.set(t,e);const n=rf(t);window.addEventListener("resize",e,{passive:true});if(t!==document.documentElement){ru.set(t,ro(e,{container:t}))}n.addEventListener("scroll",e,{passive:true})}const i=rc.get(t);raf3(i);return()=>{raf3.cancel(i);const e=rd.get(t);if(!e)return;e.delete(n);if(e.size)return;const r=rc.get(t);rc.delete(t);if(r){rf(t).removeEventListener("scroll",r);window.removeEventListener("resize",r);ru.get(t)?.()}}};// src/hooks/useConstant.ts
function rh(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 rv=eW()?n.useEffect:n.useLayoutEffect;// src/hooks/useIsMounted.ts
var rm=()=>{const e=(0,n.useRef)(false);rv(()=>{e.current=true;return()=>{e.current=false}},[]);return e};// src/hooks/useForceUpdate.ts
function rg(){const e=(0,n.useState)()[1];const t=rm();return()=>{if(t.current){e(Math.random())}}}// src/hooks/useMemoOne.ts
function rb(e,t){const[r]=(0,n.useState)(()=>({inputs:t,result:e()}));const i=(0,n.useRef)();const o=i.current;let a=o;if(a){const r=Boolean(t&&a.inputs&&r_(t,a.inputs));if(!r){a={inputs:t,result:e()}}}else{a=r}(0,n.useEffect)(()=>{i.current=a;if(o==r){r.inputs=r.result=void 0}},[a]);return a.result}function r_(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 ry=e=>(0,n.useEffect)(e,rx);var rx=[];// src/hooks/usePrev.ts
function rw(e){const t=(0,n.useRef)();(0,n.useEffect)(()=>{t.current=e});return t.current}// src/hooks/useReducedMotion.ts
var rA=()=>{const[e,t]=useState3(null);rv(()=>{const e=window.matchMedia("(prefers-reduced-motion)");const r=e=>{t(e.matches);eZ({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
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@react-spring+animated@9.7.5_react@18.3.1/node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs
// src/Animated.ts
var rE=Symbol.for("Animated:node");var rI=e=>!!e&&e[rE]===e;var rk=e=>e&&e[rE];var rS=(e,t)=>eN(e,rE,t);var rO=e=>e&&e[rE]&&e[rE].getPayload();var rT=class{constructor(){rS(this,this)}/** Get every `AnimatedValue` used by this node. */getPayload(){return this.payload||[]}};// src/AnimatedValue.ts
var rC=class extends rT{constructor(e){super();this._value=e;this.done=true;this.durationProgress=0;if(eH.num(this._value)){this.lastPosition=this._value}}/** @internal */static create(e){return new rC(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){if(eH.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(eH.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 rR=class extends rC{constructor(e){super(0);this._string=null;this._toString=tx({output:[e,e]})}/** @internal */static create(e){return new rR(e)}getValue(){const e=this._string;return e==null?this._string=this._toString(this._value):e}setValue(e){if(eH.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=tx({output:[this.getValue(),e]})}this._value=0;super.reset()}};// src/AnimatedArray.ts
// src/AnimatedObject.ts
// src/context.ts
var rD={dependencies:null};// src/AnimatedObject.ts
var rF=class extends rT{constructor(e){super();this.source=e;this.setValue(e)}getValue(e){const t={};eK(this.source,(r,n)=>{if(rI(r)){t[n]=r.getValue(e)}else if(tY(r)){t[n]=tM(r)}else if(!e){t[n]=r}});return t}/** Replace the raw object data */setValue(e){this.source=e;this.payload=this._makePayload(e)}reset(){if(this.payload){eU(this.payload,e=>e.reset())}}/** Create a payload set. */_makePayload(e){if(e){const t=/* @__PURE__ */new Set;eK(e,this._addToPayload,t);return Array.from(t)}}/** Add to a payload set. */_addToPayload(e){if(rD.dependencies&&tY(e)){rD.dependencies.add(e)}const t=rO(e);if(t){eU(t,e=>this.add(e))}}};// src/AnimatedArray.ts
var rY=class extends rF{constructor(e){super(e)}/** @internal */static create(e){return new rY(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(rM));return true}};function rM(e){const t=t3(e)?rR:rC;return t.create(e)}// src/getAnimatedType.ts
function rj(e){const t=rk(e);return t?t.constructor:eH.arr(e)?rY:t3(e)?rR:rC}// src/createHost.ts
// src/withAnimated.tsx
var rP=(e,t)=>{const r=// Function components must use "forwardRef" to avoid being
// re-rendered on every animation frame.
!eH.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,n.forwardRef)((i,o)=>{const a=(0,n.useRef)(null);const s=r&&// eslint-disable-next-line react-hooks/rules-of-hooks
(0,n.useCallback)(e=>{a.current=rH(o,e)},[o]);const[l,c]=rN(i,t);const u=rg();const d=()=>{const e=a.current;if(r&&!e){return}const n=e?t.applyAnimatedValues(e,l.getValue(true)):false;if(n===false){u()}};const f=new rL(d,c);const p=(0,n.useRef)();rv(()=>{p.current=f;eU(c,e=>tV(e,f));return()=>{if(p.current){eU(p.current.deps,e=>tU(e,p.current));em.cancel(p.current.update)}}});(0,n.useEffect)(d,[]);ry(()=>()=>{const e=p.current;eU(e.deps,t=>tU(t,e))});const h=t.getComponentProps(l.getValue());return /* @__PURE__ */n.createElement(e,{...h,ref:s})})};var rL=class{constructor(e,t){this.update=e;this.deps=t}eventObserved(e){if(e.type=="change"){em.write(this.update)}}};function rN(e,t){const r=/* @__PURE__ */new Set;rD.dependencies=r;if(e.style)e={...e,style:t.createAnimatedStyle(e.style)};e=new rF(e);rD.dependencies=null;return[e,r]}function rH(e,t){if(e){if(eH.fun(e))e(t);else e.current=t}return t}// src/createHost.ts
var rV=Symbol.for("AnimatedComponent");var rU=(e,{applyAnimatedValues:t=()=>false,createAnimatedStyle:r=e=>new rF(e),getComponentProps:n=e=>e}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n};const o=e=>{const t=rK(e)||"Anonymous";if(eH.str(e)){e=o[e]||(o[e]=rP(e,i))}else{e=e[rV]||(e[rV]=rP(e,i))}e.displayName=`Animated(${t})`;return e};eK(e,(t,r)=>{if(eH.arr(e)){r=rK(t)}o[r]=o(t)});return{animated:o}};var rK=e=>eH.str(e)?e:e&&eH.str(e.displayName)?e.displayName:eH.fun(e)&&e.name||null;//# sourceMappingURL=react-spring_animated.modern.mjs.map
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@react-spring+core@9.7.5_react@18.3.1/node_modules/@react-spring/core/dist/react-spring_core.modern.mjs
// src/hooks/useChain.ts
// src/helpers.ts
function rB(e,...t){return eH.fun(e)?e(...t):e}var rz=(e,t)=>e===true||!!(t&&e&&(eH.fun(e)?e(t):eB(e).includes(t)));var rq=(e,t)=>eH.obj(e)?t&&e[t]:e;var rW=(e,t)=>e.default===true?e[t]:e.default?e.default[t]:void 0;var rG=e=>e;var r$=(e,t=rG)=>{let r=rQ;if(e.default&&e.default!==true){e=e.default;r=Object.keys(e)}const n={};for(const i of r){const r=t(e[i],i);if(!eH.und(r)){n[i]=r}}return n};var rQ=["config","onProps","onStart","onChange","onPause","onResume","onRest"];var rX={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 rJ(e){const t={};let r=0;eK(e,(e,n)=>{if(!rX[n]){t[n]=e;r++}});if(r){return t}}function rZ(e){const t=rJ(e);if(t){const r={to:t};eK(e,(e,n)=>n in t||(r[n]=e));return r}return{...e}}function r0(e){e=tM(e);return eH.arr(e)?e.map(r0):t3(e)?eP.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function r1(e){for(const t in e)return true;return false}function r2(e){return eH.fun(e)||eH.arr(e)&&eH.obj(e[0])}function r6(e,t){e.ref?.delete(e);t?.delete(e)}function r4(e,t){if(t&&e.ref!==t){e.ref?.delete(e);t.add(e);e.ref=t}}// src/hooks/useChain.ts
function r5(e,t,r=1e3){useIsomorphicLayoutEffect(()=>{if(t){let n=0;each(e,(e,i)=>{const o=e.current;if(o.length){let a=r*t[i];if(isNaN(a))a=n;else n=a;each(o,e=>{each(e.queue,e=>{const t=e.delay;e.delay=e=>a+rB(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 r3={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 r8={...r3.default,mass:1,damping:1,easing:tR.linear,clamp:false};var r9=class{constructor(){/**
     * The initial velocity of one or more values.
     *
     * @default 0
     */this.velocity=0;Object.assign(this,r8)}};function r7(e,t,r){if(r){r={...r};ne(r,t);t={...r,...t}}ne(e,t);Object.assign(e,t);for(const t in r8){if(e[t]==null){e[t]=r8[t]}}let{frequency:n,damping:i}=e;const{mass:o}=e;if(!eH.und(n)){if(n<.01)n=.01;if(i<0)i=0;e.tension=Math.pow(2*Math.PI/n,2)*o;e.friction=4*Math.PI*i*o/n}return e}function ne(e,t){if(!eH.und(t.decay)){e.duration=void 0}else{const r=!eH.und(t.tension)||!eH.und(t.friction);if(r||!eH.und(t.frequency)||!eH.und(t.damping)||!eH.und(t.mass)){e.duration=void 0;e.decay=void 0}if(r){e.frequency=void 0}}}// src/Animation.ts
var nt=[];var nr=class{constructor(){this.changed=false;this.values=nt;this.toValues=null;this.fromValues=nt;this.config=new r9;this.immediate=false}};// src/scheduleProps.ts
function nn(e,{key:t,props:r,defaultProps:n,state:i,actions:o}){return new Promise((a,s)=>{let l;let c;let u=rz(r.cancel??n?.cancel,t);if(u){p()}else{if(!eH.und(r.pause)){i.paused=rz(r.pause,t)}let e=n?.pause;if(e!==true){e=i.paused||rz(e,t)}l=rB(r.delay||0,t);if(e){i.resumeQueue.add(f);o.pause()}else{o.resume();f()}}function d(){i.resumeQueue.add(f);i.timeouts.delete(c);c.cancel();l=c.time-em.now()}function f(){if(l>0&&!eP.skipAnimation){i.delayed=true;c=em.setTimeout(p,l);i.pauseQueue.add(d);i.timeouts.add(c)}else{p()}}function p(){if(i.delayed){i.delayed=false}i.pauseQueue.delete(d);i.timeouts.delete(c);if(e<=(i.cancelId||0)){u=true}try{o.start({...r,callId:e,cancel:u},a)}catch(e){s(e)}}})}// src/runAsync.ts
// src/AnimationResult.ts
var ni=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?ns(e.get()):t.every(e=>e.noop)?no(e.get()):na(e.get(),t.every(e=>e.finished));var no=e=>({value:e,noop:true,finished:true,cancelled:false});var na=(e,t,r=false)=>({value:e,finished:t,cancelled:r});var ns=e=>({value:e,cancelled:true,finished:false});// src/runAsync.ts
function nl(e,t,r,n){const{callId:i,parentId:o,onRest:a}=t;const{asyncTo:s,promise:l}=r;if(!o&&e===s&&!t.reset){return l}return r.promise=(async()=>{r.asyncId=i;r.asyncTo=e;const c=r$(t,(e,t)=>// The `onRest` prop is only called when the `runAsync` promise is resolved.
    t==="onRest"?void 0:e);let u;let d;const f=new Promise((e,t)=>(u=e,d=t));const p=e=>{const t=// The `cancel` prop or `stop` method was used.
i<=(r.cancelId||0)&&ns(n)||// The async `to` prop was replaced.
i!==r.asyncId&&na(n,false);if(t){e.result=t;d(e);throw e}};const h=(e,t)=>{const o=new nu;const a=new nd;return(async()=>{if(eP.skipAnimation){nc(r);a.result=na(n,false);d(a);throw a}p(o);const s=eH.obj(e)?{...e}:{...t,to:e};s.parentId=i;eK(c,(e,t)=>{if(eH.und(s[t])){s[t]=e}});const l=await n.start(s);p(o);if(r.paused){await new Promise(e=>{r.resumeQueue.add(e)})}return l})()};let v;if(eP.skipAnimation){nc(r);return na(n,false)}try{let t;if(eH.arr(e)){t=(async e=>{for(const t of e){await h(t)}})(e)}else{t=Promise.resolve(e(h,n.stop.bind(n)))}await Promise.all([t.then(u),f]);v=na(n.get(),true,false)}catch(e){if(e instanceof nu){v=e.result}else if(e instanceof nd){v=e.result}else{throw e}}finally{if(i==r.asyncId){r.asyncId=o;r.asyncTo=o?s:void 0;r.promise=o?l:void 0}}if(eH.fun(a)){em.batchedUpdates(()=>{a(v,n,n.item)})}return v})()}function nc(e,t){ez(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 nu=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 nd=class extends Error{constructor(){super("SkipAnimationSignal")}};// src/FrameValue.ts
var nf=e=>e instanceof nh;var np=1;var nh=class extends tN{constructor(){super(...arguments);this.id=np++;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=rk(this);return e&&e.getValue()}/** Create a spring that maps our value to another value */to(...e){return eP.to(this,e)}/** @deprecated Use the `to` method instead. */interpolate(...e){t6();return eP.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){tL(this,{type:"change",parent:this,value:e,idle:t})}/** Tell our children about our new priority */_onPriorityChange(e){if(!this.idle){e4.sort(this)}tL(this,{type:"priority",parent:this,priority:e})}};// src/SpringPhase.ts
var nv=Symbol.for("SpringPhase");var nm=1;var ng=2;var nb=4;var n_=e=>(e[nv]&nm)>0;var ny=e=>(e[nv]&ng)>0;var nx=e=>(e[nv]&nb)>0;var nw=(e,t)=>t?e[nv]|=ng|nm:e[nv]&=~ng;var nA=(e,t)=>t?e[nv]|=nb:e[nv]&=~nb;// src/SpringValue.ts
var nE=class extends nh{constructor(e,t){super();/** The animation state */this.animation=new nr;/** 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(!eH.und(e)||!eH.und(t)){const r=eH.obj(e)?{...e}:{...t,from:e};if(eH.und(r.default)){r.default=true}this.start(r)}}/** Equals true when not advancing on each frame. */get idle(){return!(ny(this)||this._state.asyncTo)||nx(this)}get goal(){return tM(this.animation.to)}get velocity(){const e=rk(this);return e instanceof rC?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}/**
   * When true, this value has been animated at least once.
   */get hasAnimated(){return n_(this)}/**
   * When true, this value has an unfinished animation,
   * which is either active or paused.
   */get isAnimating(){return ny(this)}/**
   * When true, all current and future animations are paused.
   */get isPaused(){return nx(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 n=this.animation;let{toValues:i}=n;const{config:o}=n;const a=rO(n.to);if(!a&&tY(n.to)){i=eB(tM(n.to))}n.values.forEach((s,l)=>{if(s.done)return;const c=// Animated strings always go from 0 to 1.
s.constructor==rR?1:a?a[l].lastPosition:i[l];let u=n.immediate;let d=c;if(!u){d=s.lastPosition;if(o.tension<=0){s.done=true;return}let t=s.elapsedTime+=e;const r=n.fromValues[l];const i=s.v0!=null?s.v0:s.v0=eH.arr(o.velocity)?o.velocity[l]:o.velocity;let a;const f=o.precision||(r==c?.005:Math.min(1,Math.abs(c-r)*.001));if(!eH.und(o.duration)){let n=1;if(o.duration>0){if(this._memoizedDuration!==o.duration){this._memoizedDuration=o.duration;if(s.durationProgress>0){s.elapsedTime=o.duration*s.durationProgress;t=s.elapsedTime+=e}}n=(o.progress||0)+t/this._memoizedDuration;n=n>1?1:n<0?0:n;s.durationProgress=n}d=r+o.easing(n)*(c-r);a=(d-s.lastPosition)/e;u=n==1}else if(o.decay){const e=o.decay===true?.998:o.decay;const n=Math.exp(-(1-e)*t);d=r+i/(1-e)*(1-n);u=Math.abs(s.lastPosition-d)<=f;a=i*n}else{a=s.lastVelocity==null?i:s.lastVelocity;const t=o.restVelocity||f/10;const n=o.clamp?0:o.bounce;const l=!eH.und(n);const p=r==c?s.v0>0:r<c;let h;let v=false;const m=1;const g=Math.ceil(e/m);for(let e=0;e<g;++e){h=Math.abs(a)>t;if(!h){u=Math.abs(c-d)<=f;if(u){break}}if(l){v=d==c||d>c==p;if(v){a=-a*n;d=c}}const e=-o.tension*1e-6*(d-c);const r=-o.friction*.001*a;const i=(e+r)/o.mass;a=a+i*m;d=d+a*m}}s.lastVelocity=a;if(Number.isNaN(d)){console.warn(`Got NaN while animating:`,this);u=true}}if(a&&!a[l].done){u=false}if(u){s.done=true}else{t=false}if(s.setValue(d,o.round)){r=true}});const s=rk(this);const l=s.getValue();if(t){const e=tM(n.to);if((l!==e||r)&&!o.decay){s.setValue(e);this._onChange(e)}else if(r&&o.decay){this._onChange(l)}this._stop()}else if(r){this._onChange(l)}}/** Set the current value, while stopping the current animation */set(e){em.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(ny(this)){const{to:e,config:t}=this.animation;em.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(!eH.und(e)){r=[eH.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=>ni(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());nc(this._state,e&&this._lastCallId);em.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:n}=e;r=eH.obj(r)?r[t]:r;if(r==null||r2(r)){r=void 0}n=eH.obj(n)?n[t]:n;if(n==null){n=void 0}const i={to:r,from:n};if(!n_(this)){if(e.reverse)[r,n]=[n,r];n=tM(n);if(!eH.und(n)){this._set(n)}else if(!rk(this)){this._set(r)}}return i}/** Every update is processed by this method before merging. */_update({...e},t){const{key:r,defaultProps:n}=this;if(e.default)Object.assign(n,r$(e,(e,t)=>/^on/.test(t)?rq(e,r):e));nR(this,e,"onProps");nD(this,"onProps",e,this);const i=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 nn(++this._lastCallId,{key:r,props:e,defaultProps:n,state:o,actions:{pause:()=>{if(!nx(this)){nA(this,true);eq(o.pauseQueue);nD(this,"onPause",na(this,nI(this,this.animation.to)),this)}},resume:()=>{if(nx(this)){nA(this,false);if(ny(this)){this._resume()}eq(o.resumeQueue);nD(this,"onResume",na(this,nI(this,this.animation.to)),this)}},start:this._merge.bind(this,i)}}).then(r=>{if(e.loop&&r.finished&&!(t&&r.noop)){const t=nk(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(ns(this))}const n=!eH.und(e.to);const i=!eH.und(e.from);if(n||i){if(t.callId>this._lastToId){this._lastToId=t.callId}else{return r(ns(this))}}const{key:o,defaultProps:a,animation:s}=this;const{to:l,from:c}=s;let{to:u=l,from:d=c}=e;if(i&&!n&&(!t.default||eH.und(u))){u=d}if(t.reverse)[u,d]=[d,u];const f=!eV(d,c);if(f){s.from=d}d=tM(d);const p=!eV(u,l);if(p){this._focus(u)}const h=r2(t.to);const{config:v}=s;const{decay:m,velocity:g}=v;if(n||i){v.velocity=0}if(t.config&&!h){r7(v,rB(t.config,o),// Avoid calling the same "config" prop twice.
t.config!==a.config?rB(a.config,o):void 0)}let b=rk(this);if(!b||eH.und(u)){return r(na(this,true))}const _=// 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.
eH.und(t.reset)?i&&!t.default:!eH.und(d)&&rz(t.reset,o);const y=_?d:this.get();const x=r0(u);const w=eH.num(x)||eH.arr(x)||t3(x);const A=!h&&(!w||rz(a.immediate||t.immediate,o));if(p){const e=rj(u);if(e!==b.constructor){if(A){b=this._set(x)}else throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`)}}const E=b.constructor;let I=tY(u);let k=false;if(!I){const e=_||!n_(this)&&f;if(p||e){k=eV(r0(y),x);I=!k}if(!eV(s.immediate,A)&&!A||!eV(v.decay,m)||!eV(v.velocity,g)){I=true}}if(k&&ny(this)){if(s.changed&&!_){I=true}else if(!I){this._stop(l)}}if(!h){if(I||tY(l)){s.values=b.getPayload();s.toValues=tY(u)?null:E==rR?[1]:eB(x)}if(s.immediate!=A){s.immediate=A;if(!A&&!_){this._set(l)}}if(I){const{onRest:e}=s;eU(nC,e=>nR(this,t,e));const n=na(this,nI(this,l));eq(this._pendingCalls,n);this._pendingCalls.add(r);if(s.changed)em.batchedUpdates(()=>{s.changed=!_;e?.(n,this);if(_){rB(a.onRest,n)}else{s.onStart?.(n,this)}})}}if(_){this._set(y)}if(h){r(nl(t.to,t,this._state,this))}else if(I){this._start()}else if(ny(this)&&!p){this._pendingCalls.add(r)}else{r(no(y))}}/** Update the `animation.to` value, which might be a `FluidValue` */_focus(e){const t=this.animation;if(e!==t.to){if(tj(this)){this._detach()}t.to=e;if(tj(this)){this._attach()}}}_attach(){let e=0;const{to:t}=this.animation;if(tY(t)){tV(t,this);if(nf(t)){e=t.priority+1}}this.priority=e}_detach(){const{to:e}=this.animation;if(tY(e)){tU(e,this)}}/**
   * Update the current value from outside the frameloop,
   * and return the `Animated` node.
   */_set(e,t=true){const r=tM(e);if(!eH.und(r)){const e=rk(this);if(!e||!eV(r,e.getValue())){const n=rj(r);if(!e||e.constructor!=n){rS(this,n.create(r))}else{e.setValue(r)}if(e){em.batchedUpdates(()=>{this._onChange(r,t)})}}}return rk(this)}_onStart(){const e=this.animation;if(!e.changed){e.changed=true;nD(this,"onStart",na(this,nI(this,e.to)),this)}}_onChange(e,t){if(!t){this._onStart();rB(this.animation.onChange,e,this)}rB(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;rk(this).reset(tM(e.to));if(!e.immediate){e.fromValues=e.values.map(e=>e.lastPosition)}if(!ny(this)){nw(this,true);if(!nx(this)){this._resume()}}}_resume(){if(eP.skipAnimation){this.finish()}else{e4.start(this)}}/**
   * Exit the frameloop and notify `onRest` listeners.
   *
   * Always wrap `_stop` calls with `batchedUpdates`.
   */_stop(e,t){if(ny(this)){nw(this,false);const r=this.animation;eU(r.values,e=>{e.done=true});if(r.toValues){r.onChange=r.onPause=r.onResume=void 0}tL(this,{type:"idle",parent:this});const n=t?ns(this.get()):na(this.get(),nI(this,e??r.to));eq(this._pendingCalls,n);if(r.changed){r.changed=false;nD(this,"onRest",n,this)}}}};function nI(e,t){const r=r0(t);const n=r0(e.get());return eV(n,r)}function nk(e,t=e.loop,r=e.to){const n=rB(t);if(n){const i=n!==true&&rZ(n);const o=(i||e).reverse;const a=!i||i.reset;return nS({...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:!o||r2(r)?r:void 0,// Ignore the "from" prop except on reset.
from:a?e.from:void 0,reset:a,// The "loop" prop can return a "useSpring" props object to
// override any of the original props.
...i})}}function nS(e){const{to:t,from:r}=e=rZ(e);const n=/* @__PURE__ */new Set;if(eH.obj(t))nT(t,n);if(eH.obj(r))nT(r,n);e.keys=n.size?Array.from(n):null;return e}function nO(e){const t=nS(e);if(eH.und(t.default)){t.default=r$(t)}return t}function nT(e,t){eK(e,(e,r)=>e!=null&&t.add(r))}var nC=["onStart","onRest","onChange","onPause","onResume"];function nR(e,t,r){e.animation[r]=t[r]!==rW(t,r)?rq(t[r],e.key):void 0}function nD(e,t,...r){e.animation[t]?.(...r);e.defaultProps[t]?.(...r)}// src/Controller.ts
var nF=["onStart","onChange","onRest"];var nY=1;var nM=class{constructor(e,t){this.id=nY++;/** 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(!eH.und(r)){this.springs[t].set(r)}}}/** Push an update onto the queue of each value. */update(e){if(e){this.queue.push(nS(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=eB(e).map(nS)}else{this.queue=[]}if(this._flush){return this._flush(this,t)}nU(this,t);return nj(this,t)}/** @internal */stop(e,t){if(e!==!!e){t=e}if(t){const r=this.springs;eU(eB(t),t=>r[t].stop(!!e))}else{nc(this._state,this._lastAsyncId);this.each(t=>t.stop(!!e))}return this}/** Freeze the active animation in time */pause(e){if(eH.und(e)){this.start({pause:true})}else{const t=this.springs;eU(eB(e),e=>t[e].pause())}return this}/** Resume the animation if paused. */resume(e){if(eH.und(e)){this.start({pause:false})}else{const t=this.springs;eU(eB(e),e=>t[e].resume())}return this}/** Call a function once per spring value */each(e){eK(this.springs,e)}/** @internal Called at the end of every animation frame */_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events;const n=this._active.size>0;const i=this._changed.size>0;if(n&&!this._started||i&&!this._started){this._started=true;ez(e,([e,t])=>{t.value=this.get();e(t,this,this._item)})}const o=!n&&this._started;const a=i||o&&r.size?this.get():null;if(i&&t.size){ez(t,([e,t])=>{t.value=a;e(t,this,this._item)})}if(o){this._started=false;ez(r,([e,t])=>{t.value=a;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;em.onFrame(this._onFrame)}};function nj(e,t){return Promise.all(t.map(t=>nP(e,t))).then(t=>ni(e,t))}async function nP(e,t,r){const{keys:n,to:i,from:o,loop:a,onRest:s,onResolve:l}=t;const c=eH.obj(t.default)&&t.default;if(a){t.loop=false}if(i===false)t.to=null;if(o===false)t.from=null;const u=eH.arr(i)||eH.fun(i)?i:void 0;if(u){t.to=void 0;t.onRest=void 0;if(c){c.onRest=void 0}}else{eU(nF,r=>{const n=t[r];if(eH.fun(n)){const i=e["_events"][r];t[r]=({finished:e,cancelled:t})=>{const r=i.get(n);if(r){if(!e)r.finished=false;if(t)r.cancelled=true}else{i.set(n,{value:null,finished:e||false,cancelled:t||false})}};if(c){c[r]=t[r]}}})}const d=e["_state"];if(t.pause===!d.paused){d.paused=t.pause;eq(t.pause?d.pauseQueue:d.resumeQueue)}else if(d.paused){t.pause=true}const f=(n||Object.keys(e.springs)).map(r=>e.springs[r].start(t));const p=t.cancel===true||rW(t,"cancel")===true;if(u||p&&d.asyncId){f.push(nn(++e["_lastAsyncId"],{props:t,state:d,actions:{pause:eL,resume:eL,start(t,r){if(p){nc(d,e["_lastAsyncId"]);r(ns(e))}else{t.onRest=s;r(nl(u,t,d,e))}}}}))}if(d.paused){await new Promise(e=>{d.resumeQueue.add(e)})}const h=ni(e,await Promise.all(f));if(a&&h.finished&&!(r&&h.noop)){const r=nk(t,a,i);if(r){nU(e,[r]);return nP(e,r,true)}}if(l){em.batchedUpdates(()=>l(h,e,e.item))}return h}function nL(e,t){const r={...e.springs};if(t){eU(eB(t),e=>{if(eH.und(e.keys)){e=nS(e)}if(!eH.obj(e.to)){e={...e,to:void 0}}nV(r,e,e=>{return nH(e)})})}nN(e,r);return r}function nN(e,t){eK(t,(t,r)=>{if(!e.springs[r]){e.springs[r]=t;tV(t,e)}})}function nH(e,t){const r=new nE;r.key=e;if(t){tV(r,t)}return r}function nV(e,t,r){if(t.keys){eU(t.keys,n=>{const i=e[n]||(e[n]=r(n));i["_prepareNode"](t)})}}function nU(e,t){eU(t,t=>{nV(e.springs,t,t=>{return nH(t,e)})})}// src/SpringContext.tsx
var nK=({children:e,...t})=>{const r=(0,n.useContext)(nB);const i=t.pause||!!r.pause,o=t.immediate||!!r.immediate;t=rb(()=>({pause:i,immediate:o}),[i,o]);const{Provider:a}=nB;return /* @__PURE__ */n.createElement(a,{value:t},e)};var nB=nz(nK,{});nK.Provider=nB.Provider;nK.Consumer=nB.Consumer;function nz(e,t){Object.assign(e,n.createContext(t));e.Provider._context=e;e.Consumer._context=e;return e}// src/SpringRef.ts
var nq=()=>{const e=[];const t=function(t){t5();const n=[];eU(e,(e,i)=>{if(eH.und(t)){n.push(e.start())}else{const o=r(t,e,i);if(o){n.push(e.start(o))}}});return n};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(){eU(e,e=>e.pause(...arguments));return this};t.resume=function(){eU(e,e=>e.resume(...arguments));return this};t.set=function(t){eU(e,(e,r)=>{const n=eH.fun(t)?t(r,e):t;if(n){e.set(n)}})};t.start=function(t){const r=[];eU(e,(e,n)=>{if(eH.und(t)){r.push(e.start())}else{const i=this._getProps(t,e,n);if(i){r.push(e.start(i))}}});return r};t.stop=function(){eU(e,e=>e.stop(...arguments));return this};t.update=function(t){eU(e,(e,r)=>e.update(this._getProps(t,e,r)));return this};const r=function(e,t,r){return eH.fun(e)?e(r,t):e};t._getProps=r;return t};// src/hooks/useSprings.ts
function nW(e,t,r){const i=eH.fun(t)&&t;if(i&&!r)r=[];const o=(0,n.useMemo)(()=>i||arguments.length==3?nq():void 0,[]);const a=(0,n.useRef)(0);const s=rg();const l=(0,n.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){const r=nL(e,t);const n=a.current>0&&!l.queue.length&&!Object.keys(r).some(t=>!e.springs[t]);return n?nj(e,t):new Promise(n=>{nN(e,r);l.queue.push(()=>{n(nj(e,t))});s()})}}),[]);const c=(0,n.useRef)([...l.ctrls]);const u=[];const d=rw(e)||0;(0,n.useMemo)(()=>{eU(c.current.slice(e,d),e=>{r6(e,o);e.stop(true)});c.current.length=e;f(d,e)},[e]);(0,n.useMemo)(()=>{f(0,Math.min(d,e))},r);function f(e,r){for(let n=e;n<r;n++){const e=c.current[n]||(c.current[n]=new nM(null,l.flush));const r=i?i(n,e):t[n];if(r){u[n]=nO(r)}}}const p=c.current.map((e,t)=>nL(e,u[t]));const h=(0,n.useContext)(nK);const v=rw(h);const m=h!==v&&r1(h);rv(()=>{a.current++;l.ctrls=c.current;const{queue:e}=l;if(e.length){l.queue=[];eU(e,e=>e())}eU(c.current,(e,t)=>{o?.add(e);if(m){e.start({default:h})}const r=u[t];if(r){r4(e,r.ref);if(e.ref){e.queue.push(r)}else{e.start(r)}}})});ry(()=>()=>{eU(l.ctrls,e=>e.stop(true))});const g=p.map(e=>({...e}));return o?[g,o]:g}// src/hooks/useSpring.ts
function nG(e,t){const r=eH.fun(e);const[[n],i]=nW(1,r?e:[e],r?t||[]:t);return r||arguments.length==2?[n,i]:n}// src/hooks/useSpringRef.ts
var n$=()=>nq();var nQ=()=>useState(n$)[0];// src/hooks/useSpringValue.ts
var nX=(e,t)=>{const r=useConstant(()=>new nE(e,t));useOnce2(()=>()=>{r.stop()});return r};// src/hooks/useTrail.ts
function nJ(e,t,r){const n=is10.fun(t)&&t;if(n&&!r)r=[];let i=true;let o=void 0;const a=nW(e,(e,r)=>{const a=n?n(e,r):t;o=a.ref;i=i&&a.reverse;return a},// Ensure the props function is called when no deps exist.
// This works around the 3 argument rule.
r||[{}]);useIsomorphicLayoutEffect3(()=>{each6(a[1].current,(e,t)=>{const r=a[1].current[t+(i?1:-1)];r4(e,o);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=o??a[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 a}return a[0]}// src/hooks/useTransition.tsx
function nZ(e,t,r){const i=eH.fun(t)&&t;const{reset:o,sort:a,trail:s=0,expires:l=true,exitBeforeEnter:c=false,onDestroyed:u,ref:d,config:f}=i?i():t;const p=(0,n.useMemo)(()=>i||arguments.length==3?nq():void 0,[]);const h=eB(e);const v=[];const m=(0,n.useRef)(null);const g=o?null:m.current;rv(()=>{m.current=v});ry(()=>{eU(v,e=>{p?.add(e.ctrl);e.ctrl.ref=p});return()=>{eU(m.current,e=>{if(e.expired){clearTimeout(e.expirationId)}r6(e.ctrl,p);e.ctrl.stop(true)})}});const b=n1(h,i?i():t,g);const _=o&&m.current||[];rv(()=>eU(_,({ctrl:e,item:t,key:r})=>{r6(e,p);rB(u,t,r)}));const y=[];if(g)eU(g,(e,t)=>{if(e.expired){clearTimeout(e.expirationId);_.push(e)}else{t=y[t]=b.indexOf(e.key);if(~t)v[t]=e}});eU(h,(e,t)=>{if(!v[t]){v[t]={key:b[t],item:e,phase:"mount"/* MOUNT */,ctrl:new nM};v[t].ctrl.item=e}});if(y.length){let e=-1;const{leave:r}=i?i():t;eU(y,(t,n)=>{const i=g[n];if(~t){e=v.indexOf(i);v[e]={...i,item:h[t]}}else if(r){v.splice(++e,0,i)}})}if(eH.fun(a)){v.sort((e,t)=>a(e.item,t.item))}let x=-s;const w=rg();const A=r$(t);const E=/* @__PURE__ */new Map;const I=(0,n.useRef)(/* @__PURE__ */new Map);const k=(0,n.useRef)(false);eU(v,(e,r)=>{const n=e.key;const o=e.phase;const a=i?i():t;let u;let p;const h=rB(a.delay||0,n);if(o=="mount"/* MOUNT */){u=a.enter;p="enter"/* ENTER */}else{const e=b.indexOf(n)<0;if(o!="leave"/* LEAVE */){if(e){u=a.leave;p="leave"/* LEAVE */}else if(u=a.update){p="update"/* UPDATE */}else return}else if(!e){u=a.enter;p="enter"/* ENTER */}else return}u=rB(u,e.item,r);u=eH.obj(u)?rZ(u):{to:u};if(!u.config){const t=f||A.config;u.config=rB(t,e.item,r,p)}x+=s;const v={...A,// we need to add our props.delay value you here.
delay:h+x,ref:d,immediate:a.immediate,// This prevents implied resets.
reset:false,// Merge any phase-specific props.
...u};if(p=="enter"/* ENTER */&&eH.und(v.from)){const n=i?i():t;const o=eH.und(n.initial)||g?n.from:n.initial;v.from=rB(o,e.item,r)}const{onResolve:_}=v;v.onResolve=e=>{rB(_,e);const t=m.current;const r=t.find(e=>e.key===n);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=rB(l,r.item);if(t!==false){const n=t===true?0:t;r.expired=true;if(!e&&n>0){if(n<=0x7fffffff)r.expirationId=setTimeout(w,n);return}}}if(e&&t.some(e=>e.expired)){I.current.delete(r);if(c){k.current=true}w()}}};const y=nL(e.ctrl,v);if(p==="leave"/* LEAVE */&&c){I.current.set(e,{phase:p,springs:y,payload:v})}else{E.set(e,{phase:p,springs:y,payload:v})}});const S=(0,n.useContext)(nK);const O=rw(S);const T=S!==O&&r1(S);rv(()=>{if(T){eU(v,e=>{e.ctrl.start({default:S})})}},[S]);eU(E,(e,t)=>{if(I.current.size){const e=v.findIndex(e=>e.key===t.key);v.splice(e,1)}});rv(()=>{eU(I.current.size?I.current:E,({phase:e,payload:t},r)=>{const{ctrl:n}=r;r.phase=e;p?.add(n);if(T&&e=="enter"/* ENTER */){n.start({default:S})}if(t){r4(n,t.ref);if((n.ref||p)&&!k.current){n.update(t)}else{n.start(t);if(k.current){k.current=false}}}})},o?void 0:r);const C=e=>/* @__PURE__ */n.createElement(n.Fragment,null,v.map((t,r)=>{const{springs:i}=E.get(t)||t.ctrl;const o=e({...i},t.item,t,r);return o&&o.type?/* @__PURE__ */n.createElement(o.type,{...o.props,key:eH.str(t.key)||eH.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o}));return p?[C,p]:C}var n0=1;function n1(e,{key:t,keys:r=t},n){if(r===null){const t=/* @__PURE__ */new Set;return e.map(e=>{const r=n&&n.find(r=>r.item===e&&r.phase!=="leave"/* LEAVE */&&!t.has(r));if(r){t.add(r);return r.key}return n0++})}return eH.und(r)?e:eH.fun(r)?e.map(r):eB(r)}// src/hooks/useScroll.ts
var n2=({container:e,...t}={})=>{const[r,n]=nG(()=>({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 n6=({container:e,...t})=>{const[r,n]=nG(()=>({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 n4=/* unused pure expression or super */null&&{any:0,all:1};function n5(e,t){const[r,n]=useState2(false);const i=useRef3();const o=is12.fun(e)&&e;const a=o?o():{};const{to:s={},from:l={},...c}=a;const u=o?t:e;const[d,f]=nG(()=>({from:l,...c}),[]);useIsomorphicLayoutEffect7(()=>{const e=i.current;const{root:t,once:o,amount:a="any",...c}=u??{};if(!e||o&&r||typeof IntersectionObserver==="undefined")return;const d=/* @__PURE__ */new WeakMap;const p=()=>{if(s){f.start(s)}n(true);const e=()=>{if(l){f.start(l)}n(false)};return o?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 a==="number"||Array.isArray(a)?a:n4[a],...c});v.observe(e);return()=>v.unobserve(e)},[u]);if(o){return[i,d]}return[i,r]}// src/components/Spring.tsx
function n3({children:e,...t}){return e(nG(t))}// src/components/Trail.tsx
function n8({items:e,children:t,...r}){const n=nJ(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 n9({items:e,children:t,...r}){return nZ(e,r)(t)}// src/interpolate.ts
// src/Interpolation.ts
var n7=class extends nh{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=tx(...t);const r=this._get();const n=rj(r);rS(this,n.create(r))}advance(e){const t=this._get();const r=this.get();if(!eV(t,r)){rk(this).setValue(t);this._onChange(t,this.idle)}if(!this.idle&&it(this._active)){ir(this)}}_get(){const e=eH.arr(this.source)?this.source.map(tM):eB(tM(this.source));return this.calc(...e)}_start(){if(this.idle&&!it(this._active)){this.idle=false;eU(rO(this),e=>{e.done=false});if(eP.skipAnimation){em.batchedUpdates(()=>this.advance());ir(this)}else{e4.start(this)}}}// Observe our sources only when we're observed.
_attach(){let e=1;eU(eB(this.source),t=>{if(tY(t)){tV(t,this)}if(nf(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(){eU(eB(this.source),e=>{if(tY(e)){tU(e,this)}});this._active.clear();ir(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=eB(this.source).reduce((e,t)=>Math.max(e,(nf(t)?t.priority:0)+1),0)}}};function ie(e){return e.idle!==false}function it(e){return!e.size||Array.from(e).every(ie)}function ir(e){if(!e.idle){e.idle=true;eU(rO(e),e=>{e.done=true});tL(e,{type:"idle",parent:e})}}// src/interpolate.ts
var ii=(e,...t)=>new n7(e,t);var io=(e,...t)=>(deprecateInterpolate2(),new n7(e,t));// src/globals.ts
eP.assign({createStringInterpolator:tZ,to:(e,t)=>new n7(e,t)});var ia=e4.advance;// src/index.ts
//# sourceMappingURL=react-spring_core.modern.mjs.map
// EXTERNAL MODULE: external "ReactDOM"
var is=r(5206);// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@react-spring+web@9.7.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-spring/web/dist/react-spring_web.modern.mjs
// src/index.ts
// src/applyAnimatedValues.ts
var il=/^--/;function ic(e,t){if(t==null||typeof t==="boolean"||t==="")return"";if(typeof t==="number"&&t!==0&&!il.test(e)&&!(ip.hasOwnProperty(e)&&ip[e]))return t+"px";return(""+t).trim()}var iu={};function id(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:o,scrollTop:a,scrollLeft:s,viewBox:l,...c}=t;const u=Object.values(c);const d=Object.keys(c).map(t=>r||e.hasAttribute(t)?t:iu[t]||(iu[t]=t.replace(/([A-Z])/g,// Attributes are written in dash case
    e=>"-"+e.toLowerCase())));if(o!==void 0){e.textContent=o}for(const t in i){if(i.hasOwnProperty(t)){const r=ic(t,i[t]);if(il.test(t)){e.style.setProperty(t,r)}else{e.style[t]=r}}}d.forEach((t,r)=>{e.setAttribute(t,u[r])});if(n!==void 0){e.className=n}if(a!==void 0){e.scrollTop=a}if(s!==void 0){e.scrollLeft=s}if(l!==void 0){e.setAttribute("viewBox",l)}}var ip={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 ih=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);var iv=["Webkit","Ms","Moz","O"];ip=Object.keys(ip).reduce((e,t)=>{iv.forEach(r=>e[ih(r,t)]=e[t]);return e},ip);// src/AnimatedStyle.ts
var im=/^(matrix|translate|scale|rotate|skew)/;var ig=/^(translate)/;var ib=/^(rotate|skew)/;var i_=(e,t)=>eH.num(e)&&e!==0?e+t:e;var iy=(e,t)=>eH.arr(e)?e.every(e=>iy(e,t)):eH.num(e)?e===t:parseFloat(e)===t;var ix=class extends rF{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=>i_(e,"px")).join(",")})`,// prettier-ignore
    iy(e,0)])}eK(n,(e,t)=>{if(t==="transform"){i.push([e||""]);o.push(e=>[e,e===""])}else if(im.test(t)){delete n[t];if(eH.und(e))return;const r=ig.test(t)?"px":ib.test(t)?"deg":"";i.push(eB(e));o.push(t==="rotate3d"?([e,t,n,i])=>[`rotate3d(${e},${t},${n},${i_(i,r)})`,iy(i,0)]:e=>[`${t}(${e.map(e=>i_(e,r)).join(",")})`,iy(e,t.startsWith("scale")?1:0)])}});if(i.length){n.transform=new iw(i,o)}super(n)}};var iw=class extends tN{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;eU(this.inputs,(r,n)=>{const i=tM(r[0]);const[o,a]=this.transforms[n](eH.arr(i)?i:r.map(tM));e+=" "+o;t=t&&a});return t?"none":e}// Start observing our inputs once we have an observer.
observerAdded(e){if(e==1)eU(this.inputs,e=>eU(e,e=>tY(e)&&tV(e,this)))}// Stop observing our inputs once we have no observers.
observerRemoved(e){if(e==0)eU(this.inputs,e=>eU(e,e=>tY(e)&&tU(e,this)))}eventObserved(e){if(e.type=="change"){this._value=null}tL(this,e)}};// src/primitives.ts
var iA=["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
eP.assign({batchedUpdates:is.unstable_batchedUpdates,createStringInterpolator:tZ,colors:tt});var iE=rU(iA,{applyAnimatedValues:id,createAnimatedStyle:e=>new ix(e),// eslint-disable-next-line @typescript-eslint/no-unused-vars
getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r});var iI=iE.animated;//# sourceMappingURL=react-spring_web.modern.mjs.map
// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/styles.ts
var ik=r(7764);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/typography.ts
var iS=r(983);// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js + 1 modules
var iO=r(2473);// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/react-use-measure@2.1.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-use-measure/dist/index.js
function iT(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function iC({debounce:e,scroll:t,polyfill:r,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const o=r||(typeof window=="undefined"?class{}:window.ResizeObserver);if(!o)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[a,s]=(0,n.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=(0,n.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,d=(0,n.useRef)(!1);(0,n.useEffect)(()=>(d.current=!0,()=>void(d.current=!1)));const[f,p,h]=(0,n.useMemo)(()=>{const e=()=>{if(!l.current.element)return;const{left:e,top:t,width:r,height:n,bottom:o,right:a,x:c,y:u}=l.current.element.getBoundingClientRect(),f={left:e,top:t,width:r,height:n,bottom:o,right:a,x:c,y:u};l.current.element instanceof HTMLElement&&i&&(f.height=l.current.element.offsetHeight,f.width=l.current.element.offsetWidth),Object.freeze(f),d.current&&!iM(l.current.lastBounds,f)&&s(l.current.lastBounds=f)};return[e,u?iT(e,u):e,c?iT(e,c):e]},[s,i,c,u]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",h,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null),l.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",l.current.orientationHandler))}function m(){l.current.element&&(l.current.resizeObserver=new o(h),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(e=>e.addEventListener("scroll",h,{capture:!0,passive:!0})),l.current.orientationHandler=()=>{h()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",l.current.orientationHandler))}const g=e=>{!e||e===l.current.element||(v(),l.current.element=e,l.current.scrollContainers=iF(e),m())};return iD(h,!!t),iR(p),(0,n.useEffect)(()=>{v(),m()},[t,h,p]),(0,n.useEffect)(()=>v,[]),[g,a,f]}function iR(e){(0,n.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function iD(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 iF(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,...iF(e.parentElement)]}const iY=["x","y","top","bottom","left","right","width","height"],iM=(e,t)=>iY.every(r=>e[r]===t[r]);//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useAnimation.tsx
var ij=/*#__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 iP=100;var iL=e=>{var{data:t,animationType:r=4,slideThreshold:n=20,animationDuration:i=150,minOpacity:o=0,maxOpacity:a=1,easing:s=tR.easeInOutQuad,debounceMeasure:l=false,keys:c}=e;var u=Array.isArray(t)?t.length>0:!!t;var[d,f]=iC({debounce:l?i+iP:0});var p=nG({from:{height:0,opacity:o,y:0},to:{height:u?f.height:0,opacity:u?a:o,y:u?0:n*-1},config:{duration:i,easing:s}});var h=nG({from:{x:0},to:{x:u?0:n*-1},config:{duration:i,easing:s}});var v={x:0,y:0};switch(r){case 0:v.y=n*-1;v.x=0;break;case 1:v.y=n;v.x=0;break;case 2:v.x=n;v.y=0;break;case 3:v.x=n*-1;v.y=0;break}var m=nZ(t,{keys:c||(e=>{return e}),from:(0,ef._)({opacity:o},v,r===5&&{transform:"scale(0.8)"},r===6&&{transform:"scale(1.2)"},r===7&&{opacity:0}),enter:(0,ef._)({opacity:a,x:0,y:0},r===5&&{transform:"scale(1)"},r===6&&{transform:"scale(1)"},r===7&&{opacity:1}),leave:(0,ef._)({opacity:o},v,r===5&&{transform:"scale(0.8)"},r===6&&{transform:"scale(1.2)"},r===7&&{opacity:0}),config:{duration:i,easing:s}});return{animationStyle:r===8?h:p,ref:d,transitions:m}};var iN=e=>{var{children:r,style:n,hideOnOverflow:i=true}=e,o=(0,iO._)(e,["children","style","hideOnOverflow"]);return/*#__PURE__*/(0,t/* .jsx */.Y)(iI.div,(0,ep._)((0,ef._)({},o),{style:(0,ep._)((0,ef._)({},n),{overflow:i?"hidden":"initial"}),children:r}))};// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/types.ts
var iH=r(8638);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/util.ts + 8 modules
var iV=r(8790);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/Button.tsx
var iU=r(9878);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/atoms/SVGIcon.tsx
var iK=r(4485);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/Toast.tsx
function iB(){var e=(0,eh._)(["\n      left: ",";\n      top: calc("," + 60px);\n    "]);iB=function t(){return e};return e}function iz(){var e=(0,eh._)(["\n      right: ",";\n      top: calc("," + 60px);\n    "]);iz=function t(){return e};return e}function iq(){var e=(0,eh._)(["\n      left: 50%;\n      top: calc("," + 60px);\n      transform: translateX(-50%);\n    "]);iq=function t(){return e};return e}function iW(){var e=(0,eh._)(["\n      left: ",";\n      bottom: ",";\n    "]);iW=function t(){return e};return e}function iG(){var e=(0,eh._)(["\n      right: ",";\n      bottom: ",";\n    "]);iG=function t(){return e};return e}function i$(){var e=(0,eh._)(["\n      left: 50%;\n      bottom: ",";\n      transform: translateX(-50%);\n    "]);i$=function t(){return e};return e}function iQ(){var e=(0,eh._)(["\n      background: ",";\n    "]);iQ=function t(){return e};return e}function iX(){var e=(0,eh._)(["\n      background: ",";\n    "]);iX=function t(){return e};return e}function iJ(){var e=(0,eh._)(["\n      background: ",";\n    "]);iJ=function t(){return e};return e}function iZ(){var e=(0,eh._)(["\n      background: ",";\n\n      h5 {\n        color: ",";\n      }\n\n      svg > path {\n        color: ",";\n      }\n    "]);iZ=function t(){return e};return e}var i0={type:"dark",message:"",autoCloseDelay:3e3,position:"bottom-right"};var i1=/*#__PURE__*/i().createContext({showToast:()=>{}});var i2=()=>(0,n.useContext)(i1);var i6=e=>{var{children:r,position:i="bottom-right"}=e;var[o,a]=(0,n.useState)([]);var s=nZ(o,{from:{opacity:0,y:-40},enter:{opacity:1,y:0},leave:{opacity:.5,y:100},config:{duration:300}});var l=(0,n.useCallback)(e=>{var t=(0,ep._)((0,ef._)({},i0,e),{id:(0,iV/* .nanoid */.Ak)()});a(e=>[t,...e]);var r;if(!(0,iH/* .isBoolean */.Lm)(t.autoCloseDelay)&&t.autoCloseDelay){r=setTimeout(()=>{a(e=>e.slice(0,-1))},t.autoCloseDelay)}return()=>{clearTimeout(r)}},[]);return/*#__PURE__*/(0,t/* .jsxs */.FD)(i1.Provider,{value:{showToast:l},children:[r,/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:i5.toastWrapper(i),children:s((e,r)=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)(iN,{"data-cy":"tutor-toast",style:e,css:i5.toastItem(r.type),children:[/*#__PURE__*/(0,t/* .jsx */.Y)("h5",{css:i5.message,children:r.message}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",onClick:()=>{a(e=>e.filter(e=>e.id!==r.id))},children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"timesAlt",width:16,height:16})})]},r.id)})})]})};/* export default */const i4=i6;var i5={toastWrapper:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",ik/* .spacing["16"] */.YK["16"],";max-width:400px;position:fixed;z-index:",ik/* .zIndex.toast */.fE.toast,";",e==="top-left"&&(0,c/* .css */.AH)(iB(),ik/* .spacing["20"] */.YK["20"],ik/* .spacing["20"] */.YK["20"])," ",e==="top-right"&&(0,c/* .css */.AH)(iz(),ik/* .spacing["20"] */.YK["20"],ik/* .spacing["20"] */.YK["20"])," ",e==="top-center"&&(0,c/* .css */.AH)(iq(),ik/* .spacing["20"] */.YK["20"])," ",e==="bottom-left"&&(0,c/* .css */.AH)(iW(),ik/* .spacing["20"] */.YK["20"],ik/* .spacing["20"] */.YK["20"])," ",e==="bottom-right"&&(0,c/* .css */.AH)(iG(),ik/* .spacing["20"] */.YK["20"],ik/* .spacing["20"] */.YK["20"])," ",e==="bottom-center"&&(0,c/* .css */.AH)(i$(),ik/* .spacing["20"] */.YK["20"])),toastItem:e=>/*#__PURE__*/(0,c/* .css */.AH)("width:100%;min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:",ik/* .spacing["16"] */.YK["16"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";padding:",ik/* .spacing["16"] */.YK["16"],";svg > path{color:",ik/* .colorTokens.icon.white */.I6.icon.white,";}",e==="dark"&&(0,c/* .css */.AH)(iQ(),ik/* .colorTokens.color.black.main */.I6.color.black.main)," ",e==="danger"&&(0,c/* .css */.AH)(iX(),ik/* .colorTokens.design.error */.I6.design.error)," ",e==="success"&&(0,c/* .css */.AH)(iJ(),ik/* .colorTokens.design.success */.I6.design.success)," ",e==="warning"&&(0,c/* .css */.AH)(iZ(),ik/* .colorTokens.color.warning["70"] */.I6.color.warning["70"],ik/* .colorTokens.text.primary */.I6.text.primary,ik/* .colorTokens.text.primary */.I6.text.primary)),message:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),";color:",ik/* .colorTokens.text.white */.I6.text.white,";"),timesIcon:/*#__PURE__*/(0,c/* .css */.AH)("path{color:",ik/* .colorTokens.icon.white */.I6.icon.white,";}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/Modal.tsx
function i3(){var e=(0,eh._)(["\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    "]);i3=function t(){return e};return e}var i8={backdrop:e=>{var{magicAi:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:fixed;background-color:",ik/* .colorTokens.background.modal */.I6.background.modal,";opacity:0.7;inset:0;z-index:",ik/* .zIndex.negative */.fE.negative,";",t&&(0,c/* .css */.AH)(i3()))},container:/*#__PURE__*/(0,c/* .css */.AH)("z-index:",ik/* .zIndex.highest */.fE.highest,";position:fixed;display:flex;justify-content:center;top:0;left:0;width:100%;height:100%;")};var i9=/*#__PURE__*/i().createContext({showModal:()=>Promise.resolve({action:"CLOSE"}),closeModal:iV/* .noop */.lQ,updateModal:iV/* .noop */.lQ,hasModalOnStack:false});var i7=()=>(0,n.useContext)(i9);var oe=e=>{var{children:r}=e;var[o,a]=(0,n.useState)({modals:[]});var s=(0,n.useCallback)(e=>{var{component:t,props:r,closeOnOutsideClick:n=false,closeOnEscape:i=true,isMagicAi:o=false,depthIndex:s=ik/* .zIndex.modal */.fE.modal,id:l}=e;return new Promise(e=>{a(a=>(0,ep._)((0,ef._)({},a),{modals:[...a.modals,{component:t,props:r,resolve:e,closeOnOutsideClick:n,closeOnEscape:i,id:l||(0,iV/* .nanoid */.Ak)(),depthIndex:s,isMagicAi:o}]}))})},[]);var l=(0,n.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,ep._)((0,ef._)({},t),{modals:t.modals.slice(0,t.modals.length-1)})})},[]);var c=(0,n.useCallback)((e,t)=>{a(r=>{var n=r.modals.findIndex(t=>t.id===e);if(n===-1)return r;var i=[...r.modals];var o=i[n];i[n]=(0,ep._)((0,ef._)({},o),{props:(0,ef._)({},o.props,t)});return(0,ep._)((0,ef._)({},r),{modals:i})})},[]);var{transitions:u}=iL({keys:e=>e.id,data:o.modals,animationType:ij.slideUp,animationDuration:250});var d=(0,n.useMemo)(()=>{return o.modals.length>0},[o.modals]);(0,n.useEffect)(()=>{var e=e=>{var t;var r=document.querySelectorAll(".tutor-portal-popover");var n=!!document.body.classList.contains("modal-open");if(e.key==="Escape"&&((t=o.modals[o.modals.length-1])===null||t===void 0?void 0:t.closeOnEscape)&&!r.length&&!n){l({action:"CLOSE"})}};if(o.modals.length>0){document.addEventListener("keydown",e,true)}return()=>{document.removeEventListener("keydown",e,true)};// eslint-disable-next-line react-hooks/exhaustive-deps
},[o.modals.length,l]);return/*#__PURE__*/(0,t/* .jsxs */.FD)(i9.Provider,{value:{showModal:s,closeModal:l,updateModal:c,hasModalOnStack:d},children:[r,u((e,r,n,o)=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{"data-cy":"tutor-modal",css:[i8.container,{zIndex:r.depthIndex||ik/* .zIndex.modal */.fE.modal+o}],children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iN,{style:(0,ep._)((0,ef._)({},e),{width:"100%"}),hideOnOverflow:false,children:/*#__PURE__*/i().createElement(r.component,(0,ep._)((0,ef._)({},r.props),{closeModal:l}))}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:i8.backdrop({magicAi:r.isMagicAi}),onKeyUp:iV/* .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(r.closeOnOutsideClick){l({action:"CLOSE"})}}})]},r.id)})]})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
var ot=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 or(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 on(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 oi=/*#__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?!ot: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(on(this))}var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=or(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}();// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
/**
 * @param {number}
 * @return {number}
 */var oo=Math.abs;/**
 * @param {number}
 * @return {string}
 */var oa=String.fromCharCode;/**
 * @param {object}
 * @return {object}
 */var os=Object.assign;/**
 * @param {string} value
 * @param {number} length
 * @return {number}
 */function ol(e,t){return op(e,0)^45?(((t<<2^op(e,0))<<2^op(e,1))<<2^op(e,2))<<2^op(e,3):0}/**
 * @param {string} value
 * @return {string}
 */function oc(e){return e.trim()}/**
 * @param {string} value
 * @param {RegExp} pattern
 * @return {string?}
 */function ou(e,t){return(e=t.exec(e))?e[0]:e}/**
 * @param {string} value
 * @param {(string|RegExp)} pattern
 * @param {string} replacement
 * @return {string}
 */function od(e,t,r){return e.replace(t,r)}/**
 * @param {string} value
 * @param {string} search
 * @return {number}
 */function of(e,t){return e.indexOf(t)}/**
 * @param {string} value
 * @param {number} index
 * @return {number}
 */function op(e,t){return e.charCodeAt(t)|0}/**
 * @param {string} value
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function oh(e,t,r){return e.slice(t,r)}/**
 * @param {string} value
 * @return {number}
 */function ov(e){return e.length}/**
 * @param {any[]} value
 * @return {number}
 */function om(e){return e.length}/**
 * @param {any} value
 * @param {any[]} array
 * @return {any}
 */function og(e,t){return t.push(e),e}/**
 * @param {string[]} array
 * @param {function} callback
 * @return {string}
 */function ob(e,t){return e.map(t).join("")};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js
var o_=1;var oy=1;var ox=0;var ow=0;var oA=0;var oE="";/**
 * @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 oI(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:o_,column:oy,length:a,return:""}}/**
 * @param {object} root
 * @param {object} props
 * @return {object}
 */function ok(e,t){return os(oI("",null,null,"",null,null,0),e,{length:-e.length},t)}/**
 * @return {number}
 */function oS(){return oA}/**
 * @return {number}
 */function oO(){oA=ow>0?op(oE,--ow):0;if(oy--,oA===10)oy=1,o_--;return oA}/**
 * @return {number}
 */function oT(){oA=ow<ox?op(oE,ow++):0;if(oy++,oA===10)oy=1,o_++;return oA}/**
 * @return {number}
 */function oC(){return op(oE,ow)}/**
 * @return {number}
 */function oR(){return ow}/**
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function oD(e,t){return oh(oE,e,t)}/**
 * @param {number} type
 * @return {number}
 */function oF(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 oY(e){return o_=oy=1,ox=ov(oE=e),ow=0,[]}/**
 * @param {any} value
 * @return {any}
 */function oM(e){return oE="",e}/**
 * @param {number} type
 * @return {string}
 */function oj(e){return oc(oD(ow-1,oV(e===91?e+2:e===40?e+1:e)))}/**
 * @param {string} value
 * @return {string[]}
 */function oP(e){return oM(oN(oY(e)))}/**
 * @param {number} type
 * @return {string}
 */function oL(e){while(oA=oC())if(oA<33)oT();else break;return oF(e)>2||oF(oA)>3?"":" "}/**
 * @param {string[]} children
 * @return {string[]}
 */function oN(e){while(oT())switch(oF(oA)){case 0:append(oK(ow-1),e);break;case 2:append(oj(oA),e);break;default:append(from(oA),e)}return e}/**
 * @param {number} index
 * @param {number} count
 * @return {string}
 */function oH(e,t){while(--t&&oT())// not 0-9 A-F a-f
if(oA<48||oA>102||oA>57&&oA<65||oA>70&&oA<97)break;return oD(e,oR()+(t<6&&oC()==32&&oT()==32))}/**
 * @param {number} type
 * @return {number}
 */function oV(e){while(oT())switch(oA){// ] ) " '
case e:return ow;// " '
case 34:case 39:if(e!==34&&e!==39)oV(oA);break;// (
case 40:if(e===41)oV(e);break;// \
case 92:oT();break}return ow}/**
 * @param {number} type
 * @param {number} index
 * @return {number}
 */function oU(e,t){while(oT())// //
if(e+oA===47+10)break;else if(e+oA===42+42&&oC()===47)break;return"/*"+oD(t,ow-1)+"*"+oa(e===47?e:oT())}/**
 * @param {number} index
 * @return {string}
 */function oK(e){while(!oF(oC()))oT();return oD(e,ow)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
var oB="-ms-";var oz="-moz-";var oq="-webkit-";var oW="comm";var oG="rule";var o$="decl";var oQ="@page";var oX="@media";var oJ="@import";var oZ="@charset";var o0="@viewport";var o1="@supports";var o2="@document";var o6="@namespace";var o4="@keyframes";var o5="@font-face";var o3="@counter-style";var o8="@font-feature-values";var o9="@layer";// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function o7(e,t){var r="";var n=om(e);for(var i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function ae(e,t,r,n){switch(e.type){case o9:if(e.children.length)break;case oJ:case o$:return e.return=e.return||e.value;case oW:return"";case o4:return e.return=e.value+"{"+o7(e.children,n)+"}";case oG:e.value=e.props.join(",")}return ov(r=o7(e.children,n))?e.return=e.value+"{"+r+"}":""};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js
/**
 * @param {function[]} collection
 * @return {function}
 */function at(e){var t=om(e);return function(r,n,i,o){var a="";for(var s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}/**
 * @param {function} callback
 * @return {function}
 */function ar(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 an(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 ai(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}}})})}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
/**
 * @param {string} value
 * @return {object[]}
 */function ao(e){return oM(aa("",null,null,null,[""],e=oY(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 aa(e,t,r,n,i,o,a,s,l){var c=0;var u=0;var d=a;var f=0;var p=0;var h=0;var v=1;var m=1;var g=1;var b=0;var _="";var y=i;var x=o;var w=n;var A=_;while(m)switch(h=b,b=oT()){// (
case 40:if(h!=108&&op(A,d-1)==58){if(of(A+=od(oj(b),"&","&\f"),"&\f")!=-1)g=-1;break}// " ' [
case 34:case 39:case 91:A+=oj(b);break;// \t \n \r \s
case 9:case 10:case 13:case 32:A+=oL(h);break;// \
case 92:A+=oH(oR()-1,7);continue;// /
case 47:switch(oC()){case 42:case 47:og(al(oU(oT(),oR()),t,r),l);break;default:A+="/"}break;// {
case 123*v:s[c++]=ov(A)*g;// } ; \0
case 125*v:case 59:case 0:switch(b){// \0 }
case 0:case 125:m=0;// ;
case 59+u:if(g==-1)A=od(A,/\f/g,"");if(p>0&&ov(A)-d)og(p>32?ac(A+";",n,r,d-1):ac(od(A," ","")+";",n,r,d-2),l);break;// @ ;
case 59:A+=";";// { rule/at-rule
default:og(w=as(A,t,r,c,u,i,s,_,y=[],x=[],d),o);if(b===123)if(u===0)aa(A,t,w,w,y,o,d,s,x);else switch(f===99&&op(A,3)===110?100:f){// d l m s
case 100:case 108:case 109:case 115:aa(e,w,w,n&&og(as(e,w,w,0,0,i,s,_,i,y=[],d),x),i,x,d,s,n?y:x);break;default:aa(A,w,w,w,[""],x,0,s,x)}}c=u=p=0,v=g=1,_=A="",d=a;break;// :
case 58:d=1+ov(A),p=h;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&oO()==125)continue}switch(A+=oa(b),b*v){// &
case 38:g=u>0?1:(A+="\f",-1);break;// ,
case 44:s[c++]=(ov(A)-1)*g,g=1;break;// @
case 64:// -
if(oC()===45)A+=oj(oT());f=oC(),u=d=ov(_=A+=oK(oR())),b++;break;// -
case 45:if(h===45&&ov(A)==2)v=0}}return o}/**
 * @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 as(e,t,r,n,i,o,a,s,l,c,u){var d=i-1;var f=i===0?o:[""];var p=om(f);for(var h=0,v=0,m=0;h<n;++h)for(var g=0,b=oh(e,d+1,d=oo(v=a[h])),_=e;g<p;++g)if(_=oc(v>0?f[g]+" "+b:od(b,/&\f/g,f[g])))l[m++]=_;return oI(e,t,r,i===0?oG:s,l,c,u)}/**
 * @param {number} value
 * @param {object} root
 * @param {object?} parent
 * @return {object}
 */function al(e,t,r){return oI(e,t,r,oW,oa(oS()),oh(e,2,-2),0)}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} length
 * @return {object}
 */function ac(e,t,r,n){return oI(e,t,r,o$,oh(e,0,n),oh(e,n+1,-1),n)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var au=function e(e,t,r){var n=0;var i=0;while(true){n=i;i=oC();// &\f
if(n===38&&i===12){t[r]=1}if(oF(i)){break}oT()}return oD(e,ow)};var ad=function e(e,t){// pretend we've started with a comma
var r=-1;var n=44;do{switch(oF(n)){case 0:// &\f
if(n===38&&oC()===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]+=au(ow-1,t,r);break;case 2:e[r]+=oj(n);break;case 4:// comma
if(n===44){// colon
e[++r]=oC()===58?"&\f":"";t[r]=e[r].length;break}// fallthrough
default:e[r]+=oa(n)}}while(n=oT())return e};var af=function e(e,t){return oM(ad(oY(e),t))};// WeakSet would be more appropriate, but only WeakMap is supported in IE11
var ap=/* #__PURE__ */new WeakMap;var ah=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&&!ap.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}ap.set(e,true);var i=[];var o=af(t,i);var a=r.props;for(var s=0,l=0;s<o.length;s++){for(var c=0;c<a.length;c++,l++){e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}};var av=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 am(e,t){switch(ol(e,t)){// color-adjust
case 5103:return oq+"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 oq+e+e;// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:case 4246:case 4810:case 6968:case 2756:return oq+e+oz+e+oB+e+e;// flex, flex-direction
case 6828:case 4268:return oq+e+oB+e+e;// order
case 6165:return oq+e+oB+"flex-"+e+e;// align-items
case 5187:return oq+e+od(e,/(\w+).+(:[^]+)/,oq+"box-$1$2"+oB+"flex-$1$2")+e;// align-self
case 5443:return oq+e+oB+"flex-item-"+od(e,/flex-|-self/,"")+e;// align-content
case 4675:return oq+e+oB+"flex-line-pack"+od(e,/align-content|flex-|-self/,"")+e;// flex-shrink
case 5548:return oq+e+oB+od(e,"shrink","negative")+e;// flex-basis
case 5292:return oq+e+oB+od(e,"basis","preferred-size")+e;// flex-grow
case 6060:return oq+"box-"+od(e,"-grow","")+oq+e+oB+od(e,"grow","positive")+e;// transition
case 4554:return oq+od(e,/([^-])(transform)/g,"$1"+oq+"$2")+e;// cursor
case 6187:return od(od(od(e,/(zoom-|grab)/,oq+"$1"),/(image-set)/,oq+"$1"),e,"")+e;// background, background-image
case 5495:case 3959:return od(e,/(image-set\([^]*)/,oq+"$1"+"$`$1");// justify-content
case 4968:return od(od(e,/(.+:)(flex-)?(.*)/,oq+"box-pack:$3"+oB+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+oq+e+e;// (margin|padding)-inline-(start|end)
case 4095:case 3583:case 4068:case 2532:return od(e,/(.+)-inline(.+)/,oq+"$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(ov(e)-1-t>6)switch(op(e,t+1)){// (m)ax-content, (m)in-content
case 109:// -
if(op(e,t+4)!==45)break;// (f)ill-available, (f)it-content
case 102:return od(e,/(.+:)(.+)-([^]+)/,"$1"+oq+"$2-$3"+"$1"+oz+(op(e,t+3)==108?"$3":"$2-$3"))+e;// (s)tretch
case 115:return~of(e,"stretch")?am(od(e,"stretch","fill-available"),t)+e:e}break;// position: sticky
case 4949:// (s)ticky?
if(op(e,t+1)!==115)break;// display: (flex|inline-flex)
case 6444:switch(op(e,ov(e)-3-(~of(e,"!important")&&10))){// stic(k)y
case 107:return od(e,":",":"+oq)+e;// (inline-)?fl(e)x
case 101:return od(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+oq+(op(e,14)===45?"inline-":"")+"box$3"+"$1"+oq+"$2$3"+"$1"+oB+"$2box$3")+e}break;// writing-mode
case 5936:switch(op(e,t+11)){// vertical-l(r)
case 114:return oq+e+oB+od(e,/[svh]\w+-[tblr]{2}/,"tb")+e;// vertical-r(l)
case 108:return oq+e+oB+od(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;// horizontal(-)tb
case 45:return oq+e+oB+od(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return oq+e+oB+e+e}return e}var ag=function e(e,t,r,n){if(e.length>-1){if(!e["return"])switch(e.type){case o$:e["return"]=am(e.value,e.length);break;case o4:return o7([ok(e,{value:od(e.value,"@","@"+oq)})],n);case oG:if(e.length)return ob(e.props,function(t){switch(ou(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return o7([ok(e,{props:[od(t,/:(read-\w+)/,":"+oz+"$1")]})],n);// :placeholder
case"::placeholder":return o7([ok(e,{props:[od(t,/:(plac\w+)/,":"+oq+"input-$1")]}),ok(e,{props:[od(t,/:(plac\w+)/,":"+oz+"$1")]}),ok(e,{props:[od(t,/:(plac\w+)/,oB+"input-$1")]})],n)}return""})}}};var ab=[ag];var a_=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 n=e.stylisPlugins||ab;var i={};var o;var a=[];{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++){i[t[r]]=true}a.push(e)})}var s;var l=[ah,av];{var c;var u=[ae,ar(function(e){c.insert(e)})];var d=at(l.concat(n,u));var f=function e(e){return o7(ao(e),d)};s=function e(e,t,r,n){c=r;f(e?e+"{"+t.styles+"}":t.styles);if(n){p.inserted[t.name]=true}}}var p={key:t,sheet:new oi({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};p.sheet.hydrate(a);return p};// EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.1_react@18.3.1/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
var ay=r(2517);// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/cssjanus@2.3.0/node_modules/cssjanus/src/cssjanus.js
var ax=r(234);var aw=/*#__PURE__*/r.n(ax);// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/stylis-plugin-rtl@2.1.1_stylis@4.2.0/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
function aA(e,t,r){switch(e.type){case oJ:case o$:case oW:return e.return=e.return||e.value;case oG:{e.value=Array.isArray(e.props)?e.props.join(","):e.props;if(Array.isArray(e.children)){e.children.forEach(function(e){if(e.type===oW)e.children=e.value})}}}var n=o7(Array.prototype.concat(e.children),aA);return ov(n)?e.return=e.value+"{"+n+"}":""}function aE(e,t,r,n){if(e.type===o4||e.type===o1||e.type===oG&&(!e.parent||e.parent.type===oX||e.parent.type===oG)){var i=aw().transform(aA(e,t,r));e.children=i?ao(i)[0].children:[];e.return=""}}// stable identifier that will not be dropped by minification unless the whole module
// is unused
Object.defineProperty(aE,"name",{value:"stylisRTLPlugin"});/* export default */const aI=aE;//# sourceMappingURL=stylis-rtl.js.map
// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/constants.ts
var ak=r(7461);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/RTLProvider.tsx
var aS=a_({stylisPlugins:[aI],key:"rtl"});var aO=e=>{var{children:r}=e;if(ak/* .isRTL */.V8){return/*#__PURE__*/(0,t/* .jsx */.Y)(ay.C,{value:aS,children:r})}return/*#__PURE__*/(0,t/* .jsx */.Y)(t/* .Fragment */.FK,{children:r})};/* export default */const aT=aO;// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/contexts/SVGIconConfigContext.tsx
var aC=r(9612);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/style-utils.ts
var aR=r(4958);// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_define_property.js
function aD(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};// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js
function aF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var n=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))}n.forEach(function(t){aD(e,t,r[t])})}return e};// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread_props.js
function aY(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 aM(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors)Object.defineProperties(e,Object.getOwnPropertyDescriptors(t));else{aY(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e};// CONCATENATED MODULE: ./node_modules/.pnpm/react-hook-form@7.67.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs
var aj=e=>e.type==="checkbox";var aP=e=>e instanceof Date;var aL=e=>e==null;const aN=e=>typeof e==="object";var aH=e=>!aL(e)&&!Array.isArray(e)&&aN(e)&&!aP(e);var aV=e=>aH(e)&&e.target?aj(e.target)?e.target.checked:e.target.value:e;var aU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e;var aK=(e,t)=>e.has(aU(t));var aB=e=>{const t=e.constructor&&e.constructor.prototype;return aH(t)&&t.hasOwnProperty("isPrototypeOf")};var az=typeof window!=="undefined"&&typeof window.HTMLElement!=="undefined"&&typeof document!=="undefined";function aq(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(!(az&&(e instanceof Blob||n))&&(r||aH(e))){t=r?[]:Object.create(Object.getPrototypeOf(e));if(!r&&!aB(e)){t=e}else{for(const r in e){if(e.hasOwnProperty(r)){t[r]=aq(e[r])}}}}else{return e}return t}var aW=e=>/^\w*$/.test(e);var aG=e=>e===undefined;var a$=e=>Array.isArray(e)?e.filter(Boolean):[];var aQ=e=>a$(e.replace(/["|']|\]/g,"").split(/\.|\[/));var aX=(e,t,r)=>{if(!t||!aH(e)){return r}const n=(aW(t)?[t]:aQ(t)).reduce((e,t)=>aL(e)?e:e[t],e);return aG(n)||n===e?aG(e[t])?r:e[t]:n};var aJ=e=>typeof e==="boolean";var aZ=(e,t,r)=>{let n=-1;const i=aW(t)?[t]:aQ(t);const o=i.length;const a=o-1;while(++n<o){const t=i[n];let o=r;if(n!==a){const r=e[t];o=aH(r)||Array.isArray(r)?r:!isNaN(+i[n+1])?[]:{}}if(t==="__proto__"||t==="constructor"||t==="prototype"){return}e[t]=o;e=e[t]}};const a0={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"};const a1={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};const a2={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};const a6=n.createContext(null);a6.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 a4=()=>n.useContext(a6);/**
 * 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 a5=e=>{const{children:t,...r}=e;return n.createElement(a6.Provider,{value:r},t)};var a3=(e,t,r,n=true)=>{const i={defaultValues:t._defaultValues};for(const o in e){Object.defineProperty(i,o,{get:()=>{const i=o;if(t._proxyFormState[i]!==a1.all){t._proxyFormState[i]=!n||a1.all}r&&(r[i]=true);return e[i]}})}return i};const a8=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 a9(e){const t=a4();const{control:r=t.control,disabled:i,name:o,exact:a}=e||{};const[s,l]=n.useState(r._formState);const c=n.useRef({isDirty:false,isLoading:false,dirtyFields:false,touchedFields:false,validatingFields:false,isValidating:false,isValid:false,errors:false});a8(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:e=>{!i&&l({...r._formState,...e})}}),[o,i,a]);n.useEffect(()=>{c.current.isValid&&r._setValid(true)},[r]);return n.useMemo(()=>a3(s,r,c.current,false),[s,r])}var a7=e=>typeof e==="string";var se=(e,t,r,n,i)=>{if(a7(e)){n&&t.watch.add(e);return aX(r,e,i)}if(Array.isArray(e)){return e.map(e=>(n&&t.watch.add(e),aX(r,e)))}n&&(t.watchAll=true);return r};var st=e=>aL(e)||!aN(e);function sr(e,t,r=new WeakSet){if(st(e)||st(t)){return Object.is(e,t)}if(aP(e)&&aP(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(aP(n)&&aP(e)||aH(n)&&aH(e)||Array.isArray(n)&&Array.isArray(e)?!sr(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 sn(e){const t=a4();const{control:r=t.control,name:i,defaultValue:o,disabled:a,exact:s,compute:l}=e||{};const c=n.useRef(o);const u=n.useRef(l);const d=n.useRef(undefined);const f=n.useRef(r);const p=n.useRef(i);u.current=l;const[h,v]=n.useState(()=>{const e=r._getWatch(i,c.current);return u.current?u.current(e):e});const m=n.useCallback(e=>{const t=se(i,r._names,e||r._formValues,false,c.current);return u.current?u.current(t):t},[r._formValues,r._names,i]);const g=n.useCallback(e=>{if(!a){const t=se(i,r._names,e||r._formValues,false,c.current);if(u.current){const e=u.current(t);if(!sr(e,d.current)){v(e);d.current=e}}else{v(t)}}},[r._formValues,r._names,a,i]);a8(()=>{if(f.current!==r||!sr(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 _=p.current;// Cache the computed output to avoid duplicate calls within the same render
// We include shouldReturnImmediate in deps to ensure proper recomputation
const y=n.useMemo(()=>{if(a){return null}const e=!b&&!sr(_,i);const t=b||e;return t?m():null},[a,b,i,_,m]);return y!==null?y: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 si(e){const t=a4();const{name:r,disabled:i,control:o=t.control,shouldUnregister:a,defaultValue:s,exact:l=true}=e;const c=aK(o._names.array,r);const u=n.useMemo(()=>aX(o._formValues,r,aX(o._defaultValues,r,s)),[o,r,s]);const d=sn({control:o,name:r,defaultValue:u,exact:l});const f=a9({control:o,name:r,exact:l});const p=n.useRef(e);const h=n.useRef(undefined);const v=n.useRef(o.register(r,{...e.rules,value:d,...aJ(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=n.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:true,get:()=>!!aX(f.errors,r)},isDirty:{enumerable:true,get:()=>!!aX(f.dirtyFields,r)},isTouched:{enumerable:true,get:()=>!!aX(f.touchedFields,r)},isValidating:{enumerable:true,get:()=>!!aX(f.validatingFields,r)},error:{enumerable:true,get:()=>aX(f.errors,r)}}),[f,r]);const g=n.useCallback(e=>v.current.onChange({target:{value:aV(e),name:r},type:a0.CHANGE}),[r]);const b=n.useCallback(()=>v.current.onBlur({target:{value:aX(o._formValues,r),name:r},type:a0.BLUR}),[r,o._formValues]);const _=n.useCallback(e=>{const t=aX(o._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()}}},[o._fields,r]);const y=n.useMemo(()=>({name:r,value:d,...aJ(i)||f.disabled?{disabled:f.disabled||i}:{},onChange:g,onBlur:b,ref:_}),[r,i,f.disabled,g,b,_,d]);n.useEffect(()=>{const e=o._options.shouldUnregister||a;const t=h.current;if(t&&t!==r&&!c){o.unregister(t)}o.register(r,{...p.current.rules,...aJ(p.current.disabled)?{disabled:p.current.disabled}:{}});const n=(e,t)=>{const r=aX(o._fields,e);if(r&&r._f){r._f.mount=t}};n(r,true);if(e){const e=aq(aX(o._options.defaultValues,r,p.current.defaultValue));aZ(o._defaultValues,r,e);if(aG(aX(o._formValues,r))){aZ(o._formValues,r,e)}}!c&&o.register(r);h.current=r;return()=>{(c?e&&!o._state.action:e)?o.unregister(r):n(r,false)}},[r,o,c,a]);n.useEffect(()=>{o._setDisabledField({disabled:i,name:r})},[i,r,o]);return n.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}/**
 * 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 so=e=>e.render(si(e));const sa=e=>{const t={};for(const r of Object.keys(e)){if(aN(e[r])&&e[r]!==null){const n=sa(e[r]);for(const e of Object.keys(n)){t[`${r}.${e}`]=n[e]}}else{t[r]=e[r]}}return t};const ss="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 sl(e){const t=a4();const[r,n]=React.useState(false);const{control:i=t.control,onSubmit:o,children:a,action:s,method:l=ss,headers:c,encType:u,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 a=new FormData;let f="";try{f=JSON.stringify(e)}catch(e){}const v=sa(i._formValues);for(const e in v){a.append(e,v[e])}if(o){await o({data:e,event:t,method:l,formData:a,formDataJson:f})}if(s){try{const e=[c&&c["Content-Type"],u].some(e=>e&&e.includes("json"));const t=await fetch(String(s),{method:l,headers:{...c,...u&&u!=="multipart/form-data"?{"Content-Type":u}:{}},body:e?f:a});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:l,encType:u,onSubmit:m,...v},a)}var sc=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||true}}:{};var su=e=>Array.isArray(e)?e:[e];var sd=()=>{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 sf(e,t){const r={};for(const n in e){if(e.hasOwnProperty(n)){const i=e[n];const o=t[n];if(i&&aH(i)&&o){const e=sf(i,o);if(aH(e)){r[n]=e}}else if(e[n]){r[n]=o}}}return r}var sp=e=>aH(e)&&!Object.keys(e).length;var sh=e=>e.type==="file";var sv=e=>typeof e==="function";var sm=e=>{if(!az){return false}const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)};var sg=e=>e.type===`select-multiple`;var sb=e=>e.type==="radio";var s_=e=>sb(e)||aj(e);var sy=e=>sm(e)&&e.isConnected;function sx(e,t){const r=t.slice(0,-1).length;let n=0;while(n<r){e=aG(e)?n++:e[t[n++]]}return e}function sw(e){for(const t in e){if(e.hasOwnProperty(t)&&!aG(e[t])){return false}}return true}function sA(e,t){const r=Array.isArray(t)?t:aW(t)?[t]:aQ(t);const n=r.length===1?e:sx(e,r);const i=r.length-1;const o=r[i];if(n){delete n[o]}if(i!==0&&(aH(n)&&sp(n)||Array.isArray(n)&&sw(n))){sA(e,r.slice(0,-1))}return e}var sE=e=>{for(const t in e){if(sv(e[t])){return true}}return false};function sI(e){return Array.isArray(e)||aH(e)&&!sE(e)}function sk(e,t={}){for(const r in e){const n=e[r];if(sI(n)){t[r]=Array.isArray(n)?[]:{};sk(n,t[r])}else if(!aG(n)){t[r]=true}}return t}function sS(e,t,r){if(!r){r=sk(t)}for(const n in e){const i=e[n];if(sI(i)){if(aG(t)||st(r[n])){r[n]=sk(i,Array.isArray(i)?[]:{})}else{sS(i,aL(t)?{}:t[n],r[n])}}else{const e=t[n];r[n]=!sr(i,e)}}return r}const sO={value:false,isValid:false};const sT={value:true,isValid:true};var sC=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&&!aG(e[0].attributes.value)?aG(e[0].value)||e[0].value===""?sT:{value:e[0].value,isValid:true}:sT:sO}return sO};var sR=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>aG(e)?e:t?e===""?NaN:e?+e:e:r&&a7(e)?new Date(e):n?n(e):e;const sD={isValid:false,value:null};var sF=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:true,value:t.value}:e,sD):sD;function sY(e){const t=e.ref;if(sh(t)){return t.files}if(sb(t)){return sF(e.refs).value}if(sg(t)){return[...t.selectedOptions].map(({value:e})=>e)}if(aj(t)){return sC(e.refs).value}return sR(aG(t.value)?e.ref.value:t.value,e)}var sM=(e,t,r,n)=>{const i={};for(const r of e){const e=aX(t,r);e&&aZ(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}};var sj=e=>e instanceof RegExp;var sP=e=>aG(e)?e:sj(e)?e.source:aH(e)?sj(e.value)?e.value.source:e.value:e;var sL=e=>({isOnSubmit:!e||e===a1.onSubmit,isOnBlur:e===a1.onBlur,isOnChange:e===a1.onChange,isOnAll:e===a1.all,isOnTouch:e===a1.onTouched});const sN="AsyncFunction";var sH=e=>!!e&&!!e.validate&&!!(sv(e.validate)&&e.validate.constructor.name===sN||aH(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===sN));var sV=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);var sU=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const sK=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=aX(e,i);if(r){const{_f:e,...o}=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(sK(o,t)){break}}}else if(aH(o)){if(sK(o,t)){break}}}}return};function sB(e,t,r){const n=aX(e,r);if(n||aW(r)){return{error:n,name:r}}const i=r.split(".");while(i.length){const n=i.join(".");const o=aX(t,n);const a=aX(e,n);if(o&&!Array.isArray(o)&&r!==n){return{name:r}}if(a&&a.type){return{name:n,error:a}}if(a&&a.root&&a.root.type){return{name:`${n}.root`,error:a.root}}i.pop()}return{name:r}}var sz=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return sp(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!n||a1.all))};var sq=(e,t,r)=>!e||!t||e===t||su(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));var sW=(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 sG=(e,t)=>!a$(aX(e,t)).length&&sA(e,t);var s$=(e,t,r)=>{const n=su(aX(e,r));aZ(n,"root",t[r]);aZ(e,r,n);return e};function sQ(e,t,r="validate"){if(a7(e)||Array.isArray(e)&&e.every(a7)||aJ(e)&&!e){return{type:r,message:a7(e)?e:"",ref:t}}}var sX=e=>aH(e)&&!sj(e)?e:{value:e,message:""};var sJ=async(e,t,r,n,i,o)=>{const{ref:a,refs:s,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:p,validate:h,name:v,valueAsNumber:m,mount:g}=e._f;const b=aX(r,v);if(!g||t.has(v)){return{}}const _=s?s[0]:a;const y=e=>{if(i&&_.reportValidity){_.setCustomValidity(aJ(e)?"":e||"");_.reportValidity()}};const x={};const w=sb(a);const A=aj(a);const E=w||A;const I=(m||sh(a))&&aG(a.value)&&aG(b)||sm(a)&&a.value===""||b===""||Array.isArray(b)&&!b.length;const k=sc.bind(null,v,n,x);const S=(e,t,r,n=a2.maxLength,i=a2.minLength)=>{const o=e?t:r;x[v]={type:e?n:i,message:o,ref:a,...k(e?n:i,o)}};if(o?!Array.isArray(b)||!b.length:l&&(!E&&(I||aL(b))||aJ(b)&&!b||A&&!sC(s).isValid||w&&!sF(s).isValid)){const{value:e,message:t}=a7(l)?{value:!!l,message:l}:sX(l);if(e){x[v]={type:a2.required,message:t,ref:_,...k(a2.required,t)};if(!n){y(t);return x}}}if(!I&&(!aL(d)||!aL(f))){let e;let t;const r=sX(f);const i=sX(d);if(!aL(b)&&!isNaN(b)){const n=a.valueAsNumber||(b?+b:b);if(!aL(r.value)){e=n>r.value}if(!aL(i.value)){t=n<i.value}}else{const n=a.valueAsDate||new Date(b);const o=e=>new Date(new Date().toDateString()+" "+e);const s=a.type=="time";const l=a.type=="week";if(a7(r.value)&&b){e=s?o(b)>o(r.value):l?b>r.value:n>new Date(r.value)}if(a7(i.value)&&b){t=s?o(b)<o(i.value):l?b<i.value:n<new Date(i.value)}}if(e||t){S(!!e,r.message,i.message,a2.max,a2.min);if(!n){y(x[v].message);return x}}}if((c||u)&&!I&&(a7(b)||o&&Array.isArray(b))){const e=sX(c);const t=sX(u);const r=!aL(e.value)&&b.length>+e.value;const i=!aL(t.value)&&b.length<+t.value;if(r||i){S(r,e.message,t.message);if(!n){y(x[v].message);return x}}}if(p&&!I&&a7(b)){const{value:e,message:t}=sX(p);if(sj(e)&&!b.match(e)){x[v]={type:a2.pattern,message:t,ref:a,...k(a2.pattern,t)};if(!n){y(t);return x}}}if(h){if(sv(h)){const e=await h(b,r);const t=sQ(e,_);if(t){x[v]={...t,...k(a2.validate,t.message)};if(!n){y(t.message);return x}}}else if(aH(h)){let e={};for(const t in h){if(!sp(e)&&!n){break}const i=sQ(await h[t](b,r),_,t);if(i){e={...i,...k(t,i.message)};y(i.message);if(n){x[v]=e}}}if(!sp(e)){x[v]={ref:_,...e};if(!n){return x}}}}y(true);return x};const sZ={mode:a1.onSubmit,reValidateMode:a1.onChange,shouldFocusError:true};function s0(e={}){let t={...sZ,...e};let r={submitCount:0,isDirty:false,isReady:false,isLoading:sv(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 i=aH(t.defaultValues)||aH(t.values)?aq(t.defaultValues||t.values)||{}:{};let o=t.shouldUnregister?{}:aq(i);let a={action:false,mount:false,watch:false};let s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set};let l;let c=0;const u={isDirty:false,dirtyFields:false,validatingFields:false,touchedFields:false,isValidating:false,isValid:false,errors:false};let d={...u};const f={array:sd(),state:sd()};const p=t.criteriaMode===a1.all;const h=e=>t=>{clearTimeout(c);c=setTimeout(e,t)};const v=async e=>{if(!t.disabled&&(u.isValid||d.isValid||e)){const e=t.resolver?sp((await A()).errors):await I(n,true);if(e!==r.isValid){f.state.next({isValid:e})}}};const m=(e,n)=>{if(!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)){(e||Array.from(s.mount)).forEach(e=>{if(e){n?aZ(r.validatingFields,e,n):sA(r.validatingFields,e)}});f.state.next({validatingFields:r.validatingFields,isValidating:!sp(r.validatingFields)})}};const g=(e,s=[],l,c,p=true,h=true)=>{if(c&&l&&!t.disabled){a.action=true;if(h&&Array.isArray(aX(n,e))){const t=l(aX(n,e),c.argA,c.argB);p&&aZ(n,e,t)}if(h&&Array.isArray(aX(r.errors,e))){const t=l(aX(r.errors,e),c.argA,c.argB);p&&aZ(r.errors,e,t);sG(r.errors,e)}if((u.touchedFields||d.touchedFields)&&h&&Array.isArray(aX(r.touchedFields,e))){const t=l(aX(r.touchedFields,e),c.argA,c.argB);p&&aZ(r.touchedFields,e,t)}if(u.dirtyFields||d.dirtyFields){r.dirtyFields=sS(i,o)}f.state.next({name:e,isDirty:S(e,s),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else{aZ(o,e,s)}};const b=(e,t)=>{aZ(r.errors,e,t);f.state.next({errors:r.errors})};const _=e=>{r.errors=e;f.state.next({errors:r.errors,isValid:false})};const y=(e,t,r,s)=>{const l=aX(n,e);if(l){const n=aX(o,e,aG(r)?aX(i,e):r);aG(n)||s&&s.defaultChecked||t?aZ(o,e,t?n:sY(l._f)):C(e,n);a.mount&&!a.action&&v()}};const x=(e,n,o,a,s)=>{let l=false;let c=false;const p={name:e};if(!t.disabled){if(!o||a){if(u.isDirty||d.isDirty){c=r.isDirty;r.isDirty=p.isDirty=S();l=c!==p.isDirty}const t=sr(aX(i,e),n);c=!!aX(r.dirtyFields,e);t?sA(r.dirtyFields,e):aZ(r.dirtyFields,e,true);p.dirtyFields=r.dirtyFields;l=l||(u.dirtyFields||d.dirtyFields)&&c!==!t}if(o){const t=aX(r.touchedFields,e);if(!t){aZ(r.touchedFields,e,o);p.touchedFields=r.touchedFields;l=l||(u.touchedFields||d.touchedFields)&&t!==o}}l&&s&&f.state.next(p)}return l?p:{}};const w=(e,n,i,o)=>{const a=aX(r.errors,e);const s=(u.isValid||d.isValid)&&aJ(n)&&r.isValid!==n;if(t.delayError&&i){l=h(()=>b(e,i));l(t.delayError)}else{clearTimeout(c);l=null;i?aZ(r.errors,e,i):sA(r.errors,e)}if((i?!sr(a,i):a)||!sp(o)||s){const t={...o,...s&&aJ(n)?{isValid:n}:{},errors:r.errors,name:e};r={...r,...t};f.state.next(t)}};const A=async e=>{m(e,true);const r=await t.resolver(o,t.context,sM(e||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));m(e);return r};const E=async e=>{const{errors:t}=await A(e);if(e){for(const n of e){const e=aX(t,n);e?aZ(r.errors,n,e):sA(r.errors,n)}}else{r.errors=t}return t};const I=async(e,n,i={valid:true})=>{for(const a in e){const l=e[a];if(l){const{_f:e,...a}=l;if(e){const a=s.array.has(e.name);const c=l._f&&sH(l._f);if(c&&u.validatingFields){m([e.name],true)}const d=await sJ(l,s.disabled,o,p,t.shouldUseNativeValidation&&!n,a);if(c&&u.validatingFields){m([e.name])}if(d[e.name]){i.valid=false;if(n){break}}!n&&(aX(d,e.name)?a?s$(r.errors,d,e.name):aZ(r.errors,e.name,d[e.name]):sA(r.errors,e.name))}!sp(a)&&await I(a,n,i)}}return i.valid};const k=()=>{for(const e of s.unMount){const t=aX(n,e);t&&(t._f.refs?t._f.refs.every(e=>!sy(e)):!sy(t._f.ref))&&K(e)}s.unMount=new Set};const S=(e,r)=>!t.disabled&&(e&&r&&aZ(o,e,r),!sr(j(),i));const O=(e,t,r)=>se(e,s,{...a.mount?o:aG(t)?i:a7(e)?{[e]:t}:t},r,t);const T=e=>a$(aX(a.mount?o:i,e,t.shouldUnregister?aX(i,e,[]):[]));const C=(e,t,r={})=>{const i=aX(n,e);let a=t;if(i){const r=i._f;if(r){!r.disabled&&aZ(o,e,sR(t,r));a=sm(r.ref)&&aL(t)?"":t;if(sg(r.ref)){[...r.ref.options].forEach(e=>e.selected=a.includes(e.value))}else if(r.refs){if(aj(r.ref)){r.refs.forEach(e=>{if(!e.defaultChecked||!e.disabled){if(Array.isArray(a)){e.checked=!!a.find(t=>t===e.value)}else{e.checked=a===e.value||!!a}}})}else{r.refs.forEach(e=>e.checked=e.value===a)}}else if(sh(r.ref)){r.ref.value=""}else{r.ref.value=a;if(!r.ref.type){f.state.next({name:e,values:aq(o)})}}}}(r.shouldDirty||r.shouldTouch)&&x(e,a,r.shouldTouch,r.shouldDirty,true);r.shouldValidate&&M(e)};const R=(e,t,r)=>{for(const i in t){if(!t.hasOwnProperty(i)){return}const o=t[i];const a=e+"."+i;const l=aX(n,a);(s.array.has(e)||aH(o)||l&&!l._f)&&!aP(o)?R(a,o,r):C(a,o,r)}};const D=(e,t,l={})=>{const c=aX(n,e);const p=s.array.has(e);const h=aq(t);aZ(o,e,h);if(p){f.array.next({name:e,values:aq(o)});if((u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&l.shouldDirty){f.state.next({name:e,dirtyFields:sS(i,o),isDirty:S(e,h)})}}else{c&&!c._f&&!aL(h)?R(e,h,l):C(e,h,l)}sU(e,s)&&f.state.next({...r,name:e});f.state.next({name:a.mount?e:undefined,values:aq(o)})};const F=async e=>{a.mount=true;const i=e.target;let c=i.name;let h=true;const g=aX(n,c);const b=e=>{h=Number.isNaN(e)||aP(e)&&isNaN(e.getTime())||sr(e,aX(o,c,e))};const _=sL(t.mode);const y=sL(t.reValidateMode);if(g){let a;let E;const k=i.type?sY(g._f):aV(e);const S=e.type===a0.BLUR||e.type===a0.FOCUS_OUT;const O=!sV(g._f)&&!t.resolver&&!aX(r.errors,c)&&!g._f.deps||sW(S,aX(r.touchedFields,c),r.isSubmitted,y,_);const T=sU(c,s,S);aZ(o,c,k);if(S){if(!i||!i.readOnly){g._f.onBlur&&g._f.onBlur(e);l&&l(0)}}else if(g._f.onChange){g._f.onChange(e)}const C=x(c,k,S);const R=!sp(C)||T;!S&&f.state.next({name:c,type:e.type,values:aq(o)});if(O){if(u.isValid||d.isValid){if(t.mode==="onBlur"){if(S){v()}}else if(!S){v()}}return R&&f.state.next({name:c,...T?{}:C})}!S&&T&&f.state.next({...r});if(t.resolver){const{errors:e}=await A([c]);b(k);if(h){const t=sB(r.errors,n,c);const i=sB(e,n,t.name||c);a=i.error;c=i.name;E=sp(e)}}else{m([c],true);a=(await sJ(g,s.disabled,o,p,t.shouldUseNativeValidation))[c];m([c]);b(k);if(h){if(a){E=false}else if(u.isValid||d.isValid){E=await I(n,true)}}}if(h){g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&M(g._f.deps);w(c,E,a,C)}}};const Y=(e,t)=>{if(aX(r.errors,t)&&e.focus){e.focus();return 1}return};const M=async(e,i={})=>{let o;let a;const l=su(e);if(t.resolver){const t=await E(aG(e)?e:l);o=sp(t);a=e?!l.some(e=>aX(t,e)):o}else if(e){a=(await Promise.all(l.map(async e=>{const t=aX(n,e);return await I(t&&t._f?{[e]:t}:t)}))).every(Boolean);!(!a&&!r.isValid)&&v()}else{a=o=await I(n)}f.state.next({...!a7(e)||(u.isValid||d.isValid)&&o!==r.isValid?{}:{name:e},...t.resolver||!e?{isValid:o}:{},errors:r.errors});i.shouldFocus&&!a&&sK(n,Y,e?l:s.mount);return a};const j=(e,t)=>{let n={...a.mount?o:i};if(t){n=sf(t.dirtyFields?r.dirtyFields:r.touchedFields,n)}return aG(e)?n:a7(e)?aX(n,e):e.map(e=>aX(n,e))};const P=(e,t)=>({invalid:!!aX((t||r).errors,e),isDirty:!!aX((t||r).dirtyFields,e),error:aX((t||r).errors,e),isValidating:!!aX(r.validatingFields,e),isTouched:!!aX((t||r).touchedFields,e)});const L=e=>{e&&su(e).forEach(e=>sA(r.errors,e));f.state.next({errors:e?r.errors:{}})};const N=(e,t,i)=>{const o=(aX(n,e,{_f:{}})._f||{}).ref;const a=aX(r.errors,e)||{};// Don't override existing error messages elsewhere in the object tree.
const{ref:s,message:l,type:c,...u}=a;aZ(r.errors,e,{...u,...t,ref:o});f.state.next({name:e,errors:r.errors,isValid:false});i&&i.shouldFocus&&o&&o.focus&&o.focus()};const H=(e,t)=>sv(e)?f.state.subscribe({next:r=>"values"in r&&e(O(undefined,t),r)}):O(e,t,true);const V=e=>f.state.subscribe({next:t=>{if(sq(e.name,t.name,e.exact)&&sz(t,e.formState||u,Z,e.reRenderRoot)){e.callback({values:{...o},...r,...t,defaultValues:i})}}}).unsubscribe;const U=e=>{a.mount=true;d={...d,...e.formState};return V({...e,formState:d})};const K=(e,a={})=>{for(const l of e?su(e):s.mount){s.mount.delete(l);s.array.delete(l);if(!a.keepValue){sA(n,l);sA(o,l)}!a.keepError&&sA(r.errors,l);!a.keepDirty&&sA(r.dirtyFields,l);!a.keepTouched&&sA(r.touchedFields,l);!a.keepIsValidating&&sA(r.validatingFields,l);!t.shouldUnregister&&!a.keepDefaultValue&&sA(i,l)}f.state.next({values:aq(o)});f.state.next({...r,...!a.keepDirty?{}:{isDirty:S()}});!a.keepIsValid&&v()};const B=({disabled:e,name:t})=>{if(aJ(e)&&a.mount||!!e||s.disabled.has(t)){e?s.disabled.add(t):s.disabled.delete(t)}};const z=(e,r={})=>{let o=aX(n,e);const l=aJ(r.disabled)||aJ(t.disabled);aZ(n,e,{...o||{},_f:{...o&&o._f?o._f:{ref:{name:e}},name:e,mount:true,...r}});s.mount.add(e);if(o){B({disabled:aJ(r.disabled)?r.disabled:t.disabled,name:e})}else{y(e,true,r.value)}return{...l?{disabled:r.disabled||t.disabled}:{},...t.progressive?{required:!!r.required,min:sP(r.min),max:sP(r.max),minLength:sP(r.minLength),maxLength:sP(r.maxLength),pattern:sP(r.pattern)}:{},name:e,onChange:F,onBlur:F,ref:l=>{if(l){z(e,r);o=aX(n,e);const t=aG(l.value)?l.querySelectorAll?l.querySelectorAll("input,select,textarea")[0]||l:l:l;const a=s_(t);const s=o._f.refs||[];if(a?s.find(e=>e===t):t===o._f.ref){return}aZ(n,e,{_f:{...o._f,...a?{refs:[...s.filter(sy),t,...Array.isArray(aX(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}});y(e,false,undefined,t)}else{o=aX(n,e,{});if(o._f){o._f.mount=false}(t.shouldUnregister||r.shouldUnregister)&&!(aK(s.array,e)&&a.action)&&s.unMount.add(e)}}}};const q=()=>t.shouldFocusError&&sK(n,Y,s.mount);const W=e=>{if(aJ(e)){f.state.next({disabled:e});sK(n,(t,r)=>{const i=aX(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 G=(e,i)=>async a=>{let l=undefined;if(a){a.preventDefault&&a.preventDefault();a.persist&&a.persist()}let c=aq(o);f.state.next({isSubmitting:true});if(t.resolver){const{errors:e,values:t}=await A();r.errors=e;c=aq(t)}else{await I(n)}if(s.disabled.size){for(const e of s.disabled){sA(c,e)}}sA(r.errors,"root");if(sp(r.errors)){f.state.next({errors:{}});try{await e(c,a)}catch(e){l=e}}else{if(i){await i({...r.errors},a)}q();setTimeout(q)}f.state.next({isSubmitted:true,isSubmitting:false,isSubmitSuccessful:sp(r.errors)&&!l,submitCount:r.submitCount+1,errors:r.errors});if(l){throw l}};const $=(e,t={})=>{if(aX(n,e)){if(aG(t.defaultValue)){D(e,aq(aX(i,e)))}else{D(e,t.defaultValue);aZ(i,e,aq(t.defaultValue))}if(!t.keepTouched){sA(r.touchedFields,e)}if(!t.keepDirty){sA(r.dirtyFields,e);r.isDirty=t.defaultValue?S(e,aq(aX(i,e))):S()}if(!t.keepError){sA(r.errors,e);u.isValid&&v()}f.state.next({...r})}};const Q=(e,l={})=>{const c=e?aq(e):i;const d=aq(c);const p=sp(e);const h=p?i:d;if(!l.keepDefaultValues){i=c}if(!l.keepValues){if(l.keepDirtyValues){const e=new Set([...s.mount,...Object.keys(sS(i,o))]);for(const t of Array.from(e)){aX(r.dirtyFields,t)?aZ(h,t,aX(o,t)):D(t,aX(h,t))}}else{if(az&&aG(e)){for(const e of s.mount){const t=aX(n,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(sm(e)){const t=e.closest("form");if(t){t.reset();break}}}}}if(l.keepFieldsRef){for(const e of s.mount){D(e,aX(h,e))}}else{n={}}}o=t.shouldUnregister?l.keepDefaultValues?aq(i):{}:aq(h);f.array.next({values:{...h}});f.state.next({values:{...h}})}s={mount:l.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:false,focus:""};a.mount=!u.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!t.shouldUnregister&&!sp(h);a.watch=!!t.shouldUnregister;f.state.next({submitCount:l.keepSubmitCount?r.submitCount:0,isDirty:p?false:l.keepDirty?r.isDirty:!!(l.keepDefaultValues&&!sr(e,i)),isSubmitted:l.keepIsSubmitted?r.isSubmitted:false,dirtyFields:p?{}:l.keepDirtyValues?l.keepDefaultValues&&o?sS(i,o):r.dirtyFields:l.keepDefaultValues&&e?sS(i,e):l.keepDirty?r.dirtyFields:{},touchedFields:l.keepTouched?r.touchedFields:{},errors:l.keepErrors?r.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?r.isSubmitSuccessful:false,isSubmitting:false,defaultValues:i})};const X=(e,t)=>Q(sv(e)?e(o):e,t);const J=(e,t={})=>{const r=aX(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&&sv(e.select)&&e.select()}}};const Z=e=>{r={...r,...e}};const ee=()=>sv(t.defaultValues)&&t.defaultValues().then(e=>{X(e,t.resetOptions);f.state.next({isLoading:false})});const et={control:{register:z,unregister:K,getFieldState:P,handleSubmit:G,setError:N,_subscribe:V,_runSchema:A,_focusError:q,_getWatch:O,_getDirty:S,_setValid:v,_setFieldArray:g,_setDisabledField:B,_setErrors:_,_getFieldArray:T,_reset:Q,_resetDefaultValues:ee,_removeUnmounted:k,_disableForm:W,_subjects:f,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return a},set _state(value){a=value},get _defaultValues(){return i},get _names(){return s},set _names(value){s=value},get _formState(){return r},get _options(){return t},set _options(value){t={...t,...value}}},subscribe:U,trigger:M,register:z,handleSubmit:G,watch:H,setValue:D,getValues:j,reset:X,resetField:$,clearErrors:L,unregister:K,setError:N,setFocus:J,getFieldState:P};return{...et,formControl:et}}var s1=()=>{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 s2=(e,t,r={})=>r.shouldFocus||aG(r.shouldFocus)?r.focusName||`${e}.${aG(r.focusIndex)?t:r.focusIndex}.`:"";var s6=(e,t)=>[...e,...su(t)];var s4=e=>Array.isArray(e)?e.map(()=>undefined):undefined;function s5(e,t,r){return[...e.slice(0,t),...su(r),...e.slice(t)]}var s3=(e,t,r)=>{if(!Array.isArray(e)){return[]}if(aG(e[r])){e[r]=undefined}e.splice(r,0,e.splice(t,1)[0]);return e};var s8=(e,t)=>[...su(t),...su(e)];function s9(e,t){let r=0;const n=[...e];for(const e of t){n.splice(e-r,1);r++}return a$(n).length?n:[]}var s7=(e,t)=>aG(t)?[]:s9(e,su(t).sort((e,t)=>e-t));var le=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};var lt=(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 lr(e){const t=a4();const{control:r=t.control,name:n,keyName:i="id",shouldUnregister:o,rules:a}=e;const[s,l]=React.useState(r._getFieldArray(n));const c=React.useRef(r._getFieldArray(n).map(s1));const u=React.useRef(false);r._names.array.add(n);React.useMemo(()=>a&&s.length>=0&&r.register(n,a),[r,n,s.length,a]);a8(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===n||!t){const t=aX(e,n);if(Array.isArray(t)){l(t);c.current=t.map(s1)}}}}).unsubscribe,[r,n]);const d=React.useCallback(e=>{u.current=true;r._setFieldArray(n,e)},[r,n]);const f=(e,t)=>{const i=su(aq(e));const o=s6(r._getFieldArray(n),i);r._names.focus=s2(n,o.length-1,t);c.current=s6(c.current,i.map(s1));d(o);l(o);r._setFieldArray(n,o,s6,{argA:s4(e)})};const p=(e,t)=>{const i=su(aq(e));const o=s8(r._getFieldArray(n),i);r._names.focus=s2(n,0,t);c.current=s8(c.current,i.map(s1));d(o);l(o);r._setFieldArray(n,o,s8,{argA:s4(e)})};const h=e=>{const t=s7(r._getFieldArray(n),e);c.current=s7(c.current,e);d(t);l(t);!Array.isArray(aX(r._fields,n))&&aZ(r._fields,n,undefined);r._setFieldArray(n,t,s7,{argA:e})};const v=(e,t,i)=>{const o=su(aq(t));const a=s5(r._getFieldArray(n),e,o);r._names.focus=s2(n,e,i);c.current=s5(c.current,e,o.map(s1));d(a);l(a);r._setFieldArray(n,a,s5,{argA:e,argB:s4(t)})};const m=(e,t)=>{const i=r._getFieldArray(n);le(i,e,t);le(c.current,e,t);d(i);l(i);r._setFieldArray(n,i,le,{argA:e,argB:t},false)};const g=(e,t)=>{const i=r._getFieldArray(n);s3(i,e,t);s3(c.current,e,t);d(i);l(i);r._setFieldArray(n,i,s3,{argA:e,argB:t},false)};const b=(e,t)=>{const i=aq(t);const o=lt(r._getFieldArray(n),e,i);c.current=[...o].map((t,r)=>!t||r===e?s1():c.current[r]);d(o);l([...o]);r._setFieldArray(n,o,lt,{argA:e,argB:i},true,false)};const _=e=>{const t=su(aq(e));c.current=t.map(s1);d([...t]);l([...t]);r._setFieldArray(n,[...t],e=>e,{},true,false)};React.useEffect(()=>{r._state.action=false;sU(n,r._names)&&r._subjects.state.next({...r._formState});if(u.current&&(!sL(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!sL(r._options.reValidateMode).isOnSubmit){if(r._options.resolver){r._runSchema([n]).then(e=>{const t=aX(e.errors,n);const i=aX(r._formState.errors,n);if(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type){t?aZ(r._formState.errors,n,t):sA(r._formState.errors,n);r._subjects.state.next({errors:r._formState.errors})}})}else{const e=aX(r._fields,n);if(e&&e._f&&!(sL(r._options.reValidateMode).isOnSubmit&&sL(r._options.mode).isOnSubmit)){sJ(e,r._names.disabled,r._formValues,r._options.criteriaMode===a1.all,r._options.shouldUseNativeValidation,true).then(e=>!sp(e)&&r._subjects.state.next({errors:s$(r._formState.errors,e,n)}))}}}r._subjects.state.next({name:n,values:aq(r._formValues)});r._names.focus&&sK(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();u.current=false},[s,n,r]);React.useEffect(()=>{!aX(r._formValues,n)&&r._setFieldArray(n);return()=>{const e=(e,t)=>{const n=aX(r._fields,e);if(n&&n._f){n._f.mount=t}};r._options.shouldUnregister||o?r.unregister(n):e(n,false)}},[n,r,i,o]);return{swap:React.useCallback(m,[d,n,r]),move:React.useCallback(g,[d,n,r]),prepend:React.useCallback(p,[d,n,r]),append:React.useCallback(f,[d,n,r]),remove:React.useCallback(h,[d,n,r]),insert:React.useCallback(v,[d,n,r]),update:React.useCallback(b,[d,n,r]),replace:React.useCallback(_,[d,n,r]),fields:React.useMemo(()=>s.map((e,t)=>({...e,[i]:c.current[t]||s1()})),[s,i])}}/**
 * 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 ln(e={}){const t=n.useRef(undefined);const r=n.useRef(undefined);const[i,o]=n.useState({isDirty:false,isValidating:false,isLoading:sv(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:sv(e.defaultValues)?undefined:e.defaultValues});if(!t.current){if(e.formControl){t.current={...e.formControl,formState:i};if(e.defaultValues&&!sv(e.defaultValues)){e.formControl.reset(e.defaultValues,e.resetOptions)}}else{const{formControl:r,...n}=s0(e);t.current={...n,formState:i}}}const a=t.current.control;a._options=e;a8(()=>{const e=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:true});o(e=>({...e,isReady:true}));a._formState.isReady=true;return e},[a]);n.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]);n.useEffect(()=>{if(e.mode){a._options.mode=e.mode}if(e.reValidateMode){a._options.reValidateMode=e.reValidateMode}},[a,e.mode,e.reValidateMode]);n.useEffect(()=>{if(e.errors){a._setErrors(e.errors);a._focusError()}},[a,e.errors]);n.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]);n.useEffect(()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();if(e!==i.isDirty){a._subjects.state.next({isDirty:e})}}},[a,i.isDirty]);n.useEffect(()=>{var t;if(e.values&&!sr(e.values,r.current)){a._reset(e.values,{keepFieldsRef:true,...a._options.resetOptions});if(!((t=a._options.resetOptions)===null||t===void 0?void 0:t.keepIsValid)){a._setValid()}r.current=e.values;o(e=>({...e}))}else{a._resetDefaultValues()}},[a,e.values]);n.useEffect(()=>{if(!a._state.mount){a._setValid();a._state.mount=true}if(a._state.watch){a._state.watch=false;a._subjects.state.next({...a._formState})}a._removeUnmounted()});t.current.formState=a3(i,a);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 li=({control:e,names:t,render:r})=>r(sn({control:e,name:t}));//# sourceMappingURL=index.esm.mjs.map
// EXTERNAL MODULE: external "wp.i18n"
var lo=r(2470);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/controls/Show.tsx
var la=r(6025);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/Alert.tsx
var ls={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 ll=e=>{var{children:r,type:n="warning",icon:i}=e;return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:lu.wrapper({type:n}),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:i,children:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{style:lu.icon({type:n}),name:e,height:24,width:24})}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:r})]})};/* export default */const lc=ll;var lu={wrapper:e=>{var{type:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";display:flex;align-items:start;padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["12"] */.YK["12"],";width:100%;border-radius:",ik/* .borderRadius.card */.Vq.card,";gap:",ik/* .spacing["4"] */.YK["4"],";background-color:",ls.background[t],";color:",ls.text[t],";")},icon:e=>{var{type:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("color:",ls.icon[t],";flex-shrink:0;")}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useSelectKeyboardNavigation.ts
var ld=e=>{var{options:t,isOpen:r,onSelect:i,onClose:o,selectedValue:a}=e;var[s,l]=(0,n.useState)(-1);var c=(0,n.useCallback)(e=>{if(!r)return;var n=(e,r)=>{var n;var i=e;var o=r==="down"?1:-1;do{i+=o;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();l(e=>{var t=n(e===-1?0:e,"down");return t});break;case"ArrowUp":e.preventDefault();l(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 a=t[s];if(!a.disabled){o();i(a)}}break;case"Escape":e.preventDefault();e.stopPropagation();o();break;default:break}},[r,t,s,i,o]);(0,n.useEffect)(()=>{if(r){if(s===-1){var e=t.findIndex(e=>e.value===a);var n=e>=0?e:t.findIndex(e=>!e.disabled);l(n)}document.addEventListener("keydown",c,true);return()=>document.removeEventListener("keydown",c,true)}},[r,c,t,a,s]);(0,n.useEffect)(()=>{if(!r){l(-1)}},[r]);var u=(0,n.useCallback)(e=>{var r;if(!((r=t[e])===null||r===void 0?void 0:r.disabled)){l(e)}},[t]);return{activeIndex:s,setActiveIndex:u}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/FocusTrap.tsx
var lf=e=>{var{children:t,blurPrevious:r=false}=e;var i=(0,n.useRef)(null);var o=(0,n.useRef)(null);(0,n.useEffect)(()=>{var e=i.current;if(!e){return}o.current=document.activeElement;if(r&&o.current&&o.current!==document.body){o.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 a=()=>{var t=document.querySelectorAll('[data-focus-trap="true"]');return t.length>0&&t[t.length-1]===e};var s=t=>{if(!a()||t.key!=="Tab"){return}var r=n();if(r.length===0){return}var i=r[0];var o=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();o.focus();return}if(!t.shiftKey&&s===o){t.preventDefault();i.focus();return}};document.addEventListener("keydown",s,true);return()=>{document.removeEventListener("keydown",s,true);if(o.current&&t(o.current)){o.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 lp=lf;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useScrollLock.ts
var lh=null;var lv=[];var lm=null;var lg=()=>{if(lh!==null)return lh;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);lh=e.offsetWidth-t.offsetWidth;document.body.removeChild(e);return lh};var lb=()=>{if(lm){return}var e=lg();var t=window.innerWidth>document.documentElement.clientWidth;lm={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 l_=()=>{if(!lm){return}document.body.style.overflow=lm.overflow;document.body.style.paddingRight=lm.paddingRight;lm=null};var ly=()=>{var e=Symbol("scroll-lock");lv.push(e);if(lv.length===1){lb()}return e};var lx=new Set;var lw=e=>{var t=lv.indexOf(e);if(t===-1){return}lv.splice(t,1);lx.delete(e);if(lv.length===0&&lx.size===0){l_()}};var lA=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){lw(t.current);t.current=null}return}t.current=ly();return()=>{if(t.current){var e=t.current;t.current=null;lx.add(e);requestAnimationFrame(()=>{lw(e)})}}},[e])};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/usePortalPopover.tsx
var lE={SAFE_MARGIN:12,MAX_OFFSET_VERTICAL:6,MAX_OFFSET_HORIZONTAL:12,CENTER_OFFSET:8};var lI=4;var lk={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 lS=e=>{var t={[lk.TOP]:lk.TOP,[lk.TOP_LEFT]:lk.TOP_RIGHT,[lk.TOP_RIGHT]:lk.TOP_LEFT,[lk.RIGHT]:lk.LEFT,[lk.RIGHT_TOP]:lk.LEFT_TOP,[lk.RIGHT_BOTTOM]:lk.LEFT_BOTTOM,[lk.BOTTOM]:lk.BOTTOM,[lk.BOTTOM_LEFT]:lk.BOTTOM_RIGHT,[lk.BOTTOM_RIGHT]:lk.BOTTOM_LEFT,[lk.LEFT]:lk.RIGHT,[lk.LEFT_TOP]:lk.RIGHT_TOP,[lk.LEFT_BOTTOM]:lk.RIGHT_BOTTOM,[lk.MIDDLE]:lk.MIDDLE,[lk.ABSOLUTE_CENTER]:lk.ABSOLUTE_CENTER};return t[e]||e};var lO=e=>{return{top:e.top,left:-e.left}};var lT=(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 lC=(e,t)=>{return e.startsWith("top")&&t.top||e.startsWith("bottom")&&t.bottom||e.startsWith("left")&&t.left||e.startsWith("right")&&t.right};var lR=(e,t,r,n,i)=>{var{width:o,height:a}=r;var{top:s,left:l}=i;var c=t.left+t.width/2-o/2;var u=t.top+t.height/2-a/2;var d={[lk.TOP]:{top:t.top-a-n,left:c},[lk.TOP_LEFT]:{top:t.top-a-n,left:t.left},[lk.TOP_RIGHT]:{top:t.top-a-n,left:t.right-o},[lk.BOTTOM]:{top:t.bottom+n,left:c},[lk.BOTTOM_LEFT]:{top:t.bottom+n,left:t.left},[lk.BOTTOM_RIGHT]:{top:t.bottom+n,left:t.right-o},[lk.LEFT]:{top:u,left:t.left-o-n},[lk.LEFT_TOP]:{top:t.top,left:t.left-o-n},[lk.LEFT_BOTTOM]:{top:t.bottom-a,left:t.left-o-n},[lk.RIGHT]:{top:u,left:t.right+n},[lk.RIGHT_TOP]:{top:t.top,left:t.right+n},[lk.RIGHT_BOTTOM]:{top:t.bottom-a,left:t.right+n},[lk.MIDDLE]:{top:u,left:c},[lk.ABSOLUTE_CENTER]:{top:window.innerHeight/2-a/2,left:window.innerWidth/2-o/2}};var f=d[e]||d[lk.BOTTOM];return{top:f.top+s,left:f.left+l}};var lD=(e,t,r,n,i,o)=>{var a={[lk.TOP]:lk.BOTTOM,[lk.TOP_LEFT]:lk.BOTTOM_LEFT,[lk.TOP_RIGHT]:lk.BOTTOM_RIGHT,[lk.BOTTOM]:lk.TOP,[lk.BOTTOM_LEFT]:lk.TOP_LEFT,[lk.BOTTOM_RIGHT]:lk.TOP_RIGHT,[lk.LEFT]:lk.RIGHT,[lk.LEFT_TOP]:lk.RIGHT_TOP,[lk.LEFT_BOTTOM]:lk.RIGHT_BOTTOM,[lk.RIGHT]:lk.LEFT,[lk.RIGHT_TOP]:lk.LEFT_TOP,[lk.RIGHT_BOTTOM]:lk.LEFT_BOTTOM,[lk.MIDDLE]:lk.MIDDLE,[lk.ABSOLUTE_CENTER]:lk.ABSOLUTE_CENTER};var s=lT(e,r);var l=lC(t,s);if(!l){return{position:e,placement:t}}// Try opposite placement
var c=a[t];var u=lR(c,n,r,i,o);var d=lT(u,r);var f=lC(c,d);if(!f){return{position:u,placement:c}}return{position:e,placement:t}};var lF=(e,t,r,n)=>{var{width:i,height:o}=n;// Skip arrow for covered triggers or special placements
var a=[lk.MIDDLE,lk.ABSOLUTE_CENTER].includes(e);var s=r.left<t.left+lE.SAFE_MARGIN&&r.left+i>t.right-lE.SAFE_MARGIN&&r.top<t.top+lE.SAFE_MARGIN&&r.top+o>t.bottom-lE.SAFE_MARGIN;if(a||s)return{};var l=e.startsWith("top")||e.startsWith("bottom");var c=e.startsWith("left")||e.startsWith("right");if(l){var u=t.left+t.width/2;var d=Math.max(lE.SAFE_MARGIN,Math.min(i-lE.MAX_OFFSET_VERTICAL,u-r.left))-lE.CENTER_OFFSET;if(ak/* .isRTL */.V8){d=i-d-lE.CENTER_OFFSET*2}return{arrowLeft:d}}if(c){var f=t.top+t.height/2;var p=Math.max(lE.SAFE_MARGIN,Math.min(o-lE.MAX_OFFSET_HORIZONTAL,f-r.top))-lE.CENTER_OFFSET;return{arrowTop:p}}return{}};var lY=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lI;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 lM=e=>{var{isOpen:t,triggerRef:r,placement:i=lk.BOTTOM,arrow:o=false,gap:a=10,autoAdjustOverflow:s=true,positionModifier:l={top:0,left:0},dependencies:c=[]}=e;var u=(0,n.useMemo)(()=>r||{current:null},[r]);var d=(0,n.useRef)(null);var[f,p]=(0,n.useState)(0);var[h,v]=(0,n.useState)({left:0,top:0,placement:lk.BOTTOM});var m=(0,n.useMemo)(()=>{return ak/* .isRTL */.V8?lS(i):i},[i]);var g=(0,n.useMemo)(()=>{return ak/* .isRTL */.V8?lO(l):l},[l]);(0,n.useEffect)(()=>{if(!u.current)return;p(u.current.getBoundingClientRect().width)},[u]);(0,n.useEffect)(()=>{if(!t||!u.current||!d.current)return;var e=u.current.getBoundingClientRect();var r=d.current.getBoundingClientRect();var n={width:r.width||e.width,height:r.height};var i=lR(m,e,n,a,g);var l=m;if(s){var c=lD(i,m,n,e,a,g);i=c.position;l=c.placement}i=lY(i,n);var f=o?lF(l,e,i,n):{};v((0,ef._)((0,ep._)((0,ef._)({},i),{placement:l}),f))},[u,d,t,m,g,a,o,s,// eslint-disable-next-line react-hooks/exhaustive-deps
...c]);return{position:h,triggerWidth:f,triggerRef:u,popoverRef:d}};var lj=e=>{var{isOpen:r,children:i,onClickOutside:o,onEscape:a,animationType:s=ij.slideDown}=e;var{hasModalOnStack:l}=i7();lA(r);(0,n.useEffect)(()=>{var e=e=>{if(e.key==="Escape"){a===null||a===void 0?void 0:a()}};if(!r)return;document.addEventListener("keydown",e,true);return()=>{document.removeEventListener("keydown",e,true)}},[r,l,a]);var{transitions:c}=iL({data:r,animationType:s});return c((e,r)=>{if(!r){return null}return/*#__PURE__*/(0,is.createPortal)(/*#__PURE__*/(0,t/* .jsx */.Y)(iN,{css:lP.wrapper,style:e,children:/*#__PURE__*/(0,t/* .jsx */.Y)(lp,{children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{className:"tutor-portal-popover",role:"presentation",children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:lP.backdrop,onKeyUp:iV/* .noop */.lQ,onClick:e=>{e.stopPropagation();o===null||o===void 0?void 0:o()}}),i]})})}),document.body)})};var lP={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("position:fixed;z-index:",ik/* .zIndex.highest */.fE.highest,";inset:0;"),backdrop:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.centeredFlex */.x.centeredFlex,";position:fixed;inset:0;z-index:",ik/* .zIndex.negative */.fE.negative,";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/molecules/Popover.tsx
function lL(){var e=(0,eh._)(["\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            "]);lL=function t(){return e};return e}function lN(){var e=(0,eh._)(["\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            "]);lN=function t(){return e};return e}function lH(){var e=(0,eh._)(["\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            "]);lH=function t(){return e};return e}function lV(){var e=(0,eh._)(["\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            "]);lV=function t(){return e};return e}function lU(){var e=(0,eh._)(["\n            content: '';\n            position: absolute;\n            width: 0;\n            height: 0;\n            border-color: transparent;\n            border-style: solid;\n            ","\n            ","\n            ","\n            ","\n          "]);lU=function t(){return e};return e}var lK=e=>{var{children:r,placement:n=lk.BOTTOM,triggerRef:i,isOpen:o,gap:a,maxWidth:s,closePopover:l,closeOnEscape:c=true,animationType:u=ij.slideLeft,arrow:d=false,border:f=false,autoAdjustOverflow:p=true,positionModifier:h={top:0,left:0},dependencies:v=[]}=e;var{position:m,triggerWidth:g,popoverRef:b}=lM({triggerRef:i,isOpen:o,autoAdjustOverflow:p,placement:n,arrow:d,gap:a,positionModifier:h,dependencies:v});return/*#__PURE__*/(0,t/* .jsx */.Y)(lj,{isOpen:o,onClickOutside:l,animationType:u,onEscape:c?l:undefined,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:lB.wrapper({placement:ak/* .isRTL */.V8?lS(m.placement):m.placement,hideArrow:!d||m.arrowLeft===undefined&&m.arrowTop===undefined,arrowLeft:m.arrowLeft,arrowTop:m.arrowTop}),style:{left:m.left,top:m.top,maxWidth:s!==null&&s!==void 0?s:g},ref:b,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:lB.content({border:f}),children:r})})})};var lB={wrapper:e=>{var{placement:t,hideArrow:r,arrowLeft:n,arrowTop:i}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;width:100%;z-index:",ik/* .zIndex.dropdown */.fE.dropdown,";&::before{",t&&!r?(0,c/* .css */.AH)(lU(),t.startsWith("top")&&(0,c/* .css */.AH)(lL(),ik/* .colorTokens.stroke.white */.I6.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("bottom")&&(0,c/* .css */.AH)(lN(),ik/* .colorTokens.stroke.white */.I6.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("left")&&(0,c/* .css */.AH)(lH(),ik/* .colorTokens.stroke.white */.I6.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none"),t.startsWith("right")&&(0,c/* .css */.AH)(lV(),ik/* .colorTokens.stroke.white */.I6.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none")):"","}")},content:e=>{var{border:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("background-color:",ik/* .colorTokens.background.white */.I6.background.white,";box-shadow:",ik/* .shadow.popover */.r7.popover,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";border:",t?"1px solid ".concat(ik/* .colorTokens.stroke.divider */.I6.stroke.divider):"none",";::-webkit-scrollbar{background-color:",ik/* .colorTokens.background.white */.I6.background.white,";width:10px;}::-webkit-scrollbar-thumb{background-color:",ik/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";}")}};/* export default */const lz=lK;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/LoadingSpinner.tsx
var lq=/*#__PURE__*/(0,c/* .keyframes */.i7)("0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var lW=/*#__PURE__*/(0,c/* .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 lG=/*#__PURE__*/(0,c/* .keyframes */.i7)("	0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var l$={fullscreen:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:center;height:100vh;width:100vw;"),loadingOverlay:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;top:0;bottom:0;right:0;left:0;display:flex;align-items:center;justify-content:center;"),loadingSection:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:100px;display:flex;justify-content:center;align-items:center;"),svg:/*#__PURE__*/(0,c/* .css */.AH)("animation:",lq," 1.4s linear infinite;"),spinnerPath:/*#__PURE__*/(0,c/* .css */.AH)("stroke-dasharray:180;stroke-dashoffset:0;transform-origin:center;animation:",lW," 1.4s linear infinite;"),spinGradient:/*#__PURE__*/(0,c/* .css */.AH)("transition:transform;transform-origin:center;animation:",lG," 1s infinite linear;")};var lQ=e=>{var{size:r=30,color:n=ik/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"]}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)("svg",{width:r,height:r,css:l$.svg,viewBox:"0 0 86 86",xmlns:"http://www.w3.org/2000/svg",children:/*#__PURE__*/(0,t/* .jsx */.Y)("circle",{css:l$.spinnerPath,fill:"none",stroke:n,strokeWidth:"6",strokeLinecap:"round",cx:"43",cy:"43",r:"30"})})};var lX=()=>{return /*#__PURE__*/_jsx("div",{css:l$.loadingOverlay,children:/*#__PURE__*/_jsx(lQ,{})})};var lJ=()=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:l$.loadingSection,children:/*#__PURE__*/(0,t/* .jsx */.Y)(lQ,{})})};var lZ=()=>{return /*#__PURE__*/_jsx("div",{css:l$.fullscreen,children:/*#__PURE__*/_jsx(lQ,{})})};var l0=e=>{var{size:t=24}=e;return /*#__PURE__*/_jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[/*#__PURE__*/_jsx("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__*/_jsx("defs",{children:/*#__PURE__*/_jsxs("linearGradient",{id:"paint0_linear_2402_3559",x1:"4.50105",y1:"12",x2:"21.6571",y2:"6.7847",gradientUnits:"userSpaceOnUse",children:[/*#__PURE__*/_jsx("stop",{stopColor:"#FF9645"}),/*#__PURE__*/_jsx("stop",{offset:"0.152804",stopColor:"#FF6471"}),/*#__PURE__*/_jsx("stop",{offset:"0.467993",stopColor:"#CF6EBD"}),/*#__PURE__*/_jsx("stop",{offset:"0.671362",stopColor:"#A477D1"}),/*#__PURE__*/_jsx("stop",{offset:"1",stopColor:"#3E64DE"})]})})]})};/* export default */const l1=lQ;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js
function l2(e){if(e==null){return window}if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
function l6(e){var t=l2(e).Element;return e instanceof t||e instanceof Element}function l4(e){var t=l2(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function l5(e){// IE 11 has no ShadowRoot
if(typeof ShadowRoot==="undefined"){return false}var t=l2(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js
var l3=Math.max;var l8=Math.min;var l9=Math.round;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js
function l7(){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};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js
function ce(){return!/^((?!chrome|android).)*safari/i.test(l7())};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
function ct(e,t,r){if(t===void 0){t=false}if(r===void 0){r=false}var n=e.getBoundingClientRect();var i=1;var o=1;if(t&&l4(e)){i=e.offsetWidth>0?l9(n.width)/e.offsetWidth||1:1;o=e.offsetHeight>0?l9(n.height)/e.offsetHeight||1:1}var a=l6(e)?l2(e):window,s=a.visualViewport;var l=!ce()&&r;var c=(n.left+(l&&s?s.offsetLeft:0))/i;var u=(n.top+(l&&s?s.offsetTop:0))/o;var d=n.width/i;var f=n.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js
function cr(e){var t=l2(e);var r=t.pageXOffset;var n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js
function cn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js
function ci(e){if(e===l2(e)||!l4(e)){return cr(e)}else{return cn(e)}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js
function co(e){return e?(e.nodeName||"").toLowerCase():null};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js
function ca(e){// $FlowFixMe[incompatible-return]: assume body is always available
return((l6(e)?e.ownerDocument:e.document)||window.document).documentElement};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
function cs(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 ct(ca(e)).left+cr(e).scrollLeft};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js
function cl(e){return l2(e).getComputedStyle(e)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js
function cc(e){// Firefox wants us to check `-x` and `-y` variations as well
var t=cl(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js
function cu(e){var t=e.getBoundingClientRect();var r=l9(t.width)/e.offsetWidth||1;var n=l9(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 cd(e,t,r){if(r===void 0){r=false}var n=l4(t);var i=l4(t)&&cu(t);var o=ca(t);var a=ct(e,i,r);var s={scrollLeft:0,scrollTop:0};var l={x:0,y:0};if(n||!n&&!r){if(co(t)!=="body"||// https://github.com/popperjs/popper-core/issues/1078
cc(o)){s=ci(t)}if(l4(t)){l=ct(t,true);l.x+=t.clientLeft;l.y+=t.clientTop}else if(o){l.x=cs(o)}}return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
// Returns the layout rect of an element relative to its offsetParent. Layout
// means it doesn't take into account transforms.
function cf(e){var t=ct(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 n=e.offsetHeight;if(Math.abs(t.width-r)<=1){r=t.width}if(Math.abs(t.height-n)<=1){n=t.height}return{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js
function cp(e){if(co(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||(l5(e)?e.host:null)||// ShadowRoot detected
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
ca(e)// fallback
)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js
function ch(e){if(["html","body","#document"].indexOf(co(e))>=0){// $FlowFixMe[incompatible-return]: assume body is always available
return e.ownerDocument.body}if(l4(e)&&cc(e)){return e}return ch(cp(e))};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js
/*
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 cv(e,t){var r;if(t===void 0){t=[]}var n=ch(e);var i=n===((r=e.ownerDocument)==null?void 0:r.body);var o=l2(n);var a=i?[o].concat(o.visualViewport||[],cc(n)?n:[]):n;var s=t.concat(a);return i?s:s.concat(cv(cp(a)))};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js
function cm(e){return["table","td","th"].indexOf(co(e))>=0};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js
function cg(e){if(!l4(e)||// https://github.com/popperjs/popper-core/issues/837
cl(e).position==="fixed"){return null}return e.offsetParent}// `.offsetParent` reports `null` for fixed elements, while absolute elements
// return the containing block
function cb(e){var t=/firefox/i.test(l7());var r=/Trident/i.test(l7());if(r&&l4(e)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var n=cl(e);if(n.position==="fixed"){return null}}var i=cp(e);if(l5(i)){i=i.host}while(l4(i)&&["html","body"].indexOf(co(i))<0){var o=cl(i);// 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(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none"){return i}else{i=i.parentNode}}return null}// Gets the closest ancestor positioned element. Handles some edge cases,
// such as table ancestors and cross browser bugs.
function c_(e){var t=l2(e);var r=cg(e);while(r&&cm(r)&&cl(r).position==="static"){r=cg(r)}if(r&&(co(r)==="html"||co(r)==="body"&&cl(r).position==="static")){return t}return r||cb(e)||t};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/enums.js
var cy="top";var cx="bottom";var cw="right";var cA="left";var cE="auto";var cI=[cy,cx,cw,cA];var ck="start";var cS="end";var cO="clippingParents";var cT="viewport";var cC="popper";var cR="reference";var cD=/*#__PURE__*/cI.reduce(function(e,t){return e.concat([t+"-"+ck,t+"-"+cS])},[]);var cF=/*#__PURE__*/[].concat(cI,[cE]).reduce(function(e,t){return e.concat([t,t+"-"+ck,t+"-"+cS])},[]);// modifiers that need to read the DOM
var cY="beforeRead";var cM="read";var cj="afterRead";// pure-logic modifiers
var cP="beforeMain";var cL="main";var cN="afterMain";// modifier with the purpose to write to the DOM (or write into a framework state)
var cH="beforeWrite";var cV="write";var cU="afterWrite";var cK=[cY,cM,cj,cP,cL,cN,cH,cV,cU];// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js
// source: https://stackoverflow.com/questions/49875255
function cB(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 o=[].concat(e.requires||[],e.requiresIfExists||[]);o.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 cz(e){// order based on dependencies
var t=cB(e);// order based on phase
return cK.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js
function cq(e){var t;return function(){if(!t){t=new Promise(function(r){Promise.resolve().then(function(){t=undefined;r(e())})})}return t}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js
function cW(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]})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js
var cG={placement:"bottom",modifiers:[],strategy:"absolute"};function c$(){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 cQ(e){if(e===void 0){e={}}var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?cG:i;return function e(e,t,r){if(r===void 0){r=o}var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},cG,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}};var a=[];var s=false;var l={state:i,setOptions:function r(r){var a=typeof r==="function"?r(i.options):r;u();i.options=Object.assign({},o,i.options,a);i.scrollParents={reference:l6(e)?cv(e):e.contextElement?cv(e.contextElement):[],popper:cv(t)};// Orders the modifiers based on their dependencies and `phase`
// properties
var s=cz(cW([].concat(n,i.options.modifiers)));// Strip out disabled modifiers
i.orderedModifiers=s.filter(function(e){return e.enabled});c();return l.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(s){return}var e=i.elements,t=e.reference,r=e.popper;// Don't proceed if `reference` or `popper` are not valid elements
// anymore
if(!c$(t,r)){return}// Store the reference and popper rects to be read by modifiers
i.rects={reference:cd(t,c_(r),i.options.strategy==="fixed"),popper:cf(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
i.reset=false;i.placement=i.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`
i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<i.orderedModifiers.length;n++){if(i.reset===true){i.reset=false;n=-1;continue}var o=i.orderedModifiers[n],a=o.fn,c=o.options,u=c===void 0?{}:c,d=o.name;if(typeof a==="function"){i=a({state:i,options:u,name:d,instance:l})||i}}},// Async and optimistically optimized update – it will not be executed if
// not necessary (debounced to run at most once-per-tick)
update:cq(function(){return new Promise(function(e){l.forceUpdate();e(i)})}),destroy:function e(){u();s=true}};if(!c$(e,t)){return l}l.setOptions(r).then(function(e){if(!s&&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 c(){i.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=r===void 0?{}:r,o=e.effect;if(typeof o==="function"){var s=o({state:i,name:t,instance:l,options:n});var c=function e(){};a.push(s||c)}})}function u(){a.forEach(function(e){return e()});a=[]}return l}}var cX=/*#__PURE__*//* unused pure expression or super */null&&cQ();// eslint-disable-next-line import/no-unused-modules
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js
// eslint-disable-next-line import/no-unused-modules
var cJ={passive:true};function cZ(e){var t=e.state,r=e.instance,n=e.options;var i=n.scroll,o=i===void 0?true:i,a=n.resize,s=a===void 0?true:a;var l=l2(t.elements.popper);var c=[].concat(t.scrollParents.reference,t.scrollParents.popper);if(o){c.forEach(function(e){e.addEventListener("scroll",r.update,cJ)})}if(s){l.addEventListener("resize",r.update,cJ)}return function(){if(o){c.forEach(function(e){e.removeEventListener("scroll",r.update,cJ)})}if(s){l.removeEventListener("resize",r.update,cJ)}}}// eslint-disable-next-line import/no-unused-modules
/* export default */const c0={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:cZ,data:{}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js
function c1(e){return e.split("-")[0]};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js
function c2(e){return e.split("-")[1]};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js
function c6(e){return["top","bottom"].indexOf(e)>=0?"x":"y"};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js
function c4(e){var t=e.reference,r=e.element,n=e.placement;var i=n?c1(n):null;var o=n?c2(n):null;var a=t.x+t.width/2-r.width/2;var s=t.y+t.height/2-r.height/2;var l;switch(i){case cy:l={x:a,y:t.y-r.height};break;case cx:l={x:a,y:t.y+t.height};break;case cw:l={x:t.x+t.width,y:s};break;case cA:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?c6(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case ck:l[c]=l[c]-(t[u]/2-r[u]/2);break;case cS:l[c]=l[c]+(t[u]/2-r[u]/2);break;default:}}return l};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
function c5(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]=c4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}// eslint-disable-next-line import/no-unused-modules
/* export default */const c3={name:"popperOffsets",enabled:true,phase:"read",fn:c5,data:{}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js
// eslint-disable-next-line import/no-unused-modules
var c8={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 c9(e,t){var r=e.x,n=e.y;var i=t.devicePixelRatio||1;return{x:l9(r*i)/i||0,y:l9(n*i)/i||0}}function c7(e){var t;var r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed;var f=a.x,p=f===void 0?0:f,h=a.y,v=h===void 0?0:h;var m=typeof u==="function"?u({x:p,y:v}):{x:p,y:v};p=m.x;v=m.y;var g=a.hasOwnProperty("x");var b=a.hasOwnProperty("y");var _=cA;var y=cy;var x=window;if(c){var w=c_(r);var A="clientHeight";var E="clientWidth";if(w===l2(r)){w=ca(r);if(cl(w).position!=="static"&&s==="absolute"){A="scrollHeight";E="scrollWidth"}}// $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
w=w;if(i===cy||(i===cA||i===cw)&&o===cS){y=cx;var I=d&&w===x&&x.visualViewport?x.visualViewport.height:w[A];v-=I-n.height;v*=l?1:-1}if(i===cA||(i===cy||i===cx)&&o===cS){_=cw;var k=d&&w===x&&x.visualViewport?x.visualViewport.width:w[E];p-=k-n.width;p*=l?1:-1}}var S=Object.assign({position:s},c&&c8);var O=u===true?c9({x:p,y:v},l2(r)):{x:p,y:v};p=O.x;v=O.y;if(l){var T;return Object.assign({},S,(T={},T[y]=b?"0":"",T[_]=g?"0":"",T.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",T))}return Object.assign({},S,(t={},t[y]=b?v+"px":"",t[_]=g?p+"px":"",t.transform="",t))}function ue(e){var t=e.state,r=e.options;var n=r.gpuAcceleration,i=n===void 0?true:n,o=r.adaptive,a=o===void 0?true:o,s=r.roundOffsets,l=s===void 0?true:s;var c={placement:c1(t.placement),variation:c2(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,c7(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))}if(t.modifiersData.arrow!=null){t.styles.arrow=Object.assign({},t.styles.arrow,c7(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:l})))}t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}// eslint-disable-next-line import/no-unused-modules
/* export default */const ut={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:ue,data:{}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js
// This modifier takes the styles prepared by the `computeStyles` modifier
// and applies them to the HTMLElements such as popper and arrow
function ur(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{};var n=t.attributes[e]||{};var i=t.elements[e];// arrow is optional + virtual elements
if(!l4(i)||!co(i)){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(i.style,r);Object.keys(n).forEach(function(e){var t=n[e];if(t===false){i.removeAttribute(e)}else{i.setAttribute(e,t===true?"":t)}})})}function un(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 n=t.elements[e];var i=t.attributes[e]||{};var o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]);// Set all values to an empty string to unset them
var a=o.reduce(function(e,t){e[t]="";return e},{});// arrow is optional + virtual elements
if(!l4(n)||!co(n)){return}Object.assign(n.style,a);Object.keys(i).forEach(function(e){n.removeAttribute(e)})})}}// eslint-disable-next-line import/no-unused-modules
/* export default */const ui={name:"applyStyles",enabled:true,phase:"write",fn:ur,effect:un,requires:["computeStyles"]};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js
// eslint-disable-next-line import/no-unused-modules
function uo(e,t,r){var n=c1(e);var i=[cA,cy].indexOf(n)>=0?-1:1;var o=typeof r==="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];a=a||0;s=(s||0)*i;return[cA,cw].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function ua(e){var t=e.state,r=e.options,n=e.name;var i=r.offset,o=i===void 0?[0,0]:i;var a=cF.reduce(function(e,r){e[r]=uo(r,t.rects,o);return e},{});var s=a[t.placement],l=s.x,c=s.y;if(t.modifiersData.popperOffsets!=null){t.modifiersData.popperOffsets.x+=l;t.modifiersData.popperOffsets.y+=c}t.modifiersData[n]=a}// eslint-disable-next-line import/no-unused-modules
/* export default */const us={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:ua};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
var ul={left:"right",right:"left",bottom:"top",top:"bottom"};function uc(e){return e.replace(/left|right|bottom|top/g,function(e){return ul[e]})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js
var uu={start:"end",end:"start"};function ud(e){return e.replace(/start|end/g,function(e){return uu[e]})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js
function uf(e,t){var r=l2(e);var n=ca(e);var i=r.visualViewport;var o=n.clientWidth;var a=n.clientHeight;var s=0;var l=0;if(i){o=i.width;a=i.height;var c=ce();if(c||!c&&t==="fixed"){s=i.offsetLeft;l=i.offsetTop}}return{width:o,height:a,x:s+cs(e),y:l}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js
// Gets the entire size of the scrollable document area, even extending outside
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
function up(e){var t;var r=ca(e);var n=cr(e);var i=(t=e.ownerDocument)==null?void 0:t.body;var o=l3(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0);var a=l3(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);var s=-n.scrollLeft+cs(e);var l=-n.scrollTop;if(cl(i||r).direction==="rtl"){s+=l3(r.clientWidth,i?i.clientWidth:0)-o}return{width:o,height:a,x:s,y:l}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js
function uh(e,t){var r=t.getRootNode&&t.getRootNode();// First, attempt with faster native method
if(e.contains(t)){return true}else if(r&&l5(r)){var n=t;do{if(n&&e.isSameNode(n)){return true}// $FlowFixMe[prop-missing]: need a better way to handle this...
n=n.parentNode||n.host}while(n)}// Give up, the result is false
return false};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js
function uv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js
function um(e,t){var r=ct(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 ug(e,t,r){return t===cT?uv(uf(e,r)):l6(t)?um(t,r):uv(up(ca(e)))}// A "clipping parent" is an overflowable container with the characteristic of
// clipping (or hiding) overflowing elements with a position different from
// `initial`
function ub(e){var t=cv(cp(e));var r=["absolute","fixed"].indexOf(cl(e).position)>=0;var n=r&&l4(e)?c_(e):e;if(!l6(n)){return[]}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return t.filter(function(e){return l6(e)&&uh(e,n)&&co(e)!=="body"})}// Gets the maximum area that the element is visible in due to any number of
// clipping parents
function u_(e,t,r,n){var i=t==="clippingParents"?ub(e):[].concat(t);var o=[].concat(i,[r]);var a=o[0];var s=o.reduce(function(t,r){var i=ug(e,r,n);t.top=l3(i.top,t.top);t.right=l8(i.right,t.right);t.bottom=l8(i.bottom,t.bottom);t.left=l3(i.left,t.left);return t},ug(e,a,n));s.width=s.right-s.left;s.height=s.bottom-s.top;s.x=s.left;s.y=s.top;return s};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
function uy(){return{top:0,right:0,bottom:0,left:0}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js
function ux(e){return Object.assign({},uy(),e)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js
function uw(e,t){return t.reduce(function(t,r){t[r]=e;return t},{})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js
// eslint-disable-next-line import/no-unused-modules
function uA(e,t){if(t===void 0){t={}}var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,s=r.boundary,l=s===void 0?cO:s,c=r.rootBoundary,u=c===void 0?cT:c,d=r.elementContext,f=d===void 0?cC:d,p=r.altBoundary,h=p===void 0?false:p,v=r.padding,m=v===void 0?0:v;var g=ux(typeof m!=="number"?m:uw(m,cI));var b=f===cC?cR:cC;var _=e.rects.popper;var y=e.elements[h?b:f];var x=u_(l6(y)?y:y.contextElement||ca(e.elements.popper),l,u,a);var w=ct(e.elements.reference);var A=c4({reference:w,element:_,strategy:"absolute",placement:i});var E=uv(Object.assign({},_,A));var I=f===cC?E:w;// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
var k={top:x.top-I.top+g.top,bottom:I.bottom-x.bottom+g.bottom,left:x.left-I.left+g.left,right:I.right-x.right+g.right};var S=e.modifiersData.offset;// Offsets can be applied only to the popper element
if(f===cC&&S){var O=S[i];Object.keys(k).forEach(function(e){var t=[cw,cx].indexOf(e)>=0?1:-1;var r=[cy,cx].indexOf(e)>=0?"y":"x";k[e]+=O[r]*t})}return k};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js
function uE(e,t){if(t===void 0){t={}}var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?cF:l;var u=c2(n);var d=u?s?cD:cD.filter(function(e){return c2(e)===u}):cI;var f=d.filter(function(e){return c.indexOf(e)>=0});if(f.length===0){f=d}// $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
var p=f.reduce(function(t,r){t[r]=uA(e,{placement:r,boundary:i,rootBoundary:o,padding:a})[c1(r)];return t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js
// eslint-disable-next-line import/no-unused-modules
function uI(e){if(c1(e)===cE){return[]}var t=uc(e);return[ud(e),t,ud(t)]}function uk(e){var t=e.state,r=e.options,n=e.name;if(t.modifiersData[n]._skip){return}var i=r.mainAxis,o=i===void 0?true:i,a=r.altAxis,s=a===void 0?true:a,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,h=p===void 0?true:p,v=r.allowedAutoPlacements;var m=t.options.placement;var g=c1(m);var b=g===m;var _=l||(b||!h?[uc(m)]:uI(m));var y=[m].concat(_).reduce(function(e,r){return e.concat(c1(r)===cE?uE(t,{placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:v}):r)},[]);var x=t.rects.reference;var w=t.rects.popper;var A=new Map;var E=true;var I=y[0];for(var k=0;k<y.length;k++){var S=y[k];var O=c1(S);var T=c2(S)===ck;var C=[cy,cx].indexOf(O)>=0;var R=C?"width":"height";var D=uA(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:f,padding:c});var F=C?T?cw:cA:T?cx:cy;if(x[R]>w[R]){F=uc(F)}var Y=uc(F);var M=[];if(o){M.push(D[O]<=0)}if(s){M.push(D[F]<=0,D[Y]<=0)}if(M.every(function(e){return e})){I=S;E=false;break}A.set(S,M)}if(E){// `2` may be desired in some cases – research later
var j=h?3:1;var P=function e(e){var t=y.find(function(t){var r=A.get(t);if(r){return r.slice(0,e).every(function(e){return e})}});if(t){I=t;return"break"}};for(var L=j;L>0;L--){var N=P(L);if(N==="break")break}}if(t.placement!==I){t.modifiersData[n]._skip=true;t.placement=I;t.reset=true}}// eslint-disable-next-line import/no-unused-modules
/* export default */const uS={name:"flip",enabled:true,phase:"main",fn:uk,requiresIfExists:["offset"],data:{_skip:false}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js
function uO(e){return e==="x"?"y":"x"};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js
function uT(e,t,r){return l3(e,l8(t,r))}function uC(e,t,r){var n=uT(e,t,r);return n>r?r:n};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
function uR(e){var t=e.state,r=e.options,n=e.name;var i=r.mainAxis,o=i===void 0?true:i,a=r.altAxis,s=a===void 0?false:a,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,f=r.tether,p=f===void 0?true:f,h=r.tetherOffset,v=h===void 0?0:h;var m=uA(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u});var g=c1(t.placement);var b=c2(t.placement);var _=!b;var y=c6(g);var x=uO(y);var w=t.modifiersData.popperOffsets;var A=t.rects.reference;var E=t.rects.popper;var I=typeof v==="function"?v(Object.assign({},t.rects,{placement:t.placement})):v;var k=typeof I==="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I);var S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null;var O={x:0,y:0};if(!w){return}if(o){var T;var C=y==="y"?cy:cA;var R=y==="y"?cx:cw;var D=y==="y"?"height":"width";var F=w[y];var Y=F+m[C];var M=F-m[R];var j=p?-E[D]/2:0;var P=b===ck?A[D]:E[D];var L=b===ck?-E[D]:-A[D];// We need to include the arrow in the calculation so the arrow doesn't go
// outside the reference bounds
var N=t.elements.arrow;var H=p&&N?cf(N):{width:0,height:0};var V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uy();var U=V[C];var K=V[R];// 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 B=uT(0,A[D],H[D]);var z=_?A[D]/2-j-B-U-k.mainAxis:P-B-U-k.mainAxis;var q=_?-A[D]/2+j+B+K+k.mainAxis:L+B+K+k.mainAxis;var W=t.elements.arrow&&c_(t.elements.arrow);var G=W?y==="y"?W.clientTop||0:W.clientLeft||0:0;var $=(T=S==null?void 0:S[y])!=null?T:0;var Q=F+z-$-G;var X=F+q-$;var J=uT(p?l8(Y,Q):Y,F,p?l3(M,X):M);w[y]=J;O[y]=J-F}if(s){var Z;var ee=y==="x"?cy:cA;var et=y==="x"?cx:cw;var er=w[x];var en=x==="y"?"height":"width";var ei=er+m[ee];var eo=er-m[et];var ea=[cy,cA].indexOf(g)!==-1;var es=(Z=S==null?void 0:S[x])!=null?Z:0;var el=ea?ei:er-A[en]-E[en]-es+k.altAxis;var ec=ea?er+A[en]+E[en]-es-k.altAxis:eo;var eu=p&&ea?uC(el,er,ec):uT(p?el:ei,er,p?ec:eo);w[x]=eu;O[x]=eu-er}t.modifiersData[n]=O}// eslint-disable-next-line import/no-unused-modules
/* export default */const uD={name:"preventOverflow",enabled:true,phase:"main",fn:uR,requiresIfExists:["offset"]};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js
// eslint-disable-next-line import/no-unused-modules
var uF=function e(e,t){e=typeof e==="function"?e(Object.assign({},t.rects,{placement:t.placement})):e;return ux(typeof e!=="number"?e:uw(e,cI))};function uY(e){var t;var r=e.state,n=e.name,i=e.options;var o=r.elements.arrow;var a=r.modifiersData.popperOffsets;var s=c1(r.placement);var l=c6(s);var c=[cA,cw].indexOf(s)>=0;var u=c?"height":"width";if(!o||!a){return}var d=uF(i.padding,r);var f=cf(o);var p=l==="y"?cy:cA;var h=l==="y"?cx:cw;var v=r.rects.reference[u]+r.rects.reference[l]-a[l]-r.rects.popper[u];var m=a[l]-r.rects.reference[l];var g=c_(o);var b=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0;var _=v/2-m/2;// Make sure the arrow doesn't overflow the popper if the center point is
// outside of the popper bounds
var y=d[p];var x=b-f[u]-d[h];var w=b/2-f[u]/2+_;var A=uT(y,w,x);// Prevents breaking syntax highlighting...
var E=l;r.modifiersData[n]=(t={},t[E]=A,t.centerOffset=A-w,t)}function uM(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(!uh(t.elements.popper,i)){return}t.elements.arrow=i}// eslint-disable-next-line import/no-unused-modules
/* export default */const uj={name:"arrow",enabled:true,phase:"main",fn:uY,effect:uM,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js
function uP(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 uL(e){return[cy,cw,cx,cA].some(function(t){return e[t]>=0})}function uN(e){var t=e.state,r=e.name;var n=t.rects.reference;var i=t.rects.popper;var o=t.modifiersData.preventOverflow;var a=uA(t,{elementContext:"reference"});var s=uA(t,{altBoundary:true});var l=uP(a,n);var c=uP(s,i,o);var u=uL(l);var d=uL(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d};t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}// eslint-disable-next-line import/no-unused-modules
/* export default */const uH={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:uN};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/popper.js
var uV=[c0,c3,ut,ui,us,uS,uD,uj,uH];var uU=/*#__PURE__*/cQ({defaultModifiers:uV});// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/headless/dist/tippy-headless.esm.js
/**!
* tippy.js v6.3.7
* (c) 2017-2021 atomiks
* MIT License
*/var uK='<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 uB="tippy-content";var uz="tippy-backdrop";var uq="tippy-arrow";var uW="tippy-svg-arrow";var uG={passive:true,capture:true};var u$=function e(){return document.body};function uQ(e,t){return({}).hasOwnProperty.call(e,t)}function uX(e,t,r){if(Array.isArray(e)){var n=e[t];return n==null?Array.isArray(r)?r[t]:r:n}return e}function uJ(e,t){var r=({}).toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function uZ(e,t){return typeof e==="function"?e.apply(void 0,t):e}function u0(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 u1(e,t){var r=Object.assign({},e);t.forEach(function(e){delete r[e]});return r}function u2(e){return e.split(/\s+/).filter(Boolean)}function u6(e){return[].concat(e)}function u4(e,t){if(e.indexOf(t)===-1){e.push(t)}}function u5(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function u3(e){return e.split("-")[0]}function u8(e){return[].slice.call(e)}function u9(e){return Object.keys(e).reduce(function(t,r){if(e[r]!==undefined){t[r]=e[r]}return t},{})}function u7(){return document.createElement("div")}function de(e){return["Element","Fragment"].some(function(t){return uJ(e,t)})}function dt(e){return uJ(e,"NodeList")}function dr(e){return uJ(e,"MouseEvent")}function dn(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function di(e){if(de(e)){return[e]}if(dt(e)){return u8(e)}if(Array.isArray(e)){return e}return u8(document.querySelectorAll(e))}function da(e,t){e.forEach(function(e){if(e){e.style.transitionDuration=t+"ms"}})}function ds(e,t){e.forEach(function(e){if(e){e.setAttribute("data-state",t)}})}function dl(e){var t;var r=u6(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 dc(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,o=e.props;var a=o.interactiveBorder;var s=u3(i.placement);var l=i.modifiersData.offset;if(!l){return true}var c=s==="bottom"?l.top.y:0;var u=s==="top"?l.bottom.y:0;var d=s==="right"?l.left.x:0;var f=s==="left"?l.right.x:0;var p=t.top-n+c>a;var h=n-t.bottom-u>a;var v=t.left-r+d>a;var m=r-t.right-f>a;return p||h||v||m})}function du(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 dd(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 df={isTouch:false};var dp=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 dh(){if(df.isTouch){return}df.isTouch=true;if(window.performance){document.addEventListener("mousemove",dv)}}/**
 * 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 dv(){var e=performance.now();if(e-dp<20){df.isTouch=false;document.removeEventListener("mousemove",dv)}dp=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 dm(){var e=document.activeElement;if(dn(e)){var t=e._tippy;if(e.blur&&!t.state.isVisible){e.blur()}}}function dg(){document.addEventListener("touchstart",dh,uG);window.addEventListener("blur",dm)}var db=typeof window!=="undefined"&&typeof document!=="undefined";var d_=db?!!window.msCrypto:false;function dy(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 dx(e){var t=/[ \t]{2,}/g;var r=/^[ \t]*/gm;return e.replace(t," ").replace(r,"").trim()}function dw(e){return dx("\n  %ctippy.js\n\n  %c"+dx(e)+"\n\n  %c👷‍ This is a development-only message. It will be removed in production.\n  ")}function dA(e){return[dw(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 dE;if(false){}function dI(){dE=new Set}function dk(e,t){if(e&&!dE.has(t)){var r;dE.add(t);(r=console).warn.apply(r,dA(t))}}function dS(e,t){if(e&&!dE.has(t)){var r;dE.add(t);(r=console).error.apply(r,dA(t))}}function dO(e){var t=!e;var r=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;dS(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" "));dS(r,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var dT={animateFill:false,followCursor:false,inlinePositioning:false,sticky:false};var dC={allowHTML:false,animation:"fade",arrow:true,content:"",inertia:false,maxWidth:350,role:"tooltip",theme:"",zIndex:9999};var dR=Object.assign({appendTo:u$,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},dT,dC);var dD=Object.keys(dR);var dF=function e(e){/* istanbul ignore else */if(false){}var t=Object.keys(e);t.forEach(function(t){dR[t]=e[t]})};function dY(e){var t=e.plugins||[];var r=t.reduce(function(t,r){var n=r.name,i=r.defaultValue;if(n){var o;t[n]=e[n]!==undefined?e[n]:(o=dR[n])!=null?o:i}return t},{});return Object.assign({},e,r)}function dM(e,t){var r=t?Object.keys(dY(Object.assign({},dR,{plugins:t}))):dD;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 dj(e,t){var r=Object.assign({},t,{content:uZ(t.content,[e])},t.ignoreAttributes?{}:dM(e,t.plugins));r.aria=Object.assign({},dR.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 dP(e,t){if(e===void 0){e={}}if(t===void 0){t=[]}var r=Object.keys(e);r.forEach(function(e){var r=u1(dR,Object.keys(dT));var n=!uQ(r,e);// Check if the prop exists in `plugins`
if(n){n=t.filter(function(t){return t.name===e}).length===0}dk(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 dL(e){var t=e.firstElementChild;var r=u8(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(uB)}),arrow:r.find(function(e){return e.classList.contains(uq)||e.classList.contains(uW)}),backdrop:r.find(function(e){return e.classList.contains(uz)})}}var dN=1;var dH=[];// Used by `hideAll()`
var dV=[];function dU(e,t){var r=dj(e,Object.assign({},dR,dY(u9(t))));// ===========================================================================
// 🔒 Private members
// ===========================================================================
var n;var i;var o;var a=false;var s=false;var l=false;var c=false;var u;var d;var f;var p=[];var h=u0(Q,r.interactiveDebounce);var v;// ===========================================================================
// 🔑 Public members
// ===========================================================================
var m=dN++;var g=null;var b=u5(r.plugins);var _={// 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 y={// properties
id:m,reference:e,popper:u7(),popperInstance:g,props:r,state:_,plugins:b,// methods
clearDelayTimeouts:el,setProps:ec,setContent:eu,show:ed,hide:ef,hideWithInteractivity:ep,enable:ea,disable:es,unmount:eh,destroy:ev};// 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 y}// ===========================================================================
// Initial mutations
// ===========================================================================
var x=r.render(y),w=x.popper,A=x.onUpdate;w.setAttribute("data-tippy-root","");w.id="tippy-"+y.id;y.popper=w;e._tippy=y;w._tippy=y;var E=b.map(function(e){return e.fn(y)});var I=e.hasAttribute("aria-expanded");W();j();F();Y("onCreate",[y]);if(r.showOnCreate){ei()}// Prevent a tippy with a delay from hiding if the cursor left then returned
// before it started hiding
w.addEventListener("mouseenter",function(){if(y.props.interactive&&y.state.isVisible){y.clearDelayTimeouts()}});w.addEventListener("mouseleave",function(){if(y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0){C().addEventListener("mousemove",h)}});return y;// ===========================================================================
// 🔒 Private methods
// ===========================================================================
function k(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return k()[0]==="hold"}function O(){var e;// @ts-ignore
return!!((e=y.props.render)!=null&&e.$$tippy)}function T(){return v||e}function C(){var e=T().parentNode;return e?dl(e):document}function R(){return dL(w)}function D(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(y.state.isMounted&&!y.state.isVisible||df.isTouch||u&&u.type==="focus"){return 0}return uX(y.props.delay,e?0:1,dR.delay)}function F(e){if(e===void 0){e=false}w.style.pointerEvents=y.props.interactive&&!e?"":"none";w.style.zIndex=""+y.props.zIndex}function Y(e,t,r){if(r===void 0){r=true}E.forEach(function(r){if(r[e]){r[e].apply(r,t)}});if(r){var n;(n=y.props)[e].apply(n,t)}}function M(){var t=y.props.aria;if(!t.content){return}var r="aria-"+t.content;var n=w.id;var i=u6(y.props.triggerTarget||e);i.forEach(function(e){var t=e.getAttribute(r);if(y.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 j(){if(I||!y.props.aria.expanded){return}var t=u6(y.props.triggerTarget||e);t.forEach(function(e){if(y.props.interactive){e.setAttribute("aria-expanded",y.state.isVisible&&e===T()?"true":"false")}else{e.removeAttribute("aria-expanded")}})}function P(){C().removeEventListener("mousemove",h);dH=dH.filter(function(e){return e!==h})}function L(t){// Moved finger to scroll instead of an intentional tap outside
if(df.isTouch){if(l||t.type==="mousedown"){return}}var r=t.composedPath&&t.composedPath()[0]||t.target;// Clicked on interactive popper
if(y.props.interactive&&dd(w,r)){return}// Clicked on the event listeners target
if(u6(y.props.triggerTarget||e).some(function(e){return dd(e,r)})){if(df.isTouch){return}if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0){return}}else{Y("onClickOutside",[y,t])}if(y.props.hideOnClick===true){y.clearDelayTimeouts();y.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
s=true;setTimeout(function(){s=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(!y.state.isMounted){U()}}}function N(){l=true}function H(){l=false}function V(){var e=C();e.addEventListener("mousedown",L,true);e.addEventListener("touchend",L,uG);e.addEventListener("touchstart",H,uG);e.addEventListener("touchmove",N,uG)}function U(){var e=C();e.removeEventListener("mousedown",L,true);e.removeEventListener("touchend",L,uG);e.removeEventListener("touchstart",H,uG);e.removeEventListener("touchmove",N,uG)}function K(e,t){z(e,function(){if(!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)){t()}})}function B(e,t){z(e,t)}function z(e,t){var r=R().box;function n(e){if(e.target===r){du(r,"remove",n);t()}}// Make callback synchronous if duration is 0
// `transitionend` won't fire otherwise
if(e===0){return t()}du(r,"remove",d);du(r,"add",n);d=n}function q(t,r,n){if(n===void 0){n=false}var i=u6(y.props.triggerTarget||e);i.forEach(function(e){e.addEventListener(t,r,n);p.push({node:e,eventType:t,handler:r,options:n})})}function W(){if(S()){q("touchstart",$,{passive:true});q("touchend",X,{passive:true})}u2(y.props.trigger).forEach(function(e){if(e==="manual"){return}q(e,$);switch(e){case"mouseenter":q("mouseleave",X);break;case"focus":q(d_?"focusout":"blur",J);break;case"focusin":q("focusout",J);break}})}function G(){p.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});p=[]}function $(e){var t;var r=false;if(!y.state.isEnabled||Z(e)||s){return}var n=((t=u)==null?void 0:t.type)==="focus";u=e;v=e.currentTarget;j();if(!y.state.isVisible&&dr(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
dH.forEach(function(t){return t(e)})}// Toggle show/hide when clicking click-triggered tooltips
if(e.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==false&&y.state.isVisible){r=true}else{ei(e)}if(e.type==="click"){a=!r}if(r&&!n){eo(e)}}function Q(e){var t=e.target;var n=T().contains(t)||w.contains(t);if(e.type==="mousemove"&&n){return}var i=en().concat(w).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(dc(i,e)){P();eo(e)}}function X(e){var t=Z(e)||y.props.trigger.indexOf("click")>=0&&a;if(t){return}if(y.props.interactive){y.hideWithInteractivity(e);return}eo(e)}function J(e){if(y.props.trigger.indexOf("focusin")<0&&e.target!==T()){return}// If focus was moved to within the popper
if(y.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)){return}eo(e)}function Z(e){return df.isTouch?S()!==e.type.indexOf("touch")>=0:false}function ee(){et();var t=y.props,r=t.popperOptions,n=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition;var s=O()?dL(w).arrow:null;var l=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e;var c={name:"$$tippy",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function e(e){var t=e.state;if(O()){var r=R(),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 u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},c];if(O()&&s){u.push({name:"arrow",options:{element:s,padding:3}})}u.push.apply(u,(r==null?void 0:r.modifiers)||[]);y.popperInstance=uU(l,w,Object.assign({},r,{placement:n,onFirstUpdate:f,modifiers:u}))}function et(){if(y.popperInstance){y.popperInstance.destroy();y.popperInstance=null}}function er(){var e=y.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=T();if(y.props.interactive&&e===u$||e==="parent"){t=r.parentNode}else{t=uZ(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(w)){t.appendChild(w)}y.state.isMounted=true;ee();/* istanbul ignore else */if(false){}}function en(){return u8(w.querySelectorAll("[data-tippy-root]"))}function ei(e){y.clearDelayTimeouts();if(e){Y("onTrigger",[y,e])}V();var t=D(true);var r=k(),i=r[0],o=r[1];if(df.isTouch&&i==="hold"&&o){t=o}if(t){n=setTimeout(function(){y.show()},t)}else{y.show()}}function eo(e){y.clearDelayTimeouts();Y("onUntrigger",[y,e]);if(!y.state.isVisible){U();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(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&a){return}var t=D(false);if(t){i=setTimeout(function(){if(y.state.isVisible){y.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(){y.hide()})}}// ===========================================================================
// 🔑 Public methods
// ===========================================================================
function ea(){y.state.isEnabled=true}function es(){// Disabling the instance should also hide it
// https://github.com/atomiks/tippy.js-react/issues/106
y.hide();y.state.isEnabled=false}function el(){clearTimeout(n);clearTimeout(i);cancelAnimationFrame(o)}function ec(t){/* istanbul ignore else */if(false){}if(y.state.isDestroyed){return}Y("onBeforeUpdate",[y,t]);G();var r=y.props;var n=dj(e,Object.assign({},r,u9(t),{ignoreAttributes:true}));y.props=n;W();if(r.interactiveDebounce!==n.interactiveDebounce){P();h=u0(Q,n.interactiveDebounce)}// Ensure stale aria-expanded attributes are removed
if(r.triggerTarget&&!n.triggerTarget){u6(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")})}else if(n.triggerTarget){e.removeAttribute("aria-expanded")}j();F();if(A){A(r,n)}if(y.popperInstance){ee();// 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(!)
en().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)})}Y("onAfterUpdate",[y,t])}function eu(e){y.setProps({content:e})}function ed(){/* istanbul ignore else */if(false){}// Early bail-out
var e=y.state.isVisible;var t=y.state.isDestroyed;var r=!y.state.isEnabled;var n=df.isTouch&&!y.props.touch;var i=uX(y.props.duration,0,dR.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(T().hasAttribute("disabled")){return}Y("onShow",[y],false);if(y.props.onShow(y)===false){return}y.state.isVisible=true;if(O()){w.style.visibility="visible"}F();V();if(!y.state.isMounted){w.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(O()){var o=R(),a=o.box,s=o.content;da([a,s],0)}f=function e(){var e;if(!y.state.isVisible||c){return}c=true;// reflow
void w.offsetHeight;w.style.transition=y.props.moveTransition;if(O()&&y.props.animation){var t=R(),r=t.box,n=t.content;da([r,n],i);ds([r,n],"visible")}M();j();u4(dV,y);// certain modifiers (e.g. `maxSize`) require a second update after the
// popper has been positioned for the first time
(e=y.popperInstance)==null?void 0:e.forceUpdate();Y("onMount",[y]);if(y.props.animation&&O()){B(i,function(){y.state.isShown=true;Y("onShown",[y])})}};er()}function ef(){/* istanbul ignore else */if(false){}// Early bail-out
var e=!y.state.isVisible;var t=y.state.isDestroyed;var r=!y.state.isEnabled;var n=uX(y.props.duration,1,dR.duration);if(e||t||r){return}Y("onHide",[y],false);if(y.props.onHide(y)===false){return}y.state.isVisible=false;y.state.isShown=false;c=false;a=false;if(O()){w.style.visibility="hidden"}P();U();F(true);if(O()){var i=R(),o=i.box,s=i.content;if(y.props.animation){da([o,s],n);ds([o,s],"hidden")}}M();j();if(y.props.animation){if(O()){K(n,y.unmount)}}else{y.unmount()}}function ep(e){/* istanbul ignore else */if(false){}C().addEventListener("mousemove",h);u4(dH,h);h(e)}function eh(){/* istanbul ignore else */if(false){}if(y.state.isVisible){y.hide()}if(!y.state.isMounted){return}et();// 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
en().forEach(function(e){e._tippy.unmount()});if(w.parentNode){w.parentNode.removeChild(w)}dV=dV.filter(function(e){return e!==y});y.state.isMounted=false;Y("onHidden",[y])}function ev(){/* istanbul ignore else */if(false){}if(y.state.isDestroyed){return}y.clearDelayTimeouts();y.unmount();G();delete e._tippy;y.state.isDestroyed=true;Y("onDestroy",[y])}}function dK(e,t){if(t===void 0){t={}}var r=dR.plugins.concat(t.plugins||[]);/* istanbul ignore else */if(false){}dg();var n=Object.assign({},t,{plugins:r});var i=di(e);/* istanbul ignore else */if(false){var o,a}var s=i.reduce(function(e,t){var r=t&&dU(t,n);if(r){e.push(r)}return e},[]);return de(e)?s[0]:s}dK.defaultProps=dR;dK.setDefaultProps=dF;dK.currentInput=df;var dB=function e(e){var t=e===void 0?{}:e,r=t.exclude,n=t.duration;dV.forEach(function(e){var t=false;if(r){t=dn(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 dz=Object.assign({},ui,{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 dq=function e(e,t){var r;if(t===void 0){t={}}/* istanbul ignore else */if(false){}var n=e;var i=[];var o=[];var a;var s=t.overrides;var l=[];var c=false;function u(){o=n.map(function(e){return u6(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===a){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=o.indexOf(t);// bail-out
if(t===a){return}a=t;var l=(s||[]).concat("content").reduce(function(e,t){e[t]=n[r].props[t];return e},{});e.setProps(Object.assign({},l,{getReferenceClientRect:typeof l.getReferenceClientRect==="function"?l.getReferenceClientRect:function(){var e;return(e=i[r])==null?void 0:e.getBoundingClientRect()}}))}f(false);d();u();var v={fn:function e(){return{onDestroy:function e(){f(true)},onHidden:function e(){a=null},onClickOutside:function e(e){if(e.props.showOnCreate&&!c){c=true;a=null}},onShow:function e(e){if(e.props.showOnCreate&&!c){c=true;h(e,i[0])}},onTrigger:function e(e,t){h(e,t.currentTarget)}}}};var m=dK(u7(),Object.assign({},u1(t,["overrides"]),{plugins:[v].concat(t.plugins||[]),triggerTarget:o,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((r=t.popperOptions)==null?void 0:r.modifiers)||[],[dz])})}));var g=m.show;m.show=function(e){g();// first time, showOnCreate or programmatic call with no params
// default to showing first instance
if(!a&&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(a&&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(!a){return m.show(0)}var t=i.indexOf(a);m.show(i[t+1]||e)};m.showPrevious=function(){var e=i[i.length-1];if(!a){return m.show(e)}var t=i.indexOf(a);var r=i[t-1]||e;m.show(r)};var b=m.setProps;m.setProps=function(e){s=e.overrides||s;b(e)};m.setInstances=function(e){f(true);l.forEach(function(e){return e()});n=e;f(false);d();u();l=p(m);m.setProps({triggerTarget:o})};l=p(m);return m};var dW=/* 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 dG(e,t){/* istanbul ignore else */if(false){}var r=[];var n=[];var i=false;var o=t.target;var a=u1(t,["target"]);var s=Object.assign({},a,{trigger:"manual",touch:false});var l=Object.assign({touch:dR.touch},a,{showOnCreate:true});var c=dK(e,s);var u=u6(c);function d(e){if(!e.target||i){return}var r=e.target.closest(o);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 a=r.getAttribute("data-tippy-trigger")||t.trigger||dR.trigger;// @ts-ignore
if(r._tippy){return}if(e.type==="touchstart"&&typeof l.touch==="boolean"){return}if(e.type!=="touchstart"&&a.indexOf(dW[e.type])<0){return}var s=dK(r,l);if(s){n=n.concat(s)}}function f(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 p(e){var t=e.reference;f(t,"touchstart",d,uG);f(t,"mouseover",d);f(t,"focusin",d);f(t,"click",d)}function h(){r.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});r=[]}function v(e){var t=e.destroy;var r=e.enable;var o=e.disable;e.destroy=function(e){if(e===void 0){e=true}if(e){n.forEach(function(e){e.destroy()})}n=[];h();t()};e.enable=function(){r();n.forEach(function(e){return e.enable()});i=false};e.disable=function(){o();n.forEach(function(e){return e.disable()});i=true};p(e)}u.forEach(v);return c}var d$=/* 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=dL(e.popper),n=r.box,i=r.content;var o=e.props.animateFill?dQ():null;return{onCreate:function t(){if(o){n.insertBefore(o,n.firstElementChild);n.setAttribute("data-animatefill","");n.style.overflow="hidden";e.setProps({arrow:false,animation:"shift-away"})}},onMount:function e(){if(o){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";o.style.transitionDuration=e;ds([o],"visible")}},onShow:function e(){if(o){o.style.transitionDuration="0ms"}},onHide:function e(){if(o){ds([o],"hidden")}}}}};function dQ(){var e=u7();e.className=uz;ds([e],"hidden");return e}var dX=/* unused pure expression or super */null&&{clientX:0,clientY:0};var dJ=/* unused pure expression or super */null&&[];function dZ(e){var t=e.clientX,r=e.clientY;dX={clientX:t,clientY:r}}function d0(e){e.addEventListener("mousemove",dZ)}function d1(e){e.removeEventListener("mousemove",dZ)}var d2=/* unused pure expression or super */null&&{name:"followCursor",defaultValue:false,fn:function e(e){var t=e.reference;var r=dl(e.props.triggerTarget||t);var n=false;var i=false;var o=true;var a=e.props;function s(){return e.props.followCursor==="initial"&&e.state.isVisible}function l(){r.addEventListener("mousemove",d)}function c(){r.removeEventListener("mousemove",d)}function u(){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 o=r.clientX,a=r.clientY;var s=t.getBoundingClientRect();var l=o-s.left;var c=a-s.top;if(n||!e.props.interactive){e.setProps({// @ts-ignore - unneeded DOMRect properties
getReferenceClientRect:function e(){var e=t.getBoundingClientRect();var r=o;var n=a;if(i==="initial"){r=e.left+l;n=e.top+c}var s=i==="horizontal"?e.top:n;var u=i==="vertical"?e.right:r;var d=i==="horizontal"?e.bottom:n;var f=i==="vertical"?e.left:r;return{width:u-f,height:d-s,top:s,right:u,bottom:d,left:f}}})}}function f(){if(e.props.followCursor){dJ.push({instance:e,doc:r});d0(r)}}function p(){dJ=dJ.filter(function(t){return t.instance!==e});if(dJ.filter(function(e){return e.doc===r}).length===0){d1(r)}}return{onCreate:f,onDestroy:p,onBeforeUpdate:function t(){a=e.props},onAfterUpdate:function t(t,r){var o=r.followCursor;if(n){return}if(o!==undefined&&a.followCursor!==o){p();if(o){f();if(e.state.isMounted&&!i&&!s()){l()}}else{c();u()}}},onMount:function t(){if(e.props.followCursor&&!i){if(o){d(dX);o=false}if(!s()){l()}}},onTrigger:function e(e,t){if(dr(t)){dX={clientX:t.clientX,clientY:t.clientY}}i=t.type==="focus"},onHidden:function t(){if(e.props.followCursor){u();c();o=true}}}}};function d6(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 d4=/* 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 o=false;var a=[];var s={name:"tippyInlinePositioning",enabled:true,phase:"afterWrite",fn:function t(t){var i=t.state;if(r()){if(a.indexOf(i.placement)!==-1){a=[]}if(n!==i.placement&&a.indexOf(i.placement)===-1){a.push(i.placement);e.setProps({// @ts-ignore - unneeded DOMRect properties
getReferenceClientRect:function e(){return l(i.placement)}})}n=i.placement}}};function l(e){return d5(u3(e),t.getBoundingClientRect(),u8(t.getClientRects()),i)}function c(t){o=true;e.setProps(t);o=false}function u(){if(!o){c(d6(e.props,s))}}return{onCreate:u,onAfterUpdate:u,onTrigger:function t(t,r){if(dr(r)){var n=u8(e.reference.getClientRects());var o=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 a=n.indexOf(o);i=a>-1?a:i}},onHidden:function e(){i=-1}}}};function d5(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 o=r[r.length-1];var a=e==="top";var s=i.top;var l=o.bottom;var c=a?i.left:o.left;var u=a?i.right:o.right;var d=u-c;var f=l-s;return{top:s,bottom:l,left:c,right:u,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 _=h;var y=_-b;var x=g-m;return{top:m,bottom:g,left:b,right:_,width:y,height:x}}default:{return t}}}var d3=/* 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 o=null;var a=null;function s(){var t=i("reference")?n().getBoundingClientRect():null;var l=i("popper")?r.getBoundingClientRect():null;if(t&&d8(o,t)||l&&d8(a,l)){if(e.popperInstance){e.popperInstance.update()}}o=t;a=l;if(e.state.isMounted){requestAnimationFrame(s)}}return{onMount:function t(){if(e.props.sticky){s()}}}}};function d8(e,t){if(e&&t){return e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}return true}dK.setDefaultProps({animation:false});/* export default */const d9=dK;//# sourceMappingURL=tippy-headless.esm.js.map
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@tippyjs+react@4.2.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tippyjs/react/headless/dist/tippy-react-headless.esm.js
function d7(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,o;for(o=0;o<n.length;o++){i=n[o];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}var fe=typeof window!=="undefined"&&typeof document!=="undefined";function ft(e,t){if(e){if(typeof e==="function"){e(t)}if(({}).hasOwnProperty.call(e,"current")){e.current=t}}}function fr(){return fe&&document.createElement("div")}function fn(e){var t={"data-placement":e.placement};if(e.referenceHidden){t["data-reference-hidden"]=""}if(e.escaped){t["data-escaped"]=""}return t}function fi(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(!fi(e[r],t[r])){return false}}else{return false}}return true}else{return false}}function fo(e){var t=[];e.forEach(function(e){if(!t.find(function(t){return fi(e,t)})){t.push(e)}});return t}function fa(e,t){var r,n;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:fo([].concat(((r=e.popperOptions)==null?void 0:r.modifiers)||[],((n=t.popperOptions)==null?void 0:n.modifiers)||[]))})})}var fs=fe?n.useLayoutEffect:n.useEffect;function fl(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,n.useRef)();if(!t.current){t.current=typeof e==="function"?e():e}return t.current}function fc(e,t,r){r.split(/\s+/).forEach(function(r){if(r){e.classList[t](r)}})}var fu={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}fc(t,"add",e.props.className)}function i(){if(r()){fc(t,"remove",e.props.className)}}return{onCreate:n,onBeforeUpdate:i,onAfterUpdate:n}}};function fd(e){function t(t){var r=t.children,o=t.content,a=t.visible,s=t.singleton,l=t.render,c=t.reference,u=t.disabled,d=u===void 0?false:u,f=t.ignoreAttributes,p=f===void 0?true:f,h=t.__source,v=t.__self,m=d7(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]);var g=a!==undefined;var b=s!==undefined;var _=(0,n.useState)(false),y=_[0],x=_[1];var w=(0,n.useState)({}),A=w[0],E=w[1];var I=(0,n.useState)(),k=I[0],S=I[1];var O=fl(function(){return{container:fr(),renders:1}});var T=Object.assign({ignoreAttributes:p},m,{content:O.container});if(g){if(false){}T.trigger="manual";T.hideOnClick=false}if(b){d=true}var C=T;var R=T.plugins||[];if(l){C=Object.assign({},T,{plugins:b&&s.data!=null?[].concat(R,[{fn:function e(){return{onTrigger:function e(e,t){var r=s.data.children.find(function(e){var r=e.instance;return r.reference===t.currentTarget});e.state.$$activeSingletonInstance=r.instance;S(r.content)}}}}]):R,render:function e(){return{popper:O.container}}})}var D=[c].concat(r?[r.type]:[]);// CREATE
fs(function(){var t=c;if(c&&c.hasOwnProperty("current")){t=c.current}var r=e(t||O.ref||fr(),Object.assign({},C,{plugins:[fu].concat(T.plugins||[])}));O.instance=r;if(d){r.disable()}if(a){r.show()}if(b){s.hook({instance:r,content:o,props:C,setSingletonContent:S})}x(true);return function(){r.destroy();s==null?void 0:s.cleanup(r)}},D);// UPDATE
fs(function(){var e;// Prevent this effect from running on 1st render
if(O.renders===1){O.renders++;return}var t=O.instance;t.setProps(fa(t.props,C));// Fixes #264
(e=t.popperInstance)==null?void 0:e.forceUpdate();if(d){t.disable()}else{t.enable()}if(g){if(a){t.show()}else{t.hide()}}if(b){s.hook({instance:t,content:o,props:C,setSingletonContent:S})}});fs(function(){var e;if(!l){return}var t=O.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(A.placement!==r.placement||A.referenceHidden!==(n==null?void 0:n.isReferenceHidden)||A.escaped!==(n==null?void 0:n.hasPopperEscaped)){E({placement:r.placement,referenceHidden:n==null?void 0:n.isReferenceHidden,escaped:n==null?void 0:n.hasPopperEscaped})}r.attributes.popper={}}}])})})},[A.placement,A.referenceHidden,A.escaped].concat(D));return /*#__PURE__*/i().createElement(i().Fragment,null,r?/*#__PURE__*/(0,n.cloneElement)(r,{ref:function e(e){O.ref=e;ft(r.ref,e)}}):null,y&&/*#__PURE__*/(0,is.createPortal)(l?l(fn(A),k,O.instance):o,O.container))}return t}function ff(e){return function t(t){var r=t===void 0?{}:t,n=r.disabled,i=n===void 0?false:n,o=r.overrides,a=o===void 0?[]:o;var s=useState(false),l=s[0],c=s[1];var u=fl({children:[],renders:1});fs(function(){if(!l){c(true);return}var t=u.children,r=u.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:a,plugins:[fu].concat(r.props.plugins||[])}));u.instance=n;if(i){n.disable()}return function(){n.destroy();u.children=t.filter(function(e){var t=e.instance;return!t.state.isDestroyed})}},[l]);fs(function(){if(!l){return}if(u.renders===1){u.renders++;return}var e=u.children,t=u.instance,r=u.sourceData;if(!(t&&r)){return}var n=r.props,o=n.content,s=d7(n,["content"]);t.setProps(fa(t.props,Object.assign({},s,{overrides:a})));t.setInstances(e.map(function(e){return e.instance}));if(i){t.disable()}else{t.enable()}});return useMemo(function(){var e={data:u,hook:function e(e){u.sourceData=e;u.setSingletonContent=e.setSingletonContent},cleanup:function e(){u.sourceData=null}};var t={hook:function e(e){var t,r;u.children=u.children.filter(function(t){var r=t.instance;return e.instance!==r});u.children.push(e);if(((t=u.instance)==null?void 0:t.state.isMounted)&&((r=u.instance)==null?void 0:r.state.$$activeSingletonInstance)===e.instance){u.setSingletonContent==null?void 0:u.setSingletonContent(e.content)}if(u.instance&&!u.instance.state.isDestroyed){u.instance.setInstances(u.children.map(function(e){return e.instance}))}},cleanup:function e(e){u.children=u.children.filter(function(t){return t.instance!==e});if(u.instance&&!u.instance.state.isDestroyed){u.instance.setInstances(u.children.map(function(e){return e.instance}))}}};return[e,t]},[])}}var fp=function(e,t){return/*#__PURE__*/(0,n.forwardRef)(function r(r,o){var a=r.children,s=d7(r,["children"]);return(/*#__PURE__*/// If I spread them separately here, Babel adds the _extends ponyfill for
// some reason
i().createElement(e,Object.assign({},t,s),a?/*#__PURE__*/(0,n.cloneElement)(a,{ref:function e(e){ft(o,e);ft(a.ref,e)}}):null))})};var fh=/*#__PURE__*//* unused pure expression or super */null&&ff(createSingleton);var fv=/*#__PURE__*/fp(/*#__PURE__*/fd(d9),{render:function e(){return""}});/* export default */const fm=fv;//# sourceMappingURL=tippy-react-headless.esm.js.map
;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/Tooltip.tsx
function fg(){var e=(0,eh._)(["\n        bottom: auto;\n        left: -4px;\n        top: 50%;\n        transform: translateY(-50%) rotate(45deg);\n      "]);fg=function t(){return e};return e}function fb(){var e=(0,eh._)(["\n        bottom: auto;\n        top: -4px;\n        left: 50%;\n        transform: translateX(-50%) rotate(45deg);\n      "]);fb=function t(){return e};return e}function f_(){var e=(0,eh._)(["\n        bottom: auto;\n        top: 50%;\n        left: auto;\n        right: -4px;\n        transform: translateY(-50%) rotate(45deg);\n      "]);f_=function t(){return e};return e}var fy={opacity:0,transform:"scale(0.8)"};var fx={tension:300,friction:15};var fw=e=>{var{children:r,content:n,allowHTML:i,placement:o="top",hideOnClick:a,delay:s=0,disabled:l=false,visible:c,wrapperCss:u}=e;var[d,f]=nG(()=>fy);if(l)return r;var p=()=>{f.start({opacity:1,transform:"scale(1)",config:fx})};var h=e=>{var{unmount:t}=e;f.start((0,ep._)((0,ef._)({},fy),{onRest:t,config:(0,ep._)((0,ef._)({},fx),{clamp:true})}))};return/*#__PURE__*/(0,t/* .jsx */.Y)(fm,{render:e=>{return/*#__PURE__*/(0,t/* .jsx */.Y)(iN,(0,ep._)((0,ef._)({style:d,hideOnOverflow:false},e),{css:fE.contentBox(o),children:n}))},animation:true,onMount:p,onHide:h,allowHTML:i,delay:[s,100],hideOnClick:a,placement:o,visible:c,zIndex:ik/* .zIndex.highest */.fE.highest,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:u,children:r})})};/* export default */const fA=fw;var fE={contentBox:e=>/*#__PURE__*/(0,c/* .css */.AH)("max-width:250px;width:100%;background-color:",ik/* .colorTokens.color.black.main */.I6.color.black.main,";color:",ik/* .colorTokens.text.white */.I6.text.white,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";padding:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["8"] */.YK["8"],";font-size:",ik/* .fontSize["15"] */.J["15"],";line-height:",ik/* .lineHeight["20"] */.K_["20"],";position:relative;&::before{content:'';height:8px;width:8px;background-color:",ik/* .colorTokens.color.black.main */.I6.color.black.main,";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%) rotate(45deg);",e==="right"&&(0,c/* .css */.AH)(fg())," ",e==="bottom"&&(0,c/* .css */.AH)(fb())," ",e==="left"&&(0,c/* .css */.AH)(f_()),"}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormFieldWrapper.tsx
function fI(){var e=(0,eh._)(["\n      opacity: 0.5;\n    "]);fI=function t(){return e};return e}function fk(){var e=(0,eh._)(["\n      display: none;\n    "]);fk=function t(){return e};return e}function fS(){var e=(0,eh._)(["\n      flex-direction: row;\n      align-items: center;\n      justify-content: space-between;\n      gap: ",";\n    "]);fS=function t(){return e};return e}function fO(){var e=(0,eh._)(["\n        padding: 0 "," 0 ",";\n      "]);fO=function t(){return e};return e}function fT(){var e=(0,eh._)(["\n        border-radius: 0;\n        border: none;\n        box-shadow: none;\n      "]);fT=function t(){return e};return e}function fC(){var e=(0,eh._)(["\n        border-color: transparent;\n      "]);fC=function t(){return e};return e}function fR(){var e=(0,eh._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);fR=function t(){return e};return e}function fD(){var e=(0,eh._)(["\n          border-color: ",";\n        "]);fD=function t(){return e};return e}function fF(){var e=(0,eh._)(["\n          color: ",";\n        "]);fF=function t(){return e};return e}function fY(){var e=(0,eh._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);fY=function t(){return e};return e}function fM(){var e=(0,eh._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);fM=function t(){return e};return e}function fj(){var e=(0,eh._)(["\n      justify-content: end;\n    "]);fj=function t(){return e};return e}function fP(){var e=(0,eh._)(["\n      color: ",";\n    "]);fP=function t(){return e};return e}function fL(){var e=(0,eh._)(["\n      ",";\n    "]);fL=function t(){return e};return e}var fN=e=>{var{field:r,fieldState:n,children:i,disabled:o=false,readOnly:a=false,label:s,isInlineLabel:l=false,variant:c,loading:u,placeholder:d,helpText:f,isHidden:p=false,removeBorder:h=false,characterCount:v,isSecondary:m=false,inputStyle:g,wrapperCss:b,inputContainerCss:_,onClickAiButton:y,isMagicAi:x=false,generateWithAi:w=false,replaceEntireLabel:A=false}=e;var E;var I=(0,iV/* .nanoid */.Ak)();var k=[fV.input({variant:c,hasFieldError:!!n.error,removeBorder:h,readOnly:a,hasHelpText:!!f,isSecondary:m,isMagicAi:x})];if((0,iH/* .isDefined */.O9)(g)){k.push(g)}var S=/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:fV.inputWrapper,children:[i({id:I,name:r.name,css:k,"aria-invalid":n.error?"true":"false",disabled:o,readOnly:a,placeholder:d,className:"tutor-input-field"}),u&&/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:fV.loader,children:/*#__PURE__*/(0,t/* .jsx */.Y)(l1,{size:20,color:ik/* .colorTokens.icon["default"] */.I6.icon["default"]})})]});return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:[fV.container({disabled:o,isHidden:p}),b],"data-cy":"form-field-wrapper",children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:[fV.inputContainer(l),_],children:[(s||f)&&/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:fV.labelContainer,children:[s&&/*#__PURE__*/(0,t/* .jsxs */.FD)("label",{htmlFor:I,css:fV.label(l,A),children:[s,/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:w,children:/*#__PURE__*/(0,t/* .jsx */.Y)("button",{type:"button",onClick:()=>{y===null||y===void 0?void 0:y()},css:fV.aiButton,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"magicAiColorize",width:32,height:32})})})]}),f&&!A&&/*#__PURE__*/(0,t/* .jsx */.Y)(fA,{content:f,placement:"top",allowHTML:true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"info",width:20,height:20})})]}),v?/*#__PURE__*/(0,t/* .jsx */.Y)(fA,{placement:"right",hideOnClick:false,content:v.maxLimit-v.inputCharacter>=0?v.maxLimit-v.inputCharacter:(0,lo.__)("Limit exceeded","tutor-pro"),children:S}):S]}),((E=n.error)===null||E===void 0?void 0:E.message)&&/*#__PURE__*/(0,t/* .jsxs */.FD)("p",{css:fV.errorLabel(!!n.error,l),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{style:fV.alertIcon,name:"info",width:20,height:20})," ",n.error.message]})]})};/* export default */const fH=fN;var fV={container:e=>{var{disabled:t,isHidden:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;position:relative;background:inherit;width:100%;",t&&(0,c/* .css */.AH)(fI())," ",r&&(0,c/* .css */.AH)(fk()))},inputContainer:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",ik/* .spacing["4"] */.YK["4"],";width:100%;",e&&(0,c/* .css */.AH)(fS(),ik/* .spacing["12"] */.YK["12"])),input:e=>/*#__PURE__*/(0,c/* .css */.AH)("&.tutor-input-field{",iS/* .typography.body */.I.body("regular"),";width:100%;border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["16"] */.YK["16"],";color:",ik/* .colorTokens.text.title */.I6.text.title,";appearance:textfield;&:not(textarea){height:40px;}",e.hasHelpText&&(0,c/* .css */.AH)(fO(),ik/* .spacing["32"] */.YK["32"],ik/* .spacing["12"] */.YK["12"])," ",e.removeBorder&&(0,c/* .css */.AH)(fT())," ",e.isSecondary&&(0,c/* .css */.AH)(fC()),":focus{",aR/* .styleUtils.inputFocus */.x.inputFocus,";",e.isMagicAi&&(0,c/* .css */.AH)(fR(),ik/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,ik/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",e.hasFieldError&&(0,c/* .css */.AH)(fD(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger),"}::-webkit-outer-spin-button,::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{",iS/* .typography.caption */.I.caption("regular"),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";",e.isSecondary&&(0,c/* .css */.AH)(fF(),ik/* .colorTokens.text.hints */.I6.text.hints),"}",e.hasFieldError&&(0,c/* .css */.AH)(fY(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger,ik/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",e.readOnly&&(0,c/* .css */.AH)(fM(),ik/* .colorTokens.background.disable */.I6.background.disable,ik/* .colorTokens.background.disable */.I6.background.disable),"}"),errorLabel:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";line-height:",ik/* .lineHeight["20"] */.K_["20"],";display:flex;align-items:start;margin-top:",ik/* .spacing["4"] */.YK["4"],";",t&&(0,c/* .css */.AH)(fj())," ",e&&(0,c/* .css */.AH)(fP(),ik/* .colorTokens.text.status.onHold */.I6.text.status.onHold),"    & svg{margin-right:",ik/* .spacing["2"] */.YK["2"],";transform:rotate(180deg);}"),labelContainer:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";> div{display:flex;color:",ik/* .colorTokens.color.black["30"] */.I6.color.black["30"],";}"),label:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";margin:0px;width:",t?"100%":"auto",";color:",ik/* .colorTokens.text.title */.I6.text.title,";display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";",e&&(0,c/* .css */.AH)(fL(),iS/* .typography.caption */.I.caption())),aiButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";width:32px;height:32px;border-radius:",ik/* .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 ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),inputWrapper:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;"),loader:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;top:50%;right:",ik/* .spacing["12"] */.YK["12"],";transform:translateY(-50%);display:flex;"),alertIcon:/*#__PURE__*/(0,c/* .css */.AH)("flex-shrink:0;")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormSelectInput.tsx
function fU(){var e=(0,eh._)(["\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    "]);fU=function t(){return e};return e}function fK(){var e=(0,eh._)(["\n        height: 32px;\n        padding-top: ",";\n        padding-bottom: ",";\n      "]);fK=function t(){return e};return e}function fB(){var e=(0,eh._)(["\n        padding-left: ",";\n      "]);fB=function t(){return e};return e}function fz(){var e=(0,eh._)(["\n          height: 48px;\n          padding-bottom: ",";\n        "]);fz=function t(){return e};return e}function fq(){var e=(0,eh._)(["\n        height: 56px;\n        padding-bottom: ",";\n\n        ","\n      "]);fq=function t(){return e};return e}function fW(){var e=(0,eh._)(["\n        background-color: ",";\n      "]);fW=function t(){return e};return e}function fG(){var e=(0,eh._)(["\n        position: relative;\n        border: none;\n        background: transparent;\n      "]);fG=function t(){return e};return e}function f$(){var e=(0,eh._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);f$=function t(){return e};return e}function fQ(){var e=(0,eh._)(["\n          border-color: ",";\n          background-color: ",";\n        "]);fQ=function t(){return e};return e}function fX(){var e=(0,eh._)(["\n      bottom: ",";\n    "]);fX=function t(){return e};return e}function fJ(){var e=(0,eh._)(["\n      padding-left: calc("," + 1px);\n    "]);fJ=function t(){return e};return e}function fZ(){var e=(0,eh._)(["\n        color: ",";\n\n        &:hover {\n          text-decoration: underline;\n        }\n      "]);fZ=function t(){return e};return e}function f0(){var e=(0,eh._)(["\n      min-width: 200px;\n    "]);f0=function t(){return e};return e}function f1(){var e=(0,eh._)(["\n      background-color: ",";\n    "]);f1=function t(){return e};return e}function f2(){var e=(0,eh._)(["\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    "]);f2=function t(){return e};return e}function f6(){var e=(0,eh._)(["\n      transform: rotate(180deg);\n    "]);f6=function t(){return e};return e}var f4=e=>{var{size:r="regular",leftIconPadding:i=48,wrapperCss:o,options:a,field:s,fieldState:l,onChange:c=iV/* .noop */.lQ,label:u,placeholder:d="",disabled:f,readOnly:p,loading:h,isSearchable:v=false,isInlineLabel:m,hideCaret:g,listLabel:b,isClearable:_=false,helpText:y,removeOptionsMinWidth:x=false,leftIcon:w,iconSize:A,removeBorder:E,dataAttribute:I,isSecondary:k=false,isMagicAi:S=false,isAiOutline:O=false,selectOnFocus:T,optionItemCss:C}=e;var R;var D=A!==null&&A!==void 0?A:r==="small"?20:32;var F=(0,n.useCallback)(()=>a.find(e=>e.value===s.value)||{label:"",value:"",description:""},[s.value,a]);var Y=(0,n.useMemo)(()=>a.some(e=>(0,iH/* .isDefined */.O9)(e.description)),[a]);var[M,j]=(0,n.useState)((R=F())===null||R===void 0?void 0:R.label);var[P,L]=(0,n.useState)(false);var[N,H]=(0,n.useState)("");var[V,U]=(0,n.useState)(false);var K=(0,n.useRef)(null);var B=(0,n.useRef)(null);var z=(0,n.useRef)(null);var q=(0,n.useRef)(null);var W=(0,n.useMemo)(()=>{if(v){return a.filter(e=>{var{label:t}=e;return t.toLowerCase().includes(N.toLowerCase())})}return a},[N,v,a]);var G=(0,n.useMemo)(()=>{return a.find(e=>e.value===s.value)},[s.value,a]);var $=(0,ef._)({},(0,iH/* .isDefined */.O9)(I)&&{[I]:true});(0,n.useEffect)(()=>{var e;j((e=F())===null||e===void 0?void 0:e.label)},[s.value,F]);(0,n.useEffect)(()=>{if(V){var e;j((e=F())===null||e===void 0?void 0:e.label)}},[F,V]);var Q=(e,t)=>{t===null||t===void 0?void 0:t.stopPropagation();if(!e.disabled){U(false);L(false);H("");s.onChange(e.value);c(e)}};var{activeIndex:X,setActiveIndex:J}=ld({options:W,isOpen:V,selectedValue:s.value,onSelect:Q,onClose:()=>{U(false);L(false);H("")}});(0,n.useEffect)(()=>{if(V&&X>=0&&q.current){q.current.scrollIntoView({block:"nearest",behavior:"smooth"})}},[V,X]);return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{fieldState:l,field:s,label:u,disabled:f||a.length===0,readOnly:p,loading:h,isInlineLabel:m,helpText:y,removeBorder:E,isSecondary:k,isMagicAi:S,children:e=>{var n,c;var{css:u}=e,m=(0,iO._)(e,["css"]);return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:f3.mainWrapper,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:f3.inputWrapper(O),ref:B,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:f3.leftIcon,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:w,children:w}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:G===null||G===void 0?void 0:G.icon,children:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:e,width:D,height:D})})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:{width:"100%"},children:[/*#__PURE__*/(0,t/* .jsx */.Y)("input",(0,ep._)((0,ef._)({},m,$),{ref:e=>{s.ref(e);// @ts-ignore
K.current=e;// this is not ideal but it is the only way to set ref to the input element
},className:"tutor-input-field",css:[u,o,f3.input({hasLeftIcon:!!w||!!(G===null||G===void 0?void 0:G.icon),leftIconPadding:i,hasDescription:Y,hasError:!!l.error,isMagicAi:S,isAiOutline:O,size:r})],autoComplete:"off",readOnly:p||!v,placeholder:d,value:P?N:M,title:M,onClick:e=>{var t;e.stopPropagation();U(e=>!e);(t=K.current)===null||t===void 0?void 0:t.focus()},onKeyDown:e=>{if(e.key==="Enter"){var t;e.preventDefault();U(e=>!e);(t=K.current)===null||t===void 0?void 0:t.focus()}if(e.key==="Tab"){U(false)}},onFocus:T&&v?e=>{e.target.select()}:undefined,onChange:e=>{j(e.target.value);if(v){L(true);H(e.target.value)}},"data-select":true})),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:Y,children:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:f3.description({hasLeftIcon:!!w,leftIconPadding:i,size:r}),title:(n=F())===null||n===void 0?void 0:n.description,children:(c=F())===null||c===void 0?void 0:c.description})})]}),!g&&!h&&/*#__PURE__*/(0,t/* .jsx */.Y)("button",{tabIndex:-1,type:"button",css:f3.caretButton({isOpen:V}),onClick:()=>{var e;U(e=>!e);(e=K.current)===null||e===void 0?void 0:e.focus()},disabled:f||p||a.length===0,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"chevronDown",width:r==="small"?16:20,height:r==="small"?16:20})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(lz,{triggerRef:B,isOpen:V,dependencies:[W.length],animationType:ij.slideDown,closePopover:()=>{U(false);L(false);H("")},children:/*#__PURE__*/(0,t/* .jsxs */.FD)("ul",{css:[f3.options(x)],children:[!!b&&/*#__PURE__*/(0,t/* .jsx */.Y)("li",{css:f3.listLabel,children:b}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:W.length>0,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)("li",{css:f3.emptyState,children:(0,lo.__)("No options available","tutor-pro")}),children:W.map((e,r)=>/*#__PURE__*/(0,t/* .jsx */.Y)("li",{ref:e.value===s.value?z:X===r?q:null,css:[f3.optionItem({isSelected:e.value===s.value,isActive:r===X,isDisabled:!!e.disabled}),C],children:/*#__PURE__*/(0,t/* .jsxs */.FD)("button",{type:"button",css:f3.label,onClick:t=>{if(!e.disabled){Q(e,t)}},disabled:e.disabled,title:e.label,onMouseOver:()=>J(r),onMouseLeave:()=>r!==X&&J(-1),onFocus:()=>J(r),"aria-selected":X===r,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:e.icon,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:e.icon,width:D,height:D})}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:e.label})]})},String(e.value)))}),_&&/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:f3.clearButton({isDisabled:M===""}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",disabled:M==="",icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"delete"}),onClick:()=>{s.onChange(null);j("");H("");U(false)},children:(0,lo.__)("Clear","tutor-pro")})})]})})]})}})};/* export default */const f5=f4;var f3={mainWrapper:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;"),inputWrapper:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;return/*#__PURE__*/(0,c/* .css */.AH)("width:100%;display:flex;justify-content:space-between;align-items:center;position:relative;",e&&(0,c/* .css */.AH)(fU(),ik/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1,ik/* .colorTokens.text.primary */.I6.text.primary))},leftIcon:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;left:",ik/* .spacing["8"] */.YK["8"],";",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;height:100%;color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";z-index:",ik/* .zIndex.positive */.fE.positive,";"),input:e=>{var{hasLeftIcon:t,leftIconPadding:r,hasDescription:n,hasError:i=false,isMagicAi:o=false,isAiOutline:a=false,size:s}=e;return/*#__PURE__*/(0,c/* .css */.AH)("&.tutor-input-field:not(textarea){",iS/* .typography.body */.I.body(),";width:100%;cursor:pointer;padding-right:",ik/* .spacing["32"] */.YK["32"],";",aR/* .styleUtils.textEllipsis */.x.textEllipsis,";background-color:transparent;background-color:",ik/* .colorTokens.background.white */.I6.background.white,";",s==="small"&&(0,c/* .css */.AH)(fK(),ik/* .spacing["6"] */.YK["6"],ik/* .spacing["6"] */.YK["6"])," ",t&&(0,c/* .css */.AH)(fB(),ik/* .spacing */.YK[r])," ",n&&(0,c/* .css */.AH)(fq(),ik/* .spacing["24"] */.YK["24"],s==="small"&&(0,c/* .css */.AH)(fz(),ik/* .spacing["20"] */.YK["20"]))," ",i&&(0,c/* .css */.AH)(fW(),ik/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",a&&(0,c/* .css */.AH)(fG()),":focus{",aR/* .styleUtils.inputFocus */.x.inputFocus,";",o&&(0,c/* .css */.AH)(f$(),ik/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,ik/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",i&&(0,c/* .css */.AH)(fQ(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger,ik/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail),"}}")},description:e=>{var{hasLeftIcon:t,leftIconPadding:r,size:n}=e;return/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";",aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),"    color:",ik/* .colorTokens.text.hints */.I6.text.hints,";position:absolute;bottom:",ik/* .spacing["8"] */.YK["8"],";padding-inline:calc(",ik/* .spacing["16"] */.YK["16"]," + 1px) ",ik/* .spacing["32"] */.YK["32"],";",n==="small"&&(0,c/* .css */.AH)(fX(),ik/* .spacing["4"] */.YK["4"])," ",t&&(0,c/* .css */.AH)(fJ(),ik/* .spacing */.YK[r]))},listLabel:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";min-height:40px;display:flex;align-items:center;padding-left:",ik/* .spacing["16"] */.YK["16"],";"),clearButton:e=>{var{isDisabled:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["8"] */.YK["8"],";border-top:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";& > button{padding:0;width:100%;font-size:",ik/* .fontSize["12"] */.J["12"],";> span{justify-content:center;}",!t&&(0,c/* .css */.AH)(fZ(),ik/* .colorTokens.text.title */.I6.text.title),"}")},options:e=>/*#__PURE__*/(0,c/* .css */.AH)("z-index:",ik/* .zIndex.dropdown */.fE.dropdown,";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";list-style-type:none;box-shadow:",ik/* .shadow.popover */.r7.popover,";padding:",ik/* .spacing["4"] */.YK["4"]," 0;margin:0;max-height:500px;border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";",aR/* .styleUtils.overflowYAuto */.x.overflowYAuto,";scrollbar-gutter:auto;",!e&&(0,c/* .css */.AH)(f0())),optionItem:e=>{var{isSelected:t=false,isActive:r=false,isDisabled:n=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(iS/* .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,c/* .css */.AH)(f1(),ik/* .colorTokens.background.hover */.I6.background.hover),"    &:hover{background-color:",!n&&ik/* .colorTokens.background.hover */.I6.background.hover,";}",!n&&t&&(0,c/* .css */.AH)(f2(),ik/* .colorTokens.background.active */.I6.background.active,ik/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],ik/* .borderRadius["6"] */.Vq["6"],ik/* .borderRadius["6"] */.Vq["6"]))},label:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),";color:",ik/* .colorTokens.text.title */.I6.text.title,";width:100%;height:100%;display:flex;align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";margin:0 ",ik/* .spacing["12"] */.YK["12"],";padding:",ik/* .spacing["6"] */.YK["6"]," 0;text-align:left;line-height:",ik/* .lineHeight["24"] */.K_["24"],";word-break:break-all;cursor:pointer;&:hover,&:focus,&:active{background-color:transparent;color:",ik/* .colorTokens.text.title */.I6.text.title,";}span{flex-shrink:0;",aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),"      width:100%;}svg{flex-shrink:0;}"),arrowUpDown:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";display:flex;justify-content:center;align-items:center;margin-top:",ik/* .spacing["2"] */.YK["2"],";"),optionsContainer:/*#__PURE__*/(0,c/* .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,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";position:absolute;right:",ik/* .spacing["4"] */.YK["4"],";display:flex;align-items:center;transition:transform 0.3s ease-in-out;color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";padding:",ik/* .spacing["6"] */.YK["6"],";height:100%;&:focus,&:active,&:hover{background:none;color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:focus-visible{outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";}",t&&(0,c/* .css */.AH)(f6()))},emptyState:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.flexCenter */.x.flexCenter(),";padding:",ik/* .spacing["8"] */.YK["8"],";")};// CONCATENATED MODULE: ./node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@18.3.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
function f8(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return useMemo(()=>e=>{t.forEach(t=>t(e))},t)}// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
const f9=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";function f7(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||// In Electron context the Window object serializes to [object global]
t==="[object global]"}function pe(e){return"nodeType"in e}function pt(e){var t,r;if(!e){return window}if(f7(e)){return e}if(!pe(e)){return window}return(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window}function pr(e){const{Document:t}=pt(e);return e instanceof t}function pn(e){if(f7(e)){return false}return e instanceof pt(e).HTMLElement}function pi(e){return e instanceof pt(e).SVGElement}function po(e){if(!e){return document}if(f7(e)){return e.document}if(!pe(e)){return document}if(pr(e)){return e}if(pn(e)||pi(e)){return e.ownerDocument}return document}/**
 * A hook that resolves to useEffect on the server and useLayoutEffect on the client
 * @param callback {function} Callback function that is invoked when the dependencies of the hook change
 */const pa=/* unused pure expression or super */null&&(f9?useLayoutEffect:useEffect);function ps(e){const t=useRef(e);pa(()=>{t.current=e});return useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}return t.current==null?void 0:t.current(...r)},[])}function pl(){const e=useRef(null);const t=useCallback((t,r)=>{e.current=setInterval(t,r)},[]);const r=useCallback(()=>{if(e.current!==null){clearInterval(e.current);e.current=null}},[]);return[t,r]}function pc(e,t){if(t===void 0){t=[e]}const r=useRef(e);pa(()=>{if(r.current!==e){r.current=e}},t);return r}function pu(e,t){const r=useRef();return useMemo(()=>{const t=e(r.current);r.current=t;return t},[...t])}function pd(e){const t=ps(e);const r=useRef(null);const n=useCallback(e=>{if(e!==r.current){t==null?void 0:t(e,r.current)}r.current=e},[]);return[r,n]}function pf(e){const t=useRef();useEffect(()=>{t.current=e},[e]);return t.current}let pp=/* unused pure expression or super */null&&{};function ph(e,t){return useMemo(()=>{if(t){return t}const r=pp[e]==null?0:pp[e]+1;pp[e]=r;return e+"-"+r},[e,t])}function pv(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return n.reduce((t,r)=>{const n=Object.entries(r);for(const[r,i]of n){const n=t[r];if(n!=null){t[r]=n+e*i}}return t},{...t})}}const pm=/*#__PURE__*/pv(1);const pg=/*#__PURE__*/pv(-1);function pb(e){return"clientX"in e&&"clientY"in e}function p_(e){if(!e){return false}const{KeyboardEvent:t}=pt(e.target);return t&&e instanceof t}function py(e){if(!e){return false}const{TouchEvent:t}=pt(e.target);return t&&e instanceof t}/**
 * Returns the normalized x and y coordinates for mouse and touch events.
 */function px(e){if(py(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}if(pb(e)){return{x:e.clientX,y:e.clientY}}return null}const pw=/*#__PURE__*/Object.freeze({Translate:{toString(e){if(!e){return}const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e){return}const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!e){return}return[pw.Translate.toString(e),pw.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}});const pA="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function pE(e){if(e.matches(pA)){return e}return e.querySelector(pA)}//# sourceMappingURL=utilities.esm.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@18.3.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
const pI=/* unused pure expression or super */null&&{display:"none"};function pk(e){let{id:t,value:r}=e;return React.createElement("div",{id:t,style:pI},r)}function pS(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;// Hide element visually but keep it readable by screen readers
const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return React.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":true},r)}function pO(){const[e,t]=useState("");const r=useCallback(e=>{if(e!=null){t(e)}},[]);return{announce:r,announcement:e}}//# sourceMappingURL=accessibility.esm.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
const pT=/*#__PURE__*//* unused pure expression or super */null&&createContext(null);function pC(e){const t=useContext(pT);useEffect(()=>{if(!t){throw new Error("useDndMonitor must be used within a children of <DndContext>")}const r=t(e);return r},[e,t])}function pR(){const[e]=useState(()=>new Set);const t=useCallback(t=>{e.add(t);return()=>e.delete(t)},[e]);const r=useCallback(t=>{let{type:r,event:n}=t;e.forEach(e=>{var t;return(t=e[r])==null?void 0:t.call(e,n)})},[e]);return[r,t]}const pD=/* unused pure expression or super */null&&{draggable:"\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "};const pF=/* unused pure expression or super */null&&{onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;if(r){return"Draggable item "+t.id+" was moved over droppable area "+r.id+"."}return"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;if(r){return"Draggable item "+t.id+" was dropped over droppable area "+r.id}return"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function pY(e){let{announcements:t=pF,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=pD}=e;const{announce:o,announcement:a}=useAnnouncement();const s=useUniqueId("DndLiveRegion");const[l,c]=useState(false);useEffect(()=>{c(true)},[]);pC(useMemo(()=>({onDragStart(e){let{active:r}=e;o(t.onDragStart({active:r}))},onDragMove(e){let{active:r,over:n}=e;if(t.onDragMove){o(t.onDragMove({active:r,over:n}))}},onDragOver(e){let{active:r,over:n}=e;o(t.onDragOver({active:r,over:n}))},onDragEnd(e){let{active:r,over:n}=e;o(t.onDragEnd({active:r,over:n}))},onDragCancel(e){let{active:r,over:n}=e;o(t.onDragCancel({active:r,over:n}))}}),[o,t]));if(!l){return null}const u=React.createElement(React.Fragment,null,React.createElement(HiddenText,{id:n,value:i.draggable}),React.createElement(LiveRegion,{id:s,announcement:a}));return r?createPortal(u,r):u}var pM;(function(e){e["DragStart"]="dragStart";e["DragMove"]="dragMove";e["DragEnd"]="dragEnd";e["DragCancel"]="dragCancel";e["DragOver"]="dragOver";e["RegisterDroppable"]="registerDroppable";e["SetDroppableDisabled"]="setDroppableDisabled";e["UnregisterDroppable"]="unregisterDroppable"})(pM||(pM={}));function pj(){}function pP(e,t){return useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function pL(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return useMemo(()=>[...t].filter(e=>e!=null),[...t])}const pN=/*#__PURE__*/Object.freeze({x:0,y:0});/**
 * Returns the distance between two points
 */function pH(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function pV(e,t){const r=getEventCoordinates(e);if(!r){return"0 0"}const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}/**
 * Sort collisions from smallest to greatest value
 */function pU(e,t){let{data:{value:r}}=e;let{data:{value:n}}=t;return r-n}/**
 * Sort collisions from greatest to smallest value
 */function pK(e,t){let{data:{value:r}}=e;let{data:{value:n}}=t;return n-r}/**
 * Returns the coordinates of the corners of a given rectangle:
 * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]
 */function pB(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function pz(e,t){if(!e||e.length===0){return null}const[r]=e;return t?r[t]:r}/**
 * Returns the coordinates of the center of a given ClientRect
 */function pq(e,t,r){if(t===void 0){t=e.left}if(r===void 0){r=e.top}return{x:t+e.width*.5,y:r+e.height*.5}}/**
 * Returns the closest rectangles from an array of rectangles to the center of a given
 * rectangle.
 */const pW=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=pq(t,t.left,t.top);const o=[];for(const e of n){const{id:t}=e;const n=r.get(t);if(n){const r=pH(pq(n),i);o.push({id:t,data:{droppableContainer:e,value:r}})}}return o.sort(pU)};/**
 * Returns the closest rectangles from an array of rectangles to the corners of
 * another rectangle.
 */const pG=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=pB(t);const o=[];for(const e of n){const{id:t}=e;const n=r.get(t);if(n){const r=pB(n);const a=i.reduce((e,t,n)=>{return e+pH(r[n],t)},0);const s=Number((a/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:s}})}}return o.sort(pU)};/**
 * Returns the intersecting rectangle area between two rectangles
 */function p$(e,t){const r=Math.max(t.top,e.top);const n=Math.max(t.left,e.left);const i=Math.min(t.left+t.width,e.left+e.width);const o=Math.min(t.top+t.height,e.top+e.height);const a=i-n;const s=o-r;if(n<i&&r<o){const r=t.width*t.height;const n=e.width*e.height;const i=a*s;const o=i/(r+n-i);return Number(o.toFixed(4))}// Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)
return 0}/**
 * Returns the rectangles that has the greatest intersection area with a given
 * rectangle in an array of rectangles.
 */const pQ=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const e of n){const{id:n}=e;const o=r.get(n);if(o){const r=p$(o,t);if(r>0){i.push({id:n,data:{droppableContainer:e,value:r}})}}}return i.sort(pK)};/**
 * Check if a given point is contained within a bounding rectangle
 */function pX(e,t){const{top:r,left:n,bottom:i,right:o}=t;return r<=e.y&&e.y<=i&&n<=e.x&&e.x<=o}/**
 * Returns the rectangles that the pointer is hovering over
 */const pJ=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:n}=e;if(!n){return[]}const i=[];for(const e of t){const{id:t}=e;const o=r.get(t);if(o&&pX(n,o)){/* There may be more than a single rectangle intersecting
       * with the pointer coordinates. In order to sort the
       * colliding rectangles, we measure the distance between
       * the pointer and the corners of the intersecting rectangle
       */const r=pB(o);const a=r.reduce((e,t)=>{return e+pH(n,t)},0);const s=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:s}})}}return i.sort(pU)};function pZ(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function p0(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pN}function p1(e){return function t(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return n.reduce((t,r)=>({...t,top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x}),{...t})}}const p2=/*#__PURE__*//* unused pure expression or super */null&&p1(1);function p6(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function p4(e,t,r){const n=p6(t);if(!n){return e}const{scaleX:i,scaleY:o,x:a,y:s}=n;const l=e.left-a-(1-i)*parseFloat(r);const c=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1));const u=i?e.width/i:e.width;const d=o?e.height/o:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const p5={ignoreTransform:false};/**
 * Returns the bounding client rect of an element relative to the viewport.
 */function p3(e,t){if(t===void 0){t=p5}let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:n}=pt(e).getComputedStyle(e);if(t){r=p4(r,t,n)}}const{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}/**
 * Returns the bounding client rect of an element relative to the viewport.
 *
 * @remarks
 * The ClientRect returned by this method does not take into account transforms
 * applied to the element it measures.
 *
 */function p8(e){return p3(e,{ignoreTransform:true})}function p9(e){const t=e.innerWidth;const r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function p7(e,t){if(t===void 0){t=pt(e).getComputedStyle(e)}return t.position==="fixed"}function he(e,t){if(t===void 0){t=pt(e).getComputedStyle(e)}const r=/(auto|scroll|overlay)/;const n=["overflow","overflowX","overflowY"];return n.some(e=>{const n=t[e];return typeof n==="string"?r.test(n):false})}function ht(e,t){const r=[];function n(i){if(t!=null&&r.length>=t){return r}if(!i){return r}if(pr(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement)){r.push(i.scrollingElement);return r}if(!pn(i)||pi(i)){return r}if(r.includes(i)){return r}const o=pt(e).getComputedStyle(i);if(i!==e){if(he(i,o)){r.push(i)}}if(p7(i,o)){return r}return n(i.parentNode)}if(!e){return r}return n(e)}function hr(e){const[t]=ht(e,1);return t!=null?t:null}function hn(e){if(!canUseDOM||!e){return null}if(isWindow(e)){return e}if(!isNode(e)){return null}if(isDocument(e)||e===getOwnerDocument(e).scrollingElement){return window}if(isHTMLElement(e)){return e}return null}function hi(e){if(isWindow(e)){return e.scrollX}return e.scrollLeft}function ho(e){if(isWindow(e)){return e.scrollY}return e.scrollTop}function ha(e){return{x:hi(e),y:ho(e)}}var hs;(function(e){e[e["Forward"]=1]="Forward";e[e["Backward"]=-1]="Backward"})(hs||(hs={}));function hl(e){if(!f9||!e){return false}return e===document.scrollingElement}function hc(e){const t={x:0,y:0};const r=hl(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth};const n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height};const i=e.scrollTop<=t.y;const o=e.scrollLeft<=t.x;const a=e.scrollTop>=n.y;const s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const hu=/* unused pure expression or super */null&&{x:.2,y:.2};function hd(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;if(n===void 0){n=10}if(i===void 0){i=hu}const{isTop:c,isBottom:u,isLeft:d,isRight:f}=hc(e);const p={x:0,y:0};const h={x:0,y:0};const v={height:t.height*i.y,width:t.width*i.x};if(!c&&o<=t.top+v.height){// Scroll Up
p.y=hs.Backward;h.y=n*Math.abs((t.top+v.height-o)/v.height)}else if(!u&&l>=t.bottom-v.height){// Scroll Down
p.y=hs.Forward;h.y=n*Math.abs((t.bottom-v.height-l)/v.height)}if(!f&&s>=t.right-v.width){// Scroll Right
p.x=hs.Forward;h.x=n*Math.abs((t.right-v.width-s)/v.width)}else if(!d&&a<=t.left+v.width){// Scroll Left
p.x=hs.Backward;h.x=n*Math.abs((t.left+v.width-a)/v.width)}return{direction:p,speed:h}}function hf(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function hp(e){return e.reduce((e,t)=>{return add(e,ha(t))},pN)}function hh(e){return e.reduce((e,t)=>{return e+hi(t)},0)}function hv(e){return e.reduce((e,t)=>{return e+ho(t)},0)}function hm(e,t){if(t===void 0){t=p3}if(!e){return}const{top:r,left:n,bottom:i,right:o}=t(e);const a=hr(e);if(!a){return}if(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth){e.scrollIntoView({block:"center",inline:"center"})}}const hg=/* unused pure expression or super */null&&[["x",["left","right"],hh],["y",["top","bottom"],hv]];class hb{constructor(e,t){this.rect=void 0;this.width=void 0;this.height=void 0;this.top=void 0;this.bottom=void 0;this.right=void 0;this.left=void 0;const r=ht(t);const n=hp(r);this.rect={...e};this.width=e.width;this.height=e.height;for(const[e,t,i]of hg){for(const o of t){Object.defineProperty(this,o,{get:()=>{const t=i(r);const a=n[e]-t;return this.rect[o]+a},enumerable:true})}}Object.defineProperty(this,"rect",{enumerable:false})}}class h_{constructor(e){this.target=void 0;this.listeners=[];this.removeAll=()=>{this.listeners.forEach(e=>{var t;return(t=this.target)==null?void 0:t.removeEventListener(...e)})};this.target=e}add(e,t,r){var n;(n=this.target)==null?void 0:n.addEventListener(e,t,r);this.listeners.push([e,t,r])}}function hy(e){// If the `event.target` element is removed from the document events will still be targeted
// at it, and hence won't always bubble up to the window or document anymore.
// If there is any risk of an element being removed while it is being dragged,
// the best practice is to attach the event listeners directly to the target.
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
const{EventTarget:t}=pt(e);return e instanceof t?e:po(e)}function hx(e,t){const r=Math.abs(e.x);const n=Math.abs(e.y);if(typeof t==="number"){return Math.sqrt(r**2+n**2)>t}if("x"in t&&"y"in t){return r>t.x&&n>t.y}if("x"in t){return r>t.x}if("y"in t){return n>t.y}return false}var hw;(function(e){e["Click"]="click";e["DragStart"]="dragstart";e["Keydown"]="keydown";e["ContextMenu"]="contextmenu";e["Resize"]="resize";e["SelectionChange"]="selectionchange";e["VisibilityChange"]="visibilitychange"})(hw||(hw={}));function hA(e){e.preventDefault()}function hE(e){e.stopPropagation()}var hI;(function(e){e["Space"]="Space";e["Down"]="ArrowDown";e["Right"]="ArrowRight";e["Left"]="ArrowLeft";e["Up"]="ArrowUp";e["Esc"]="Escape";e["Enter"]="Enter";e["Tab"]="Tab"})(hI||(hI={}));const hk={start:[hI.Space,hI.Enter],cancel:[hI.Esc],end:[hI.Space,hI.Enter,hI.Tab]};const hS=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case hI.Right:return{...r,x:r.x+25};case hI.Left:return{...r,x:r.x-25};case hI.Down:return{...r,y:r.y+25};case hI.Up:return{...r,y:r.y-25}}return undefined};class hO{constructor(e){this.props=void 0;this.autoScrollEnabled=false;this.referenceCoordinates=void 0;this.listeners=void 0;this.windowListeners=void 0;this.props=e;const{event:{target:t}}=e;this.props=e;this.listeners=new h_(po(t));this.windowListeners=new h_(pt(t));this.handleKeyDown=this.handleKeyDown.bind(this);this.handleCancel=this.handleCancel.bind(this);this.attach()}attach(){this.handleStart();this.windowListeners.add(hw.Resize,this.handleCancel);this.windowListeners.add(hw.VisibilityChange,this.handleCancel);setTimeout(()=>this.listeners.add(hw.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props;const r=e.node.current;if(r){hm(r)}t(pN)}handleKeyDown(e){if(p_(e)){const{active:t,context:r,options:n}=this.props;const{keyboardCodes:i=hk,coordinateGetter:o=hS,scrollBehavior:a="smooth"}=n;const{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}const{collisionRect:l}=r.current;const c=l?{x:l.left,y:l.top}:pN;if(!this.referenceCoordinates){this.referenceCoordinates=c}const u=o(e,{active:t,context:r.current,currentCoordinates:c});if(u){const t=pg(u,c);const n={x:0,y:0};const{scrollableAncestors:i}=r.current;for(const r of i){const i=e.code;const{isTop:o,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:f}=hc(r);const p=hf(r);const h={x:Math.min(i===hI.Right?p.right-p.width/2:p.right,Math.max(i===hI.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===hI.Down?p.bottom-p.height/2:p.bottom,Math.max(i===hI.Down?p.top:p.top+p.height/2,u.y))};const v=i===hI.Right&&!s||i===hI.Left&&!l;const m=i===hI.Down&&!c||i===hI.Up&&!o;if(v&&h.x!==u.x){const e=r.scrollLeft+t.x;const o=i===hI.Right&&e<=d.x||i===hI.Left&&e>=f.x;if(o&&!t.y){// We don't need to update coordinates, the scroll adjustment alone will trigger
// logic to auto-detect the new container we are over
r.scrollTo({left:e,behavior:a});return}if(o){n.x=r.scrollLeft-e}else{n.x=i===hI.Right?r.scrollLeft-d.x:r.scrollLeft-f.x}if(n.x){r.scrollBy({left:-n.x,behavior:a})}break}else if(m&&h.y!==u.y){const e=r.scrollTop+t.y;const o=i===hI.Down&&e<=d.y||i===hI.Up&&e>=f.y;if(o&&!t.x){// We don't need to update coordinates, the scroll adjustment alone will trigger
// logic to auto-detect the new container we are over
r.scrollTo({top:e,behavior:a});return}if(o){n.y=r.scrollTop-e}else{n.y=i===hI.Down?r.scrollTop-d.y:r.scrollTop-f.y}if(n.y){r.scrollBy({top:-n.y,behavior:a})}break}}this.handleMove(e,pm(pg(u,this.referenceCoordinates),n))}}}handleMove(e,t){const{onMove:r}=this.props;e.preventDefault();r(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault();this.detach();t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault();this.detach();t()}detach(){this.listeners.removeAll();this.windowListeners.removeAll()}}hO.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=hk,onActivation:i}=t;let{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const t=o.activatorNode.current;if(t&&e.target!==t){return false}e.preventDefault();i==null?void 0:i({event:e.nativeEvent});return true}return false}}];function hT(e){return Boolean(e&&"distance"in e)}function hC(e){return Boolean(e&&"delay"in e)}class hR{constructor(e,t,r){var n;if(r===void 0){r=hy(e.event.target)}this.props=void 0;this.events=void 0;this.autoScrollEnabled=true;this.document=void 0;this.activated=false;this.initialCoordinates=void 0;this.timeoutId=null;this.listeners=void 0;this.documentListeners=void 0;this.windowListeners=void 0;this.props=e;this.events=t;const{event:i}=e;const{target:o}=i;this.props=e;this.events=t;this.document=po(o);this.documentListeners=new h_(this.document);this.listeners=new h_(r);this.windowListeners=new h_(pt(o));this.initialCoordinates=(n=px(i))!=null?n:pN;this.handleStart=this.handleStart.bind(this);this.handleMove=this.handleMove.bind(this);this.handleEnd=this.handleEnd.bind(this);this.handleCancel=this.handleCancel.bind(this);this.handleKeydown=this.handleKeydown.bind(this);this.removeTextSelection=this.removeTextSelection.bind(this);this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:r}}}=this;this.listeners.add(e.move.name,this.handleMove,{passive:false});this.listeners.add(e.end.name,this.handleEnd);if(e.cancel){this.listeners.add(e.cancel.name,this.handleCancel)}this.windowListeners.add(hw.Resize,this.handleCancel);this.windowListeners.add(hw.DragStart,hA);this.windowListeners.add(hw.VisibilityChange,this.handleCancel);this.windowListeners.add(hw.ContextMenu,hA);this.documentListeners.add(hw.Keydown,this.handleKeydown);if(t){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options})){return this.handleStart()}if(hC(t)){this.timeoutId=setTimeout(this.handleStart,t.delay);this.handlePending(t);return}if(hT(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll();this.windowListeners.removeAll();// Wait until the next event loop before removing document listeners
// This is necessary because we listen for `click` and `selection` events on the document
setTimeout(this.documentListeners.removeAll,50);if(this.timeoutId!==null){clearTimeout(this.timeoutId);this.timeoutId=null}}handlePending(e,t){const{active:r,onPending:n}=this.props;n(r,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this;const{onStart:t}=this.props;if(e){this.activated=true;// Stop propagation of click events once activation constraints are met
this.documentListeners.add(hw.Click,hE,{capture:true});// Remove any text selection from the document
this.removeTextSelection();// Prevent further text selection while dragging
this.documentListeners.add(hw.SelectionChange,this.removeTextSelection);t(e)}}handleMove(e){var t;const{activated:r,initialCoordinates:n,props:i}=this;const{onMove:o,options:{activationConstraint:a}}=i;if(!n){return}const s=(t=px(e))!=null?t:pN;const l=pg(n,s);// Constraint validation
if(!r&&a){if(hT(a)){if(a.tolerance!=null&&hx(l,a.tolerance)){return this.handleCancel()}if(hx(l,a.distance)){return this.handleStart()}}if(hC(a)){if(hx(l,a.tolerance)){return this.handleCancel()}}this.handlePending(a,l);return}if(e.cancelable){e.preventDefault()}o(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach();if(!this.activated){e(this.props.active)}t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach();if(!this.activated){e(this.props.active)}t()}handleKeydown(e){if(e.code===hI.Esc){this.handleCancel()}}removeTextSelection(){var e;(e=this.document.getSelection())==null?void 0:e.removeAllRanges()}}const hD={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class hF extends hR{constructor(e){const{event:t}=e;// Pointer events stop firing if the target is unmounted while dragging
// Therefore we attach listeners to the owner document instead
const r=po(t.target);super(e,hD,r)}}hF.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e;let{onActivation:n}=t;if(!r.isPrimary||r.button!==0){return false}n==null?void 0:n({event:r});return true}}];const hY={move:{name:"mousemove"},end:{name:"mouseup"}};var hM;(function(e){e[e["RightClick"]=2]="RightClick"})(hM||(hM={}));class hj extends hR{constructor(e){super(e,hY,po(e.event.target))}}hj.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e;let{onActivation:n}=t;if(r.button===hM.RightClick){return false}n==null?void 0:n({event:r});return true}}];const hP={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class hL extends hR{constructor(e){super(e,hP)}static setup(){// Adding a non-capture and non-passive `touchmove` listener in order
// to force `event.preventDefault()` calls to work in dynamically added
// touchmove event handlers. This is required for iOS Safari.
window.addEventListener(hP.move.name,e,{capture:false,passive:false});return function t(){window.removeEventListener(hP.move.name,e)};// We create a new handler because the teardown function of another sensor
// could remove our event listener if we use a referentially equal listener.
function e(){}}}hL.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e;let{onActivation:n}=t;const{touches:i}=r;if(i.length>1){return false}n==null?void 0:n({event:r});return true}}];var hN;(function(e){e[e["Pointer"]=0]="Pointer";e[e["DraggableRect"]=1]="DraggableRect"})(hN||(hN={}));var hH;(function(e){e[e["TreeOrder"]=0]="TreeOrder";e[e["ReversedTreeOrder"]=1]="ReversedTreeOrder"})(hH||(hH={}));function hV(e){let{acceleration:t,activator:r=hN.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=hH.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=hK({delta:d,disabled:!o});const[h,v]=useInterval();const m=useRef({x:0,y:0});const g=useRef({x:0,y:0});const b=useMemo(()=>{switch(r){case hN.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case hN.DraggableRect:return i}},[r,i,l]);const _=useRef(null);const y=useCallback(()=>{const e=_.current;if(!e){return}const t=m.current.x*g.current.x;const r=m.current.y*g.current.y;e.scrollBy(t,r)},[]);const x=useMemo(()=>s===hH.TreeOrder?[...c].reverse():c,[s,c]);useEffect(()=>{if(!o||!c.length||!b){v();return}for(const e of x){if((n==null?void 0:n(e))===false){continue}const r=c.indexOf(e);const i=u[r];if(!i){continue}const{direction:o,speed:s}=hd(e,i,b,t,f);for(const e of["x","y"]){if(!p[e][o[e]]){s[e]=0;o[e]=0}}if(s.x>0||s.y>0){v();_.current=e;h(y,a);m.current=s;g.current=o;return}}m.current={x:0,y:0};g.current={x:0,y:0};v()},[t,y,n,v,o,a,JSON.stringify(b),JSON.stringify(p),h,c,x,u,JSON.stringify(f)])}const hU={x:{[hs.Backward]:false,[hs.Forward]:false},y:{[hs.Backward]:false,[hs.Forward]:false}};function hK(e){let{delta:t,disabled:r}=e;const n=usePrevious(t);return useLazyMemo(e=>{if(r||!n||!e){// Reset scroll intent tracking when auto-scrolling is disabled
return hU}const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};// Keep track of the user intent to scroll in each direction for both axis
return{x:{[hs.Backward]:e.x[hs.Backward]||i.x===-1,[hs.Forward]:e.x[hs.Forward]||i.x===1},y:{[hs.Backward]:e.y[hs.Backward]||i.y===-1,[hs.Forward]:e.y[hs.Forward]||i.y===1}}},[r,t,n])}function hB(e,t){const r=t!=null?e.get(t):undefined;const n=r?r.node.current:null;return useLazyMemo(e=>{var r;if(t==null){return null}// In some cases, the draggable node can unmount while dragging
// This is the case for virtualized lists. In those situations,
// we fall back to the last known value for that node.
return(r=n!=null?n:e)!=null?r:null},[n,t])}function hz(e,t){return useMemo(()=>e.reduce((e,r)=>{const{sensor:n}=r;const i=n.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,r)}));return[...e,...i]},[]),[e,t])}var hq;(function(e){e[e["Always"]=0]="Always";e[e["BeforeDragging"]=1]="BeforeDragging";e[e["WhileDragging"]=2]="WhileDragging"})(hq||(hq={}));var hW;(function(e){e["Optimized"]="optimized"})(hW||(hW={}));const hG=/*#__PURE__*/new Map;function h$(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=useState(null);const{frequency:s,measure:l,strategy:c}=i;const u=useRef(e);const d=m();const f=useLatestValue(d);const p=useCallback(function(e){if(e===void 0){e=[]}if(f.current){return}a(t=>{if(t===null){return e}return t.concat(e.filter(e=>!t.includes(e)))})},[f]);const h=useRef(null);const v=useLazyMemo(t=>{if(d&&!r){return hG}if(!t||t===hG||u.current!==e||o!=null){const t=new Map;for(let r of e){if(!r){continue}if(o&&o.length>0&&!o.includes(r.id)&&r.rect.current){// This container does not need to be re-measured
t.set(r.id,r.rect.current);continue}const e=r.node.current;const n=e?new hb(l(e),e):null;r.rect.current=n;if(n){t.set(r.id,n)}}return t}return t},[e,o,r,d,l]);useEffect(()=>{u.current=e},[e]);useEffect(()=>{if(d){return}p()},[r,d]);useEffect(()=>{if(o&&o.length>0){a(null)}},[JSON.stringify(o)]);useEffect(()=>{if(d||typeof s!=="number"||h.current!==null){return}h.current=setTimeout(()=>{p();h.current=null},s)},[s,d,p,...n]);return{droppableRects:v,measureDroppableContainers:p,measuringScheduled:o!=null};function m(){switch(c){case hq.Always:return false;case hq.BeforeDragging:return r;default:return!r}}}function hQ(e,t){return useLazyMemo(r=>{if(!e){return null}if(r){return r}return typeof t==="function"?t(e):e},[t,e])}function hX(e,t){return hQ(e,t)}/**
 * Returns a new MutationObserver instance.
 * If `MutationObserver` is undefined in the execution environment, returns `undefined`.
 */function hJ(e){let{callback:t,disabled:r}=e;const n=useEvent(t);const i=useMemo(()=>{if(r||typeof window==="undefined"||typeof window.MutationObserver==="undefined"){return undefined}const{MutationObserver:e}=window;return new e(n)},[n,r]);useEffect(()=>{return()=>i==null?void 0:i.disconnect()},[i]);return i}/**
 * Returns a new ResizeObserver instance bound to the `onResize` callback.
 * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.
 */function hZ(e){let{callback:t,disabled:r}=e;const n=useEvent(t);const i=useMemo(()=>{if(r||typeof window==="undefined"||typeof window.ResizeObserver==="undefined"){return undefined}const{ResizeObserver:e}=window;return new e(n)},[r]);useEffect(()=>{return()=>i==null?void 0:i.disconnect()},[i]);return i}function h0(e){return new hb(p3(e),e)}function h1(e,t,r){if(t===void 0){t=h0}const[n,i]=useState(null);function o(){i(n=>{if(!e){return null}if(e.isConnected===false){var i;// Fall back to last rect we measured if the element is
// no longer connected to the DOM.
return(i=n!=null?n:r)!=null?i:null}const o=t(e);if(JSON.stringify(n)===JSON.stringify(o)){return n}return o})}const a=hJ({callback(t){if(!e){return}for(const r of t){const{type:t,target:n}=r;if(t==="childList"&&n instanceof HTMLElement&&n.contains(e)){o();break}}}});const s=hZ({callback:o});useIsomorphicLayoutEffect(()=>{o();if(e){s==null?void 0:s.observe(e);a==null?void 0:a.observe(document.body,{childList:true,subtree:true})}else{s==null?void 0:s.disconnect();a==null?void 0:a.disconnect()}},[e]);return n}function h2(e){const t=hQ(e);return p0(e,t)}const h6=/* unused pure expression or super */null&&[];function h4(e){const t=useRef(e);const r=useLazyMemo(r=>{if(!e){return h6}if(r&&r!==h6&&e&&t.current&&e.parentNode===t.current.parentNode){return r}return ht(e)},[e]);useEffect(()=>{t.current=e},[e]);return r}function h5(e){const[t,r]=useState(null);const n=useRef(e);// To-do: Throttle the handleScroll callback
const i=useCallback(e=>{const t=hn(e.target);if(!t){return}r(e=>{if(!e){return null}e.set(t,ha(t));return new Map(e)})},[]);useEffect(()=>{const t=n.current;if(e!==t){o(t);const a=e.map(e=>{const t=hn(e);if(t){t.addEventListener("scroll",i,{passive:true});return[t,ha(t)]}return null}).filter(e=>e!=null);r(a.length?new Map(a):null);n.current=e}return()=>{o(e);o(t)};function o(e){e.forEach(e=>{const t=hn(e);t==null?void 0:t.removeEventListener("scroll",i)})}},[i,e]);return useMemo(()=>{if(e.length){return t?Array.from(t.values()).reduce((e,t)=>add(e,t),pN):hp(e)}return pN},[e,t])}function h3(e,t){if(t===void 0){t=[]}const r=useRef(null);useEffect(()=>{r.current=null},t);useEffect(()=>{const t=e!==pN;if(t&&!r.current){r.current=e}if(!t&&r.current){r.current=null}},[e]);return r.current?subtract(e,r.current):pN}function h8(e){useEffect(()=>{if(!canUseDOM){return}const t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(const e of t){e==null?void 0:e()}}},// eslint-disable-next-line react-hooks/exhaustive-deps
e.map(e=>{let{sensor:t}=e;return t}))}function h9(e,t){return useMemo(()=>{return e.reduce((e,r)=>{let{eventName:n,handler:i}=r;e[n]=e=>{i(e,t)};return e},{})},[e,t])}function h7(e){return useMemo(()=>e?p9(e):null,[e])}const ve=/* unused pure expression or super */null&&[];function vt(e,t){if(t===void 0){t=p3}const[r]=e;const n=h7(r?getWindow(r):null);const[i,o]=useState(ve);function a(){o(()=>{if(!e.length){return ve}return e.map(e=>hl(e)?n:new hb(t(e),e))})}const s=hZ({callback:a});useIsomorphicLayoutEffect(()=>{s==null?void 0:s.disconnect();a();e.forEach(e=>s==null?void 0:s.observe(e))},[e]);return i}function vr(e){if(!e){return null}if(e.children.length>1){return e}const t=e.children[0];return isHTMLElement(t)?t:e}function vn(e){let{measure:t}=e;const[r,n]=useState(null);const i=useCallback(e=>{for(const{target:r}of e){if(isHTMLElement(r)){n(e=>{const n=t(r);return e?{...e,width:n.width,height:n.height}:n});break}}},[t]);const o=hZ({callback:i});const a=useCallback(e=>{const r=vr(e);o==null?void 0:o.disconnect();if(r){o==null?void 0:o.observe(r)}n(r?t(r):null)},[t,o]);const[s,l]=useNodeRef(a);return useMemo(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const vi=/* unused pure expression or super */null&&[{sensor:hF,options:{}},{sensor:hO,options:{}}];const vo=/* unused pure expression or super */null&&{current:{}};const va={draggable:{measure:p8},droppable:{measure:p8,strategy:hq.WhileDragging,frequency:hW.Optimized},dragOverlay:{measure:p3}};class vs extends Map{get(e){var t;return e!=null?(t=super.get(e))!=null?t:undefined:undefined}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,r;return(t=(r=this.get(e))==null?void 0:r.node.current)!=null?t:undefined}}const vl={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/*#__PURE__*/new Map,droppableRects:/*#__PURE__*/new Map,droppableContainers:/*#__PURE__*/new vs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pj},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:va,measureDroppableContainers:pj,windowRect:null,measuringScheduled:false};const vc={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pj,draggableNodes:/*#__PURE__*/new Map,over:null,measureDroppableContainers:pj};const vu=/*#__PURE__*//* unused pure expression or super */null&&createContext(vc);const vd=/*#__PURE__*//* unused pure expression or super */null&&createContext(vl);function vf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vs}}}function vp(e,t){switch(t.type){case pM.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case pM.DragMove:if(e.draggable.active==null){return e}return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case pM.DragEnd:case pM.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case pM.RegisterDroppable:{const{element:r}=t;const{id:n}=r;const i=new vs(e.droppable.containers);i.set(n,r);return{...e,droppable:{...e.droppable,containers:i}}}case pM.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t;const o=e.droppable.containers.get(r);if(!o||n!==o.key){return e}const a=new vs(e.droppable.containers);a.set(r,{...o,disabled:i});return{...e,droppable:{...e.droppable,containers:a}}}case pM.UnregisterDroppable:{const{id:r,key:n}=t;const i=e.droppable.containers.get(r);if(!i||n!==i.key){return e}const o=new vs(e.droppable.containers);o.delete(r);return{...e,droppable:{...e.droppable,containers:o}}}default:{return e}}}function vh(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=useContext(vu);const o=usePrevious(n);const a=usePrevious(r==null?void 0:r.id);// Restore keyboard focus on the activator node
useEffect(()=>{if(t){return}if(!n&&o&&a!=null){if(!isKeyboardEvent(o)){return}if(document.activeElement===o.target){// No need to restore focus
return}const e=i.get(a);if(!e){return}const{activatorNode:t,node:r}=e;if(!t.current&&!r.current){return}requestAnimationFrame(()=>{for(const e of[t.current,r.current]){if(!e){continue}const t=findFirstFocusableNode(e);if(t){t.focus();break}}})}},[n,t,i,a,o]);return null}function vv(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((e,t)=>{return t({transform:e,...n})},r):r}function vm(e){return useMemo(()=>({draggable:{...va.draggable,...e==null?void 0:e.draggable},droppable:{...va.droppable,...e==null?void 0:e.droppable},dragOverlay:{...va.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function vg(e){let{activeNode:t,measure:r,initialRect:n,config:i=true}=e;const o=useRef(false);const{x:a,y:s}=typeof i==="boolean"?{x:i,y:i}:i;useIsomorphicLayoutEffect(()=>{const e=!a&&!s;if(e||!t){o.current=false;return}if(o.current||!n){// Return early if layout shift scroll compensation was already attempted
// or if there is no initialRect to compare to.
return}// Get the most up to date node ref for the active draggable
const i=t==null?void 0:t.node.current;if(!i||i.isConnected===false){// Return early if there is no attached node ref or if the node is
// disconnected from the document.
return}const l=r(i);const c=p0(l,n);if(!a){c.x=0}if(!s){c.y=0}// Only perform layout shift scroll compensation once
o.current=true;if(Math.abs(c.x)>0||Math.abs(c.y)>0){const e=hr(i);if(e){e.scrollBy({top:c.y,left:c.x})}}},[t,a,s,n,r])}const vb=/*#__PURE__*/(0,n.createContext)({...pN,scaleX:1,scaleY:1});var v_;(function(e){e[e["Uninitialized"]=0]="Uninitialized";e[e["Initializing"]=1]="Initializing";e[e["Initialized"]=2]="Initialized"})(v_||(v_={}));const vy=/*#__PURE__*//* unused pure expression or super */null&&memo(function e(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=true,children:l,sensors:c=vi,collisionDetection:u=pQ,measuring:d,modifiers:f,...p}=e;const h=useReducer(vp,undefined,vf);const[v,m]=h;const[g,b]=pR();const[_,y]=useState(v_.Uninitialized);const x=_===v_.Initialized;const{draggable:{active:w,nodes:A,translate:E},droppable:{containers:I}}=v;const k=w!=null?A.get(w):null;const S=useRef({initial:null,translated:null});const O=useMemo(()=>{var e;return w!=null?{id:w,// It's possible for the active node to unmount while dragging
data:(e=k==null?void 0:k.data)!=null?e:vo,rect:S}:null},[w,k]);const T=useRef(null);const[C,R]=useState(null);const[D,F]=useState(null);const Y=useLatestValue(p,Object.values(p));const M=useUniqueId("DndDescribedBy",o);const j=useMemo(()=>I.getEnabled(),[I]);const P=vm(d);const{droppableRects:L,measureDroppableContainers:N,measuringScheduled:H}=h$(j,{dragging:x,dependencies:[E.x,E.y],config:P.droppable});const V=hB(A,w);const U=useMemo(()=>D?getEventCoordinates(D):null,[D]);const K=ew();const B=hX(V,P.draggable.measure);vg({activeNode:w!=null?A.get(w):null,config:K.layoutShiftCompensation,initialRect:B,measure:P.draggable.measure});const z=h1(V,P.draggable.measure,B);const q=h1(V?V.parentElement:null);const W=useRef({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null});const G=I.getNodeFor((t=W.current.over)==null?void 0:t.id);const $=vn({measure:P.dragOverlay.measure});// Use the rect of the drag overlay if it is mounted
const Q=(r=$.nodeRef.current)!=null?r:V;const X=x?(n=$.rect)!=null?n:z:null;const J=Boolean($.nodeRef.current&&$.rect);// The delta between the previous and new position of the draggable node
// is only relevant when there is no drag overlay
const Z=h2(J?null:z);// Get the window rect of the dragging node
const ee=h7(Q?getWindow(Q):null);// Get scrollable ancestors of the dragging node
const et=h4(x?G!=null?G:V:null);const er=vt(et);// Apply modifiers
const en=vv(f,{transform:{x:E.x-Z.x,y:E.y-Z.y,scaleX:1,scaleY:1},activatorEvent:D,active:O,activeNodeRect:z,containerNodeRect:q,draggingNodeRect:X,over:W.current.over,overlayNodeRect:$.rect,scrollableAncestors:et,scrollableAncestorRects:er,windowRect:ee});const ei=U?add(U,E):null;const eo=h5(et);// Represents the scroll delta since dragging was initiated
const ea=h3(eo);// Represents the scroll delta since the last time the active node rect was measured
const es=h3(eo,[z]);const el=add(en,ea);const ec=X?p2(X,en):null;const eu=O&&ec?u({active:O,collisionRect:ec,droppableRects:L,droppableContainers:j,pointerCoordinates:ei}):null;const ed=pz(eu,"id");const[ef,ep]=useState(null);// When there is no drag overlay used, we need to account for the
// window scroll delta
const eh=J?en:add(en,es);const ev=pZ(eh,(i=ef==null?void 0:ef.rect)!=null?i:null,z);const em=useRef(null);const eg=useCallback((e,t)=>{let{sensor:r,options:n}=t;if(T.current==null){return}const i=A.get(T.current);if(!i){return}const o=e.nativeEvent;const a=new r({active:T.current,activeNode:i,event:o,options:n,// Sensors need to be instantiated with refs for arguments that change over time
// otherwise they are frozen in time with the stale arguments
context:W,onAbort(e){const t=A.get(e);if(!t){return}const{onDragAbort:r}=Y.current;const n={id:e};r==null?void 0:r(n);g({type:"onDragAbort",event:n})},onPending(e,t,r,n){const i=A.get(e);if(!i){return}const{onDragPending:o}=Y.current;const a={id:e,constraint:t,initialCoordinates:r,offset:n};o==null?void 0:o(a);g({type:"onDragPending",event:a})},onStart(e){const t=T.current;if(t==null){return}const r=A.get(t);if(!r){return}const{onDragStart:n}=Y.current;const i={activatorEvent:o,active:{id:t,data:r.data,rect:S}};unstable_batchedUpdates(()=>{n==null?void 0:n(i);y(v_.Initializing);m({type:pM.DragStart,initialCoordinates:e,active:t});g({type:"onDragStart",event:i});R(em.current);F(o)})},onMove(e){m({type:pM.DragMove,coordinates:e})},onEnd:s(pM.DragEnd),onCancel:s(pM.DragCancel)});em.current=a;function s(e){return async function t(){const{active:t,collisions:r,over:n,scrollAdjustedTranslate:i}=W.current;let a=null;if(t&&i){const{cancelDrop:s}=Y.current;a={activatorEvent:o,active:t,collisions:r,delta:i,over:n};if(e===pM.DragEnd&&typeof s==="function"){const t=await Promise.resolve(s(a));if(t){e=pM.DragCancel}}}T.current=null;unstable_batchedUpdates(()=>{m({type:e});y(v_.Uninitialized);ep(null);R(null);F(null);em.current=null;const t=e===pM.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=Y.current[t];e==null?void 0:e(a);g({type:t,event:a})}})}}},[A]);const eb=useCallback((e,t)=>{return(r,n)=>{const i=r.nativeEvent;const o=A.get(n);if(T.current!==null||// No active draggable
!o||// Event has already been captured
i.dndKit||i.defaultPrevented){return}const a={active:o};const s=e(r,t.options,a);if(s===true){i.dndKit={capturedBy:t.sensor};T.current=n;eg(r,t)}}},[A,eg]);const e_=hz(c,eb);h8(c);useIsomorphicLayoutEffect(()=>{if(z&&_===v_.Initializing){y(v_.Initialized)}},[z,_]);useEffect(()=>{const{onDragMove:e}=Y.current;const{active:t,activatorEvent:r,collisions:n,over:i}=W.current;if(!t||!r){return}const o={active:t,activatorEvent:r,collisions:n,delta:{x:el.x,y:el.y},over:i};unstable_batchedUpdates(()=>{e==null?void 0:e(o);g({type:"onDragMove",event:o})})},[el.x,el.y]);useEffect(()=>{const{active:e,activatorEvent:t,collisions:r,droppableContainers:n,scrollAdjustedTranslate:i}=W.current;if(!e||T.current==null||!t||!i){return}const{onDragOver:o}=Y.current;const a=n.get(ed);const s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null;const l={active:e,activatorEvent:t,collisions:r,delta:{x:i.x,y:i.y},over:s};unstable_batchedUpdates(()=>{ep(s);o==null?void 0:o(l);g({type:"onDragOver",event:l})})},[ed]);useIsomorphicLayoutEffect(()=>{W.current={activatorEvent:D,active:O,activeNode:V,collisionRect:ec,collisions:eu,droppableRects:L,draggableNodes:A,draggingNode:Q,draggingNodeRect:X,droppableContainers:I,over:ef,scrollableAncestors:et,scrollAdjustedTranslate:el};S.current={initial:X,translated:ec}},[O,V,eu,ec,A,Q,X,L,I,ef,et,el]);hV({...K,delta:E,draggingRect:ec,pointerCoordinates:ei,scrollableAncestors:et,scrollableAncestorRects:er});const ey=useMemo(()=>{const e={active:O,activeNode:V,activeNodeRect:z,activatorEvent:D,collisions:eu,containerNodeRect:q,dragOverlay:$,draggableNodes:A,droppableContainers:I,droppableRects:L,over:ef,measureDroppableContainers:N,scrollableAncestors:et,scrollableAncestorRects:er,measuringConfiguration:P,measuringScheduled:H,windowRect:ee};return e},[O,V,z,D,eu,q,$,A,I,L,ef,N,et,er,P,H,ee]);const ex=useMemo(()=>{const e={activatorEvent:D,activators:e_,active:O,activeNodeRect:z,ariaDescribedById:{draggable:M},dispatch:m,draggableNodes:A,over:ef,measureDroppableContainers:N};return e},[D,e_,O,z,m,M,A,ef,N]);return React.createElement(pT.Provider,{value:b},React.createElement(vu.Provider,{value:ex},React.createElement(vd.Provider,{value:ey},React.createElement(vb.Provider,{value:ev},l)),React.createElement(vh,{disabled:(a==null?void 0:a.restoreFocus)===false})),React.createElement(pY,{...a,hiddenTextDescribedById:M}));function ew(){const e=(C==null?void 0:C.autoScrollEnabled)===false;const t=typeof s==="object"?s.enabled===false:s===false;const r=x&&!e&&!t;if(typeof s==="object"){return{...s,enabled:r}}return{enabled:r}}});const vx=/*#__PURE__*//* unused pure expression or super */null&&createContext(null);const vw="button";const vA="Draggable";function vE(e){let{id:t,data:r,disabled:n=false,attributes:i}=e;const o=useUniqueId(vA);const{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=useContext(vu);const{role:p=vw,roleDescription:h="draggable",tabIndex:v=0}=i!=null?i:{};const m=(l==null?void 0:l.id)===t;const g=useContext(m?vb:vx);const[b,_]=useNodeRef();const[y,x]=useNodeRef();const w=h9(a,t);const A=useLatestValue(r);useIsomorphicLayoutEffect(()=>{d.set(t,{id:t,key:o,node:b,activatorNode:y,data:A});return()=>{const e=d.get(t);if(e&&e.key===o){d.delete(t)}}},[d,t]);const E=useMemo(()=>({role:p,tabIndex:v,"aria-disabled":n,"aria-pressed":m&&p===vw?true:undefined,"aria-roledescription":h,"aria-describedby":u.draggable}),[n,p,v,m,h,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:E,isDragging:m,listeners:n?undefined:w,node:b,over:f,setNodeRef:_,setActivatorNodeRef:x,transform:g}}function vI(){return useContext(vd)}const vk="Droppable";const vS=/* unused pure expression or super */null&&{timeout:25};function vO(e){let{data:t,disabled:r=false,id:n,resizeObserverConfig:i}=e;const o=useUniqueId(vk);const{active:a,dispatch:s,over:l,measureDroppableContainers:c}=useContext(vu);const u=useRef({disabled:r});const d=useRef(false);const f=useRef(null);const p=useRef(null);const{disabled:h,updateMeasurementsFor:v,timeout:m}={...vS,...i};const g=useLatestValue(v!=null?v:n);const b=useCallback(()=>{if(!d.current){// ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,
// assuming the element is rendered and displayed.
d.current=true;return}if(p.current!=null){clearTimeout(p.current)}p.current=setTimeout(()=>{c(Array.isArray(g.current)?g.current:[g.current]);p.current=null},m)},[m]);const _=hZ({callback:b,disabled:h||!a});const y=useCallback((e,t)=>{if(!_){return}if(t){_.unobserve(t);d.current=false}if(e){_.observe(e)}},[_]);const[x,w]=useNodeRef(y);const A=useLatestValue(t);useEffect(()=>{if(!_||!x.current){return}_.disconnect();d.current=false;_.observe(x.current)},[x,_]);useEffect(()=>{s({type:pM.RegisterDroppable,element:{id:n,key:o,disabled:r,node:x,rect:f,data:A}});return()=>s({type:pM.UnregisterDroppable,key:o,id:n})},[n]);useEffect(()=>{if(r!==u.current.disabled){s({type:pM.SetDroppableDisabled,id:n,key:o,disabled:r});u.current.disabled=r}},[n,o,r,s]);return{active:a,rect:f,isOver:(l==null?void 0:l.id)===n,node:x,over:l,setNodeRef:w}}function vT(e){let{animation:t,children:r}=e;const[n,i]=useState(null);const[o,a]=useState(null);const s=usePrevious(r);if(!r&&!n&&s){i(s)}useIsomorphicLayoutEffect(()=>{if(!o){return}const e=n==null?void 0:n.key;const r=n==null?void 0:n.props.id;if(e==null||r==null){i(null);return}Promise.resolve(t(r,o)).then(()=>{i(null)})},[t,n,o]);return React.createElement(React.Fragment,null,r,n?cloneElement(n,{ref:a}):null)}const vC=/* unused pure expression or super */null&&{x:0,y:0,scaleX:1,scaleY:1};function vR(e){let{children:t}=e;return React.createElement(vu.Provider,{value:vc},React.createElement(vb.Provider,{value:vC},t))}const vD=/* unused pure expression or super */null&&{position:"fixed",touchAction:"none"};const vF=e=>{const t=isKeyboardEvent(e);return t?"transform 250ms ease":undefined};const vY=/*#__PURE__*//* unused pure expression or super */null&&forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:l,transform:c,transition:u=vF}=e;if(!s){return null}const d=i?c:{...c,scaleX:1,scaleY:1};const f={...vD,width:s.width,height:s.height,top:s.top,left:s.left,transform:CSS.Transform.toString(d),transformOrigin:i&&n?pV(n,s):undefined,transition:typeof u==="function"?u(n):u,...l};return React.createElement(r,{className:a,style:f,ref:t},o)});const vM=e=>t=>{let{active:r,dragOverlay:n}=t;const i={};const{styles:o,className:a}=e;if(o!=null&&o.active){for(const[e,t]of Object.entries(o.active)){if(t===undefined){continue}i[e]=r.node.style.getPropertyValue(e);r.node.style.setProperty(e,t)}}if(o!=null&&o.dragOverlay){for(const[e,t]of Object.entries(o.dragOverlay)){if(t===undefined){continue}n.node.style.setProperty(e,t)}}if(a!=null&&a.active){r.node.classList.add(a.active)}if(a!=null&&a.dragOverlay){n.node.classList.add(a.dragOverlay)}return function e(){for(const[e,t]of Object.entries(i)){r.node.style.setProperty(e,t)}if(a!=null&&a.active){r.node.classList.remove(a.active)}}};const vj=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:pw.Transform.toString(t)},{transform:pw.Transform.toString(r)}]};const vP={duration:250,easing:"ease",keyframes:vj,sideEffects:/*#__PURE__*/vM({styles:{active:{opacity:"0"}}})};function vL(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return useEvent((e,o)=>{if(t===null){return}const a=r.get(e);if(!a){return}const s=a.node.current;if(!s){return}const l=vr(o);if(!l){return}const{transform:c}=getWindow(o).getComputedStyle(o);const u=p6(c);if(!u){return}const d=typeof t==="function"?t:vN(t);hm(s,i.draggable.measure);return d({active:{id:e,data:a.data,node:s,rect:i.draggable.measure(s)},draggableNodes:r,dragOverlay:{node:o,rect:i.dragOverlay.measure(l)},droppableContainers:n,measuringConfiguration:i,transform:u})})}function vN(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...vP,...e};return e=>{let{active:o,dragOverlay:a,transform:s,...l}=e;if(!t){// Do not animate if animation duration is zero.
return}const c={x:a.rect.left-o.rect.left,y:a.rect.top-o.rect.top};const u={scaleX:s.scaleX!==1?o.rect.width*s.scaleX/a.rect.width:1,scaleY:s.scaleY!==1?o.rect.height*s.scaleY/a.rect.height:1};const d={x:s.x-c.x,y:s.y-c.y,...u};const f=i({...l,active:o,dragOverlay:a,transform:{initial:s,final:d}});const[p]=f;const h=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(h)){// The start and end keyframes are the same, infer that there is no animation needed.
return}const v=n==null?void 0:n({active:o,dragOverlay:a,...l});const m=a.node.animate(f,{duration:t,easing:r,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{v==null?void 0:v();e()}})}}let vH=0;function vV(e){return useMemo(()=>{if(e==null){return}vH++;return vH},[e])}const vU=/*#__PURE__*//* unused pure expression or super */null&&React.memo(e=>{let{adjustScale:t=false,children:r,dropAnimation:n,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:c=999}=e;const{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:h,droppableContainers:v,dragOverlay:m,over:g,measuringConfiguration:b,scrollableAncestors:_,scrollableAncestorRects:y,windowRect:x}=vI();const w=useContext(vb);const A=vV(d==null?void 0:d.id);const E=vv(a,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:m.rect,over:g,overlayNodeRect:m.rect,scrollableAncestors:_,scrollableAncestorRects:y,transform:w,windowRect:x});const I=hQ(f);const k=vL({config:n,draggableNodes:h,droppableContainers:v,measuringConfiguration:b});// We need to wait for the active node to be measured before connecting the drag overlay ref
// otherwise collisions can be computed against a mispositioned drag overlay
const S=I?m.setRef:undefined;return React.createElement(vR,null,React.createElement(vT,{animation:k},d&&A?React.createElement(vY,{key:A,id:d.id,ref:S,as:s,activatorEvent:u,adjustScale:t,className:l,transition:o,rect:I,style:{zIndex:c,...i},transform:E},r):null))});//# sourceMappingURL=core.esm.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1__react@18.3.1/node_modules/@dnd-kit/sortable/dist/sortable.esm.js
/**
 * Move an array item to a different position. Returns a new array with the item moved to the new position.
 */function vK(e,t,r){const n=e.slice();n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]);return n}/**
 * Swap an array item to a different position. Returns a new array with the item swapped to the new position.
 */function vB(e,t,r){const n=e.slice();n[t]=e[r];n[r]=e[t];return n}function vz(e,t){return e.reduce((e,r,n)=>{const i=t.get(r);if(i){e[n]=i}return e},Array(e.length))}function vq(e){return e!==null&&e>=0}function vW(e,t){if(e===t){return true}if(e.length!==t.length){return false}for(let r=0;r<e.length;r++){if(e[r]!==t[r]){return false}}return true}function vG(e){if(typeof e==="boolean"){return{draggable:e,droppable:e}}return e}// To-do: We should be calculating scale transformation
const v$=/* unused pure expression or super */null&&{scaleX:1,scaleY:1};const vQ=e=>{var t;let{rects:r,activeNodeRect:n,activeIndex:i,overIndex:o,index:a}=e;const s=(t=r[i])!=null?t:n;if(!s){return null}const l=vX(r,a,i);if(a===i){const e=r[o];if(!e){return null}return{x:i<o?e.left+e.width-(s.left+s.width):e.left-s.left,y:0,...v$}}if(a>i&&a<=o){return{x:-s.width-l,y:0,...v$}}if(a<i&&a>=o){return{x:s.width+l,y:0,...v$}}return{x:0,y:0,...v$}};function vX(e,t,r){const n=e[t];const i=e[t-1];const o=e[t+1];if(!n||!i&&!o){return 0}if(r<t){return i?n.left-(i.left+i.width):o.left-(n.left+n.width)}return o?o.left-(n.left+n.width):n.left-(i.left+i.width)}const vJ=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=vK(t,n,r);const a=t[i];const s=o[i];if(!s||!a){return null}return{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}};const vZ=e=>{let{activeIndex:t,index:r,rects:n,overIndex:i}=e;let o;let a;if(r===t){o=n[r];a=n[i]}if(r===i){o=n[r];a=n[t]}if(!a||!o){return null}return{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}};// To-do: We should be calculating scale transformation
const v0=/* unused pure expression or super */null&&{scaleX:1,scaleY:1};const v1=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:o,overIndex:a}=e;const s=(t=o[r])!=null?t:n;if(!s){return null}if(i===r){const e=o[a];if(!e){return null}return{x:0,y:r<a?e.top+e.height-(s.top+s.height):e.top-s.top,...v0}}const l=v2(o,i,r);if(i>r&&i<=a){return{x:0,y:-s.height-l,...v0}}if(i<r&&i>=a){return{x:0,y:s.height+l,...v0}}return{x:0,y:0,...v0}};function v2(e,t,r){const n=e[t];const i=e[t-1];const o=e[t+1];if(!n){return 0}if(r<t){return i?n.top-(i.top+i.height):o?o.top-(n.top+n.height):0}return o?o.top-(n.top+n.height):i?n.top-(i.top+i.height):0}const v6="Sortable";const v4=/*#__PURE__*//* unused pure expression or super */null&&React.createContext({activeIndex:-1,containerId:v6,disableTransforms:false,items:[],overIndex:-1,useDragOverlay:false,sortedRects:[],strategy:vJ,disabled:{draggable:false,droppable:false}});function v5(e){let{children:t,id:r,items:n,strategy:i=vJ,disabled:o=false}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=useDndContext();const d=useUniqueId(v6,r);const f=Boolean(s.rect!==null);const p=useMemo(()=>n.map(e=>typeof e==="object"&&"id"in e?e.id:e),[n]);const h=a!=null;const v=a?p.indexOf(a.id):-1;const m=c?p.indexOf(c.id):-1;const g=useRef(p);const b=!vW(p,g.current);const _=m!==-1&&v===-1||b;const y=vG(o);useIsomorphicLayoutEffect(()=>{if(b&&h){u(p)}},[b,p,h,u]);useEffect(()=>{g.current=p},[p]);const x=useMemo(()=>({activeIndex:v,containerId:d,disabled:y,disableTransforms:_,items:p,overIndex:m,useDragOverlay:f,sortedRects:vz(p,l),strategy:i}),[v,d,y.draggable,y.droppable,_,p,m,l,f,i]);return React.createElement(v4.Provider,{value:x},t)}const v3=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return vK(r,n,i).indexOf(t)};const v8=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;if(!c||!n){return false}if(s!==o&&i===a){return false}if(r){return true}return a!==i&&t===l};const v9=/* unused pure expression or super */null&&{duration:200,easing:"ease"};const v7="transform";const me=/*#__PURE__*//* unused pure expression or super */null&&CSS.Transition.toString({property:v7,duration:0,easing:"linear"});const mt=/* unused pure expression or super */null&&{roleDescription:"sortable"};/*
 * When the index of an item changes while sorting,
 * we need to temporarily disable the transforms
 */function mr(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=useState(null);const s=useRef(r);useIsomorphicLayoutEffect(()=>{if(!t&&r!==s.current&&n.current){const e=i.current;if(e){const t=getClientRect(n.current,{ignoreTransform:true});const r={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};if(r.x||r.y){a(r)}}}if(r!==s.current){s.current=r}},[t,r,n,i]);useEffect(()=>{if(o){a(null)}},[o]);return o}function mn(e){let{animateLayoutChanges:t=v8,attributes:r,disabled:n,data:i,getNewIndex:o=v3,id:a,strategy:s,resizeObserverConfig:l,transition:c=v9}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:v,overIndex:m,useDragOverlay:g,strategy:b}=useContext(v4);const _=mi(n,p);const y=u.indexOf(a);const x=useMemo(()=>({sortable:{containerId:d,index:y,items:u},...i}),[d,i,y,u]);const w=useMemo(()=>u.slice(u.indexOf(a)),[u,a]);const{rect:A,node:E,isOver:I,setNodeRef:k}=useDroppable({id:a,data:x,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...l}});const{active:S,activatorEvent:O,activeNodeRect:T,attributes:C,setNodeRef:R,listeners:D,isDragging:F,over:Y,setActivatorNodeRef:M,transform:j}=useDraggable({id:a,data:x,attributes:{...mt,...r},disabled:_.draggable});const P=useCombinedRefs(k,R);const L=Boolean(S);const N=L&&!h&&vq(f)&&vq(m);const H=!g&&F;const V=H&&N?j:null;const U=s!=null?s:b;const K=N?V!=null?V:U({rects:v,activeNodeRect:T,activeIndex:f,overIndex:m,index:y}):null;const B=vq(f)&&vq(m)?o({id:a,items:u,activeIndex:f,overIndex:m}):y;const z=S==null?void 0:S.id;const q=useRef({activeId:z,items:u,newIndex:B,containerId:d});const W=u!==q.current.items;const G=t({active:S,containerId:d,isDragging:F,isSorting:L,id:a,index:y,items:u,newIndex:q.current.newIndex,previousItems:q.current.items,previousContainerId:q.current.containerId,transition:c,wasDragging:q.current.activeId!=null});const $=mr({disabled:!G,index:y,node:E,rect:A});useEffect(()=>{if(L&&q.current.newIndex!==B){q.current.newIndex=B}if(d!==q.current.containerId){q.current.containerId=d}if(u!==q.current.items){q.current.items=u}},[L,B,d,u]);useEffect(()=>{if(z===q.current.activeId){return}if(z!=null&&q.current.activeId==null){q.current.activeId=z;return}const e=setTimeout(()=>{q.current.activeId=z},50);return()=>clearTimeout(e)},[z]);return{active:S,activeIndex:f,attributes:C,data:x,rect:A,index:y,newIndex:B,items:u,isOver:I,isSorting:L,isDragging:F,listeners:D,node:E,overIndex:m,over:Y,setNodeRef:P,setActivatorNodeRef:M,setDroppableNodeRef:k,setDraggableNodeRef:R,transform:$!=null?$:K,transition:Q()};function Q(){if($||// Or to prevent items jumping to back to their "new" position when items change
W&&q.current.newIndex===y){return me}if(H&&!isKeyboardEvent(O)||!c){return undefined}if(L||G){return CSS.Transition.toString({...c,property:v7})}return undefined}}function mi(e,t){var r,n;if(typeof e==="boolean"){return{draggable:e,// Backwards compatibility
droppable:false}}return{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function mo(e){if(!e){return false}const t=e.data.current;if(t&&"sortable"in t&&typeof t.sortable==="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable){return true}return false}const ma=[hI.Down,hI.Right,hI.Up,hI.Left];const ms=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(ma.includes(e.code)){e.preventDefault();if(!r||!n){return}const t=[];o.getEnabled().forEach(r=>{if(!r||r!=null&&r.disabled){return}const o=i.get(r.id);if(!o){return}switch(e.code){case KeyboardCode.Down:if(n.top<o.top){t.push(r)}break;case KeyboardCode.Up:if(n.top>o.top){t.push(r)}break;case KeyboardCode.Left:if(n.left>o.left){t.push(r)}break;case KeyboardCode.Right:if(n.left<o.left){t.push(r)}break}});const l=closestCorners({active:r,collisionRect:n,droppableRects:i,droppableContainers:t,pointerCoordinates:null});let c=getFirstCollision(l,"id");if(c===(a==null?void 0:a.id)&&l.length>1){c=l[1].id}if(c!=null){const e=o.get(r.id);const t=o.get(c);const a=t?i.get(t.id):null;const l=t==null?void 0:t.node.current;if(l&&a&&e&&t){const r=getScrollableAncestors(l);const i=r.some((e,t)=>s[t]!==e);const o=ml(e,t);const c=mc(e,t);const u=i||!o?{x:0,y:0}:{x:c?n.width-a.width:0,y:c?n.height-a.height:0};const d={x:a.left,y:a.top};const f=u.x&&u.y?d:subtract(d,u);return f}}}return undefined};function ml(e,t){if(!mo(e)||!mo(t)){return false}return e.data.current.sortable.containerId===t.data.current.sortable.containerId}function mc(e,t){if(!mo(e)||!mo(t)){return false}if(!ml(e,t)){return false}return e.data.current.sortable.index<t.data.current.sortable.index}//# sourceMappingURL=sortable.esm.js.map
;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/Switch.tsx
function mu(){var e=(0,eh._)(["\n        width: 26px;\n        height: 16px;\n      "]);mu=function t(){return e};return e}function md(){var e=(0,eh._)(["\n          top: 2px;\n          left: 3px;\n          width: 12px;\n          height: 12px;\n        "]);md=function t(){return e};return e}function mf(){var e=(0,eh._)(["\n            left: 11px;\n          "]);mf=function t(){return e};return e}function mp(){var e=(0,eh._)(["\n      right: 3px;\n    "]);mp=function t(){return e};return e}function mh(){var e=(0,eh._)(["\n      left: 3px;\n    "]);mh=function t(){return e};return e}var mv={switchStyles:e=>/*#__PURE__*/(0,c/* .css */.AH)("&[data-input]{all:unset;appearance:none;border:0;width:40px;height:24px;background:",ik/* .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,c/* .css */.AH)(mu()),"      &::before{display:none !important;}&:focus{border:none;outline:none;box-shadow:none;}&:focus-visible{outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:after{content:'';position:absolute;top:3px;left:",ik/* .spacing["4"] */.YK["4"],";width:18px;height:18px;background:",ik/* .colorTokens.background.white */.I6.background.white,";border-radius:",ik/* .borderRadius.circle */.Vq.circle,";box-shadow:",ik/* .shadow["switch"] */.r7["switch"],";transition:left 0.25s cubic-bezier(0.785,0.135,0.15,0.86);",e==="small"&&(0,c/* .css */.AH)(md()),"}&:checked{background:",ik/* .colorTokens.primary.main */.I6.primary.main,";&:after{left:18px;",e==="small"&&(0,c/* .css */.AH)(mf()),"}}&:disabled{pointer-events:none;filter:none;opacity:0.5;}}"),labelStyles:e=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",e?ik/* .colorTokens.text.title */.I6.text.title:ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),wrapperStyle:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:fit-content;flex-direction:",e==="left"?"row":"row-reverse",";column-gap:",ik/* .spacing["12"] */.YK["12"],";position:relative;"),spinner:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;position:absolute;top:50%;transform:translateY(-50%);",e&&(0,c/* .css */.AH)(mp())," ",!e&&(0,c/* .css */.AH)(mh()))};var mm=/*#__PURE__*/i().forwardRef((e,r)=>{var{id:n=(0,iV/* .nanoid */.Ak)(),name:i,label:o,value:a,checked:s,disabled:l,loading:c,onChange:u,labelPosition:d="left",labelCss:f,size:p="regular"}=e;var h=e=>{u===null||u===void 0?void 0:u(e.target.checked,e)};return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:mv.wrapperStyle(d),children:[o&&/*#__PURE__*/(0,t/* .jsx */.Y)("label",{css:[mv.labelStyles(s||false),f],htmlFor:n,children:o}),/*#__PURE__*/(0,t/* .jsx */.Y)("input",{ref:r,value:a?String(a):undefined,type:"checkbox",name:i,id:n,checked:!!s,disabled:l,css:mv.switchStyles(p),onChange:h,"data-input":true}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:c,children:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:mv.spinner(!!s),children:/*#__PURE__*/(0,t/* .jsx */.Y)(l1,{size:p==="small"?12:20})})})]})});/* export default */const mg=mm;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/TutorBadge.tsx
var mb={default:{background:ik/* .colorTokens.background.status.drip */.I6.background.status.drip,foreground:ik/* .colorTokens.text.status.primary */.I6.text.status.primary,border:ik/* .colorTokens.stroke.neutral */.I6.stroke.neutral},secondary:{background:ik/* .colorTokens.background.status.cancelled */.I6.background.status.cancelled,foreground:ik/* .colorTokens.text.status.cancelled */.I6.text.status.cancelled,border:ik/* .colorTokens.stroke.status.cancelled */.I6.stroke.status.cancelled},critical:{background:ik/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,foreground:ik/* .colorTokens.text.status.failed */.I6.text.status.failed,border:ik/* .colorTokens.stroke.status.fail */.I6.stroke.status.fail},warning:{background:ik/* .colorTokens.background.status.warning */.I6.background.status.warning,foreground:ik/* .colorTokens.text.status.pending */.I6.text.status.pending,border:ik/* .colorTokens.stroke.status.warning */.I6.stroke.status.warning},success:{background:ik/* .colorTokens.background.status.success */.I6.background.status.success,foreground:ik/* .colorTokens.text.status.completed */.I6.text.status.completed,border:ik/* .colorTokens.stroke.status.success */.I6.stroke.status.success},outline:{background:ik/* .colorTokens.background.white */.I6.background.white,foreground:ik/* .colorTokens.text.status.cancelled */.I6.text.status.cancelled,border:ik/* .colorTokens.stroke.status.cancelled */.I6.stroke.status.cancelled}};var m_=/*#__PURE__*/i().forwardRef((e,r)=>{var{className:n,children:i,variant:o="default"}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{ref:r,className:n,css:my.badge(o),children:i})});m_.displayName="TutorBadge";var my={badge:e=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small("medium"),";display:inline-flex;align-items:center;border-radius:",ik/* .borderRadius["30"] */.Vq["30"],";padding:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["8"] */.YK["8"],";max-height:24px;",aR/* .styleUtils.textEllipsis */.x.textEllipsis,";border:1px solid ",mb[e].border,";background-color:",mb[e].background,";color:",mb[e].foreground,";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/BasicModalWrapper.tsx
function mx(){var e=(0,eh._)(["\n      max-width: 100vw;\n      width: 100vw;\n      height: 95vh;\n    "]);mx=function t(){return e};return e}function mw(){var e=(0,eh._)(["\n      position: absolute;\n      right: ",";\n      top: ",";\n    "]);mw=function t(){return e};return e}function mA(){var e=(0,eh._)(["\n      height: calc(100% - ","px);\n    "]);mA=function t(){return e};return e}var mE=e=>{var{children:r,onClose:n,title:i,subtitle:o,icon:a,entireHeader:s,actions:c,fullScreen:u,modalStyle:d,maxWidth:f=ak/* .modal.BASIC_MODAL_MAX_WIDTH */.yl.BASIC_MODAL_MAX_WIDTH,isCloseAble:p=true,blurTriggerElement:h=true}=e;lA();return/*#__PURE__*/(0,t/* .jsx */.Y)(lp,{blurPrevious:h,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:[mk.container({isFullScreen:u}),d],style:{maxWidth:"".concat(f,"px")},children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:mk.header({hasEntireHeader:!!s}),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!s,fallback:s,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:mk.headerContent,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:mk.iconWithTitle,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:a,children:a}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:i,children:/*#__PURE__*/(0,t/* .jsx */.Y)("p",{css:mk.title,children:i})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:o,children:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:mk.subtitle,children:o})})]})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:mk.actionsWrapper({hasEntireHeader:!!s}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:c,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:p,children:/*#__PURE__*/(0,t/* .jsx */.Y)("button",{"data-cy":"close-modal",type:"button",css:mk.closeButton,onClick:n,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"timesThin",width:24,height:24})})}),children:c})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:mk.content({isFullScreen:u}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(l,{children:r})})]})})};/* export default */const mI=mE;var mk={container:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:relative;background:",ik/* .colorTokens.background.white */.I6.background.white,";box-shadow:",ik/* .shadow.modal */.r7.modal,";border-radius:",ik/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;top:50%;left:50%;transform:translate(-50%,-50%);",t&&(0,c/* .css */.AH)(mx())," ",ik/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;}")},header:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",!t?"".concat(ak/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT,"px"):"auto",";background:",ik/* .colorTokens.background.white */.I6.background.white,";border-bottom:",!t?"1px solid ".concat(ik/* .colorTokens.stroke.divider */.I6.stroke.divider):"none",";padding-inline:",ik/* .spacing["16"] */.YK["16"],";")},headerContent:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center start;display:inline-flex;align-items:center;gap:",ik/* .spacing["12"] */.YK["12"],";"),iconWithTitle:/*#__PURE__*/(0,c/* .css */.AH)("display:inline-flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body("medium"),";color:",ik/* .colorTokens.text.title */.I6.text.title,";"),subtitle:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1)," ",iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";"),actionsWrapper:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("place-self:center end;display:inline-flex;gap:",ik/* .spacing["16"] */.YK["16"],";",t&&(0,c/* .css */.AH)(mw(),ik/* .spacing["16"] */.YK["16"],ik/* .spacing["16"] */.YK["16"]))},closeButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";background:",ik/* .colorTokens.background.white */.I6.background.white,";&:focus,&:active,&:hover{background:",ik/* .colorTokens.background.white */.I6.background.white,";}svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",ik/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",ik/* .shadow.focus */.r7.focus,";}"),content:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("background-color:",ik/* .colorTokens.background.white */.I6.background.white,";overflow-y:auto;max-height:90vh;",t&&(0,c/* .css */.AH)(mA(),ak/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT))}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/ConfirmationModal.tsx
var mS=e=>{var{title:t,description:r,confirmButtonText:n,cancelButtonText:i,confirmButtonVariant:o,closeModal:a,onConfirm:s,isLoading:l=false,icon:c,maxWidth:u=460}=e;return /*#__PURE__*/_jsxs(BasicModalWrapper,{icon:c,onClose:()=>a({action:"CLOSE"}),title:t,maxWidth:u,children:[/*#__PURE__*/_jsx("div",{css:mT.content,children:r!==null&&r!==void 0?r:__("Once you perform this action this can’t be undone.","tutor-pro")}),/*#__PURE__*/_jsxs("div",{css:mT.footerWrapper,children:[/*#__PURE__*/_jsx(Button,{variant:"text",onClick:()=>a({action:"CLOSE"}),size:"small",children:i!==null&&i!==void 0?i:__("Cancel","tutor-pro")}),/*#__PURE__*/_jsx(Button,{variant:o!==null&&o!==void 0?o:"danger",size:"small",loading:l,onClick:()=>{if(s){s()}else{a({action:"CONFIRM"})}},children:n!==null&&n!==void 0?n:__("Delete","tutor-pro")})]})]})};/* export default */const mO=/* unused pure expression or super */null&&mS;var mT={content:/*#__PURE__*/(0,c/* .css */.AH)("font-size:",ik/* .fontSize["14"] */.J["14"],";line-height:",ik/* .lineHeight["20"] */.K_["20"],";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",ik/* .spacing["20"] */.YK["20"],";"),footerWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;justify-content:end;gap:",ik/* .spacing["8"] */.YK["8"],";padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";box-shadow:",ik/* .shadow.dividerTop */.r7.dividerTop,";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/ModalWrapper.tsx
function mC(){var e=(0,eh._)(["\n      max-width: 100vw;\n      width: 100vw;\n      height: 100vh;\n      margin-top: ",";\n    "]);mC=function t(){return e};return e}function mR(){var e=(0,eh._)(["\n      height: calc(100% - ","px);\n    "]);mR=function t(){return e};return e}var mD=e=>{var{children:t,onClose:r,title:n,subtitle:i,icon:o,headerChildren:a,entireHeader:s,actions:l,maxWidth:c=1218,blurTriggerElement:u=true,fullScreen:d=false}=e;useScrollLock();return /*#__PURE__*/_jsx(FocusTrap,{blurPrevious:u,children:/*#__PURE__*/_jsxs("div",{css:mY.container({maxWidth:c,isFullScreen:d}),children:[/*#__PURE__*/_jsx("div",{css:mY.header({hasHeaderChildren:!!a}),children:/*#__PURE__*/_jsx(Show,{when:s,fallback:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("div",{css:mY.headerContent,children:[/*#__PURE__*/_jsxs("div",{css:mY.iconWithTitle,children:[/*#__PURE__*/_jsx(Show,{when:o,children:o}),/*#__PURE__*/_jsx(Show,{when:n,children:/*#__PURE__*/_jsx("h6",{css:mY.title,title:typeof n==="string"?n:"",children:n})})]}),/*#__PURE__*/_jsx(Show,{when:i,children:/*#__PURE__*/_jsx("span",{css:mY.subtitle,children:i})})]}),/*#__PURE__*/_jsx("div",{css:mY.headerChildren,children:/*#__PURE__*/_jsx(Show,{when:a,children:a})}),/*#__PURE__*/_jsx("div",{css:mY.actionsWrapper,children:/*#__PURE__*/_jsx(Show,{when:l,fallback:/*#__PURE__*/_jsx("button",{type:"button",css:mY.closeButton,onClick:r,children:/*#__PURE__*/_jsx(SVGIcon,{name:"times",width:14,height:14})}),children:l})})]}),children:s})}),/*#__PURE__*/_jsx("div",{css:mY.content({isFullScreen:d}),children:/*#__PURE__*/_jsx(ErrorBoundary,{children:t})})]})})};/* export default */const mF=/* unused pure expression or super */null&&mD;var mY={container:e=>{var{maxWidth:t,isFullScreen:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:relative;background:",ik/* .colorTokens.background.white */.I6.background.white,";margin:",ak/* .modal.MARGIN_TOP */.yl.MARGIN_TOP,"px auto ",ik/* .spacing["24"] */.YK["24"],";height:100%;max-width:",t,"px;box-shadow:",ik/* .shadow.modal */.r7.modal,";border-radius:",ik/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;bottom:0;z-index:",ik/* .zIndex.modal */.fE.modal,";width:100%;",r&&(0,c/* .css */.AH)(mC(),ak/* .WP_ADMIN_BAR_HEIGHT */.I4)," ",ik/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;}")},header:e=>{var{hasHeaderChildren:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:",t?"1fr auto 1fr":"1fr auto auto",";gap:",ik/* .spacing["8"] */.YK["8"],";align-items:center;width:100%;height:",ak/* .modal.HEADER_HEIGHT */.yl.HEADER_HEIGHT,"px;background:",ik/* .colorTokens.background.white */.I6.background.white,";border-bottom:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";position:sticky;")},headerContent:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center start;display:inline-flex;align-items:center;gap:",ik/* .spacing["12"] */.YK["12"],";padding-left:",ik/* .spacing["24"] */.YK["24"],";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{padding-left:",ik/* .spacing["16"] */.YK["16"],";}"),headerChildren:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center center;"),iconWithTitle:/*#__PURE__*/(0,c/* .css */.AH)("display:inline-flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";flex-shrink:0;color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.heading6 */.I.heading6("medium"),";color:",ik/* .colorTokens.text.title */.I6.text.title,";text-transform:none;letter-spacing:normal;"),subtitle:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1)," ",iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";padding-left:",ik/* .spacing["12"] */.YK["12"],";border-left:1px solid ",ik/* .colorTokens.icon.hints */.I6.icon.hints,";"),actionsWrapper:/*#__PURE__*/(0,c/* .css */.AH)("place-self:center end;display:inline-flex;gap:",ik/* .spacing["16"] */.YK["16"],";padding-right:",ik/* .spacing["24"] */.YK["24"],";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{padding-right:",ik/* .spacing["16"] */.YK["16"],";}"),closeButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";background:",ik/* .colorTokens.background.white */.I6.background.white,";&:focus,&:active,&:hover{background:",ik/* .colorTokens.background.white */.I6.background.white,";}svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",ik/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",ik/* .shadow.focus */.r7.focus,";}"),content:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("height:calc(100% - ",ak/* .modal.HEADER_HEIGHT */.yl.HEADER_HEIGHT+ak/* .modal.MARGIN_TOP */.yl.MARGIN_TOP,"px);background-color:",ik/* .colorTokens.surface.courseBuilder */.I6.surface.courseBuilder,";overflow-x:hidden;",aR/* .styleUtils.overflowYAuto */.x.overflowYAuto," ",t&&(0,c/* .css */.AH)(mR(),ak/* .modal.HEADER_HEIGHT */.yl.HEADER_HEIGHT))}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/CheckBox.tsx
function mM(){var e=(0,eh._)(["\n      cursor: not-allowed;\n    "]);mM=function t(){return e};return e}function mj(){var e=(0,eh._)(["\n      color: ",";\n    "]);mj=function t(){return e};return e}function mP(){var e=(0,eh._)(["\n        margin-right: ",";\n      "]);mP=function t(){return e};return e}function mL(){var e=(0,eh._)(["\n        background-color: ",";\n      "]);mL=function t(){return e};return e}function mN(){var e=(0,eh._)(["\n      & + span::before {\n        background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='2' fill='none'%3E%3Crect width='10' height='1.5' y='.25' fill='%23fff' rx='.75'/%3E%3C/svg%3E\");\n        background-repeat: no-repeat;\n        background-size: 10px;\n        background-position: center center;\n        background-color: ",";\n        border: 0.5px solid ",";\n      }\n    "]);mN=function t(){return e};return e}function mH(){var e=(0,eh._)(["\n      & + span {\n        cursor: not-allowed;\n\n        &::before {\n          border-color: ",";\n        }\n      }\n    "]);mH=function t(){return e};return e}var mV=/*#__PURE__*/i().forwardRef((e,r)=>{var{id:n=(0,iV/* .nanoid */.Ak)(),name:o,labelCss:a,inputCss:s,label:l="",checked:c,value:u,disabled:d=false,onChange:f,onBlur:p,isIndeterminate:h=false}=e;var v=e=>{f===null||f===void 0?void 0:f(!h?e.target.checked:true,e)};var m=e=>{if(typeof e==="string"){return e}if(typeof e==="number"||typeof e==="boolean"||e===null){return String(e)}if(e===undefined){return""}if(/*#__PURE__*/i().isValidElement(e)){var t;var r=(t=e.props)===null||t===void 0?void 0:t.children;if(typeof r==="string"){return r}if(Array.isArray(r)){return r.map(e=>typeof e==="string"?e:"").filter(Boolean).join(" ")}}return""};return/*#__PURE__*/(0,t/* .jsxs */.FD)("label",{htmlFor:n,css:[mU.container({disabled:d}),a],children:[/*#__PURE__*/(0,t/* .jsx */.Y)("input",(0,ep._)((0,ef._)({},e),{ref:r,id:n,name:o,type:"checkbox",value:u,checked:!!c,disabled:d,"aria-invalid":e["aria-invalid"],onChange:v,onBlur:p,css:[s,mU.checkbox({label:!!l,isIndeterminate:h,disabled:d})]})),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:[mU.label({isDisabled:d}),a],title:m(l),children:l})]})});var mU={container:e=>{var{disabled:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:relative;display:flex;align-items:center;cursor:pointer;user-select:none;color:",ik/* .colorTokens.text.title */.I6.text.title,";",t&&(0,c/* .css */.AH)(mM()))},label:e=>{var{isDisabled:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";",t&&(0,c/* .css */.AH)(mj(),ik/* .colorTokens.text.disable */.I6.text.disable))},checkbox:e=>{var{label:t,isIndeterminate:r,disabled:n}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;display:none !important;opacity:0 !important;height:0;width:0;& + span{position:relative;cursor:pointer;display:inline-flex;align-items:center;",t&&(0,c/* .css */.AH)(mP(),ik/* .spacing["10"] */.YK["10"]),"}& + span::before{content:'';background-color:",ik/* .colorTokens.background.white */.I6.background.white,";border:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:3px;width:20px;height:20px;}&:checked + span::before{background-image:url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0wLjE2NTM0NCA0Ljg5OTQ2QzAuMTEzMjM1IDQuODQ0OTcgMC4wNzE3MzQ2IDQuNzgxMTUgMC4wNDI5ODg3IDQuNzExM0MtMC4wMTQzMjk2IDQuNTU1NjQgLTAuMDE0MzI5NiA0LjM4NDQ5IDAuMDQyOTg4NyA0LjIyODg0QzAuMDcxMTU0OSA0LjE1ODY4IDAuMTEyNzIzIDQuMDk0NzUgMC4xNjUzNDQgNC4wNDA2OEwxLjAzMzgyIDMuMjAzNkMxLjA4NDkzIDMuMTQzNCAxLjE0ODkgMy4wOTU1NyAxLjIyMDk2IDMuMDYzNjlDMS4yOTAzMiAzLjAzMjEzIDEuMzY1NTQgMy4wMTU2OSAxLjQ0MTY3IDMuMDE1NDRDMS41MjQxOCAzLjAxMzgzIDEuNjA2MDUgMy4wMzAyOSAxLjY4MTU5IDMuMDYzNjlDMS43NTYyNiAzLjA5NzA3IDEuODIzODYgMy4xNDQ1NyAxLjg4MDcxIDMuMjAzNkw0LjUwMDU1IDUuODQyNjhMMTAuMTI0MSAwLjE4ODIwNUMxMC4xNzk0IDAuMTI5NTQ0IDEwLjI0NTQgMC4wODIwNTQyIDEwLjMxODQgMC4wNDgyOTA4QzEwLjM5NDEgMC4wMTU0NjYxIDEwLjQ3NTkgLTAuMDAwOTcyMDU3IDEwLjU1ODMgNC40NDIyOGUtMDVDMTAuNjM1NyAwLjAwMDQ3NTMxOCAxMC43MTIxIDAuMDE3NDc5NSAxMC43ODI0IDAuMDQ5OTI0MkMxMC44NTI3IDAuMDgyMzY4OSAxMC45MTU0IDAuMTI5NTA5IDEwLjk2NjIgMC4xODgyMDVMMTEuODM0NyAxLjAzNzM0QzExLjg4NzMgMS4wOTE0MiAxMS45Mjg4IDEuMTU1MzQgMTEuOTU3IDEuMjI1NUMxMi4wMTQzIDEuMzgxMTYgMTIuMDE0MyAxLjU1MjMxIDExLjk1NyAxLjcwNzk2QzExLjkyODMgMS43Nzc4MSAxMS44ODY4IDEuODQxNjMgMTEuODM0NyAxLjg5NjEzTDQuOTIyOCA4LjgwOTgyQzQuODcxMjkgOC44NzAyMSA0LjgwNzQ3IDguOTE4NzUgNC43MzU2NiA4Ljk1MjE1QzQuNTgyMDIgOS4wMTU5NSA0LjQwOTQ5IDkuMDE1OTUgNC4yNTU4NCA4Ljk1MjE1QzQuMTg0MDQgOC45MTg3NSA0LjEyMDIyIDguODcwMjEgNC4wNjg3MSA4LjgwOTgyTDAuMTY1MzQ0IDQuODk5NDZaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');background-repeat:no-repeat;background-size:10px 10px;background-position:center center;border-color:transparent;background-color:",ik/* .colorTokens.icon.brand */.I6.icon.brand,";border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";",n&&(0,c/* .css */.AH)(mL(),ik/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"]),"}",r&&(0,c/* .css */.AH)(mN(),ik/* .colorTokens.brand.blue */.I6.brand.blue,ik/* .colorTokens.stroke.white */.I6.stroke.white)," ",n&&(0,c/* .css */.AH)(mH(),ik/* .colorTokens.stroke.disable */.I6.stroke.disable),"    &:focus-visible{& + span{border-radius:",ik/* .borderRadius["2"] */.Vq["2"],";outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}}")}};/* export default */const mK=mV;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormCheckbox.tsx
var mB=e=>{var{field:t,fieldState:r,disabled:n,value:i,onChange:o,label:a,description:s,helpText:l,isHidden:c,labelCss:u}=e;return /*#__PURE__*/_jsx(FormFieldWrapper,{field:t,fieldState:r,isHidden:c,children:e=>{var{css:r}=e,c=_object_without_properties(e,["css"]);return /*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsxs("div",{css:mq.wrapper,children:[/*#__PURE__*/_jsx(AtomCheckbox,_object_spread_props(_object_spread({},t,c),{inputCss:r,labelCss:u,value:i,disabled:n,checked:t.value,label:a,onChange:()=>{t.onChange(!t.value);if(o){o(!t.value)}}})),l&&/*#__PURE__*/_jsx(Tooltip,{content:l,placement:"top",allowHTML:true,children:/*#__PURE__*/_jsx(SVGIcon,{name:"info",width:20,height:20})})]}),s&&/*#__PURE__*/_jsx("p",{css:mq.description,children:s})]})}})};/* export default */const mz=/* unused pure expression or super */null&&mB;var mq={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["6"] */.YK["6"],";& > div{display:flex;color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),description:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),"    color:",ik/* .colorTokens.text.hints */.I6.text.hints,";padding-left:30px;margin-top:",ik/* .spacing["6"] */.YK["6"],";")};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_async_to_generator.js
function mW(e,t,r,n,i,o,a){try{var s=e[o](a);var l=s.value}catch(e){r(e);return}if(s.done)t(l);else Promise.resolve(l).then(n,i)}function mG(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){mW(o,n,i,a,s,"next",e)}function s(e){mW(o,n,i,a,s,"throw",e)}a(undefined)})}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/react-hook-form@7.67.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs
var m$=e=>e.type==="checkbox";var mQ=e=>e instanceof Date;var mX=e=>e==null;const mJ=e=>typeof e==="object";var mZ=e=>!mX(e)&&!Array.isArray(e)&&mJ(e)&&!mQ(e);var m0=e=>mZ(e)&&e.target?m$(e.target)?e.target.checked:e.target.value:e;var m1=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e;var m2=(e,t)=>e.has(m1(t));var m6=e=>{const t=e.constructor&&e.constructor.prototype;return mZ(t)&&t.hasOwnProperty("isPrototypeOf")};var m4=typeof window!=="undefined"&&typeof window.HTMLElement!=="undefined"&&typeof document!=="undefined";function m5(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(!(m4&&(e instanceof Blob||n))&&(r||mZ(e))){t=r?[]:Object.create(Object.getPrototypeOf(e));if(!r&&!m6(e)){t=e}else{for(const r in e){if(e.hasOwnProperty(r)){t[r]=m5(e[r])}}}}else{return e}return t}var m3=e=>/^\w*$/.test(e);var m8=e=>e===undefined;var m9=e=>Array.isArray(e)?e.filter(Boolean):[];var m7=e=>m9(e.replace(/["|']|\]/g,"").split(/\.|\[/));var ge=(e,t,r)=>{if(!t||!mZ(e)){return r}const n=(m3(t)?[t]:m7(t)).reduce((e,t)=>mX(e)?e:e[t],e);return m8(n)||n===e?m8(e[t])?r:e[t]:n};var gt=e=>typeof e==="boolean";var gr=(e,t,r)=>{let n=-1;const i=m3(t)?[t]:m7(t);const o=i.length;const a=o-1;while(++n<o){const t=i[n];let o=r;if(n!==a){const r=e[t];o=mZ(r)||Array.isArray(r)?r:!isNaN(+i[n+1])?[]:{}}if(t==="__proto__"||t==="constructor"||t==="prototype"){return}e[t]=o;e=e[t]}};const gn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"};const gi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};const go={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};const ga=n.createContext(null);ga.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 gs=()=>n.useContext(ga);/**
 * 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 gl=e=>{const{children:t,...r}=e;return React.createElement(ga.Provider,{value:r},t)};var gc=(e,t,r,n=true)=>{const i={defaultValues:t._defaultValues};for(const o in e){Object.defineProperty(i,o,{get:()=>{const i=o;if(t._proxyFormState[i]!==gi.all){t._proxyFormState[i]=!n||gi.all}r&&(r[i]=true);return e[i]}})}return i};const gu=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 gd(e){const t=gs();const{control:r=t.control,disabled:i,name:o,exact:a}=e||{};const[s,l]=n.useState(r._formState);const c=n.useRef({isDirty:false,isLoading:false,dirtyFields:false,touchedFields:false,validatingFields:false,isValidating:false,isValid:false,errors:false});gu(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:e=>{!i&&l({...r._formState,...e})}}),[o,i,a]);n.useEffect(()=>{c.current.isValid&&r._setValid(true)},[r]);return n.useMemo(()=>gc(s,r,c.current,false),[s,r])}var gf=e=>typeof e==="string";var gp=(e,t,r,n,i)=>{if(gf(e)){n&&t.watch.add(e);return ge(r,e,i)}if(Array.isArray(e)){return e.map(e=>(n&&t.watch.add(e),ge(r,e)))}n&&(t.watchAll=true);return r};var gh=e=>mX(e)||!mJ(e);function gv(e,t,r=new WeakSet){if(gh(e)||gh(t)){return Object.is(e,t)}if(mQ(e)&&mQ(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(mQ(n)&&mQ(e)||mZ(n)&&mZ(e)||Array.isArray(n)&&Array.isArray(e)?!gv(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 gm(e){const t=gs();const{control:r=t.control,name:i,defaultValue:o,disabled:a,exact:s,compute:l}=e||{};const c=n.useRef(o);const u=n.useRef(l);const d=n.useRef(undefined);const f=n.useRef(r);const p=n.useRef(i);u.current=l;const[h,v]=n.useState(()=>{const e=r._getWatch(i,c.current);return u.current?u.current(e):e});const m=n.useCallback(e=>{const t=gp(i,r._names,e||r._formValues,false,c.current);return u.current?u.current(t):t},[r._formValues,r._names,i]);const g=n.useCallback(e=>{if(!a){const t=gp(i,r._names,e||r._formValues,false,c.current);if(u.current){const e=u.current(t);if(!gv(e,d.current)){v(e);d.current=e}}else{v(t)}}},[r._formValues,r._names,a,i]);gu(()=>{if(f.current!==r||!gv(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 _=p.current;// Cache the computed output to avoid duplicate calls within the same render
// We include shouldReturnImmediate in deps to ensure proper recomputation
const y=n.useMemo(()=>{if(a){return null}const e=!b&&!gv(_,i);const t=b||e;return t?m():null},[a,b,i,_,m]);return y!==null?y: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 gg(e){const t=gs();const{name:r,disabled:i,control:o=t.control,shouldUnregister:a,defaultValue:s,exact:l=true}=e;const c=m2(o._names.array,r);const u=n.useMemo(()=>ge(o._formValues,r,ge(o._defaultValues,r,s)),[o,r,s]);const d=gm({control:o,name:r,defaultValue:u,exact:l});const f=gd({control:o,name:r,exact:l});const p=n.useRef(e);const h=n.useRef(undefined);const v=n.useRef(o.register(r,{...e.rules,value:d,...gt(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=n.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:true,get:()=>!!ge(f.errors,r)},isDirty:{enumerable:true,get:()=>!!ge(f.dirtyFields,r)},isTouched:{enumerable:true,get:()=>!!ge(f.touchedFields,r)},isValidating:{enumerable:true,get:()=>!!ge(f.validatingFields,r)},error:{enumerable:true,get:()=>ge(f.errors,r)}}),[f,r]);const g=n.useCallback(e=>v.current.onChange({target:{value:m0(e),name:r},type:gn.CHANGE}),[r]);const b=n.useCallback(()=>v.current.onBlur({target:{value:ge(o._formValues,r),name:r},type:gn.BLUR}),[r,o._formValues]);const _=n.useCallback(e=>{const t=ge(o._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()}}},[o._fields,r]);const y=n.useMemo(()=>({name:r,value:d,...gt(i)||f.disabled?{disabled:f.disabled||i}:{},onChange:g,onBlur:b,ref:_}),[r,i,f.disabled,g,b,_,d]);n.useEffect(()=>{const e=o._options.shouldUnregister||a;const t=h.current;if(t&&t!==r&&!c){o.unregister(t)}o.register(r,{...p.current.rules,...gt(p.current.disabled)?{disabled:p.current.disabled}:{}});const n=(e,t)=>{const r=ge(o._fields,e);if(r&&r._f){r._f.mount=t}};n(r,true);if(e){const e=m5(ge(o._options.defaultValues,r,p.current.defaultValue));gr(o._defaultValues,r,e);if(m8(ge(o._formValues,r))){gr(o._formValues,r,e)}}!c&&o.register(r);h.current=r;return()=>{(c?e&&!o._state.action:e)?o.unregister(r):n(r,false)}},[r,o,c,a]);n.useEffect(()=>{o._setDisabledField({disabled:i,name:r})},[i,r,o]);return n.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}/**
 * 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 gb=e=>e.render(gg(e));const g_=e=>{const t={};for(const r of Object.keys(e)){if(mJ(e[r])&&e[r]!==null){const n=g_(e[r]);for(const e of Object.keys(n)){t[`${r}.${e}`]=n[e]}}else{t[r]=e[r]}}return t};const gy="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 gx(e){const t=gs();const[r,n]=React.useState(false);const{control:i=t.control,onSubmit:o,children:a,action:s,method:l=gy,headers:c,encType:u,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 a=new FormData;let f="";try{f=JSON.stringify(e)}catch(e){}const v=g_(i._formValues);for(const e in v){a.append(e,v[e])}if(o){await o({data:e,event:t,method:l,formData:a,formDataJson:f})}if(s){try{const e=[c&&c["Content-Type"],u].some(e=>e&&e.includes("json"));const t=await fetch(String(s),{method:l,headers:{...c,...u&&u!=="multipart/form-data"?{"Content-Type":u}:{}},body:e?f:a});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:l,encType:u,onSubmit:m,...v},a)}var gw=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||true}}:{};var gA=e=>Array.isArray(e)?e:[e];var gE=()=>{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 gI(e,t){const r={};for(const n in e){if(e.hasOwnProperty(n)){const i=e[n];const o=t[n];if(i&&mZ(i)&&o){const e=gI(i,o);if(mZ(e)){r[n]=e}}else if(e[n]){r[n]=o}}}return r}var gk=e=>mZ(e)&&!Object.keys(e).length;var gS=e=>e.type==="file";var gO=e=>typeof e==="function";var gT=e=>{if(!m4){return false}const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)};var gC=e=>e.type===`select-multiple`;var gR=e=>e.type==="radio";var gD=e=>gR(e)||m$(e);var gF=e=>gT(e)&&e.isConnected;function gY(e,t){const r=t.slice(0,-1).length;let n=0;while(n<r){e=m8(e)?n++:e[t[n++]]}return e}function gM(e){for(const t in e){if(e.hasOwnProperty(t)&&!m8(e[t])){return false}}return true}function gj(e,t){const r=Array.isArray(t)?t:m3(t)?[t]:m7(t);const n=r.length===1?e:gY(e,r);const i=r.length-1;const o=r[i];if(n){delete n[o]}if(i!==0&&(mZ(n)&&gk(n)||Array.isArray(n)&&gM(n))){gj(e,r.slice(0,-1))}return e}var gP=e=>{for(const t in e){if(gO(e[t])){return true}}return false};function gL(e){return Array.isArray(e)||mZ(e)&&!gP(e)}function gN(e,t={}){for(const r in e){const n=e[r];if(gL(n)){t[r]=Array.isArray(n)?[]:{};gN(n,t[r])}else if(!m8(n)){t[r]=true}}return t}function gH(e,t,r){if(!r){r=gN(t)}for(const n in e){const i=e[n];if(gL(i)){if(m8(t)||gh(r[n])){r[n]=gN(i,Array.isArray(i)?[]:{})}else{gH(i,mX(t)?{}:t[n],r[n])}}else{const e=t[n];r[n]=!gv(i,e)}}return r}const gV={value:false,isValid:false};const gU={value:true,isValid:true};var gK=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&&!m8(e[0].attributes.value)?m8(e[0].value)||e[0].value===""?gU:{value:e[0].value,isValid:true}:gU:gV}return gV};var gB=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>m8(e)?e:t?e===""?NaN:e?+e:e:r&&gf(e)?new Date(e):n?n(e):e;const gz={isValid:false,value:null};var gq=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:true,value:t.value}:e,gz):gz;function gW(e){const t=e.ref;if(gS(t)){return t.files}if(gR(t)){return gq(e.refs).value}if(gC(t)){return[...t.selectedOptions].map(({value:e})=>e)}if(m$(t)){return gK(e.refs).value}return gB(m8(t.value)?e.ref.value:t.value,e)}var gG=(e,t,r,n)=>{const i={};for(const r of e){const e=ge(t,r);e&&gr(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}};var g$=e=>e instanceof RegExp;var gQ=e=>m8(e)?e:g$(e)?e.source:mZ(e)?g$(e.value)?e.value.source:e.value:e;var gX=e=>({isOnSubmit:!e||e===gi.onSubmit,isOnBlur:e===gi.onBlur,isOnChange:e===gi.onChange,isOnAll:e===gi.all,isOnTouch:e===gi.onTouched});const gJ="AsyncFunction";var gZ=e=>!!e&&!!e.validate&&!!(gO(e.validate)&&e.validate.constructor.name===gJ||mZ(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===gJ));var g0=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);var g1=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const g2=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=ge(e,i);if(r){const{_f:e,...o}=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(g2(o,t)){break}}}else if(mZ(o)){if(g2(o,t)){break}}}}return};function g6(e,t,r){const n=ge(e,r);if(n||m3(r)){return{error:n,name:r}}const i=r.split(".");while(i.length){const n=i.join(".");const o=ge(t,n);const a=ge(e,n);if(o&&!Array.isArray(o)&&r!==n){return{name:r}}if(a&&a.type){return{name:n,error:a}}if(a&&a.root&&a.root.type){return{name:`${n}.root`,error:a.root}}i.pop()}return{name:r}}var g4=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return gk(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!n||gi.all))};var g5=(e,t,r)=>!e||!t||e===t||gA(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));var g3=(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 g8=(e,t)=>!m9(ge(e,t)).length&&gj(e,t);var g9=(e,t,r)=>{const n=gA(ge(e,r));gr(n,"root",t[r]);gr(e,r,n);return e};function g7(e,t,r="validate"){if(gf(e)||Array.isArray(e)&&e.every(gf)||gt(e)&&!e){return{type:r,message:gf(e)?e:"",ref:t}}}var be=e=>mZ(e)&&!g$(e)?e:{value:e,message:""};var bt=async(e,t,r,n,i,o)=>{const{ref:a,refs:s,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:p,validate:h,name:v,valueAsNumber:m,mount:g}=e._f;const b=ge(r,v);if(!g||t.has(v)){return{}}const _=s?s[0]:a;const y=e=>{if(i&&_.reportValidity){_.setCustomValidity(gt(e)?"":e||"");_.reportValidity()}};const x={};const w=gR(a);const A=m$(a);const E=w||A;const I=(m||gS(a))&&m8(a.value)&&m8(b)||gT(a)&&a.value===""||b===""||Array.isArray(b)&&!b.length;const k=gw.bind(null,v,n,x);const S=(e,t,r,n=go.maxLength,i=go.minLength)=>{const o=e?t:r;x[v]={type:e?n:i,message:o,ref:a,...k(e?n:i,o)}};if(o?!Array.isArray(b)||!b.length:l&&(!E&&(I||mX(b))||gt(b)&&!b||A&&!gK(s).isValid||w&&!gq(s).isValid)){const{value:e,message:t}=gf(l)?{value:!!l,message:l}:be(l);if(e){x[v]={type:go.required,message:t,ref:_,...k(go.required,t)};if(!n){y(t);return x}}}if(!I&&(!mX(d)||!mX(f))){let e;let t;const r=be(f);const i=be(d);if(!mX(b)&&!isNaN(b)){const n=a.valueAsNumber||(b?+b:b);if(!mX(r.value)){e=n>r.value}if(!mX(i.value)){t=n<i.value}}else{const n=a.valueAsDate||new Date(b);const o=e=>new Date(new Date().toDateString()+" "+e);const s=a.type=="time";const l=a.type=="week";if(gf(r.value)&&b){e=s?o(b)>o(r.value):l?b>r.value:n>new Date(r.value)}if(gf(i.value)&&b){t=s?o(b)<o(i.value):l?b<i.value:n<new Date(i.value)}}if(e||t){S(!!e,r.message,i.message,go.max,go.min);if(!n){y(x[v].message);return x}}}if((c||u)&&!I&&(gf(b)||o&&Array.isArray(b))){const e=be(c);const t=be(u);const r=!mX(e.value)&&b.length>+e.value;const i=!mX(t.value)&&b.length<+t.value;if(r||i){S(r,e.message,t.message);if(!n){y(x[v].message);return x}}}if(p&&!I&&gf(b)){const{value:e,message:t}=be(p);if(g$(e)&&!b.match(e)){x[v]={type:go.pattern,message:t,ref:a,...k(go.pattern,t)};if(!n){y(t);return x}}}if(h){if(gO(h)){const e=await h(b,r);const t=g7(e,_);if(t){x[v]={...t,...k(go.validate,t.message)};if(!n){y(t.message);return x}}}else if(mZ(h)){let e={};for(const t in h){if(!gk(e)&&!n){break}const i=g7(await h[t](b,r),_,t);if(i){e={...i,...k(t,i.message)};y(i.message);if(n){x[v]=e}}}if(!gk(e)){x[v]={ref:_,...e};if(!n){return x}}}}y(true);return x};const br={mode:gi.onSubmit,reValidateMode:gi.onChange,shouldFocusError:true};function bn(e={}){let t={...br,...e};let r={submitCount:0,isDirty:false,isReady:false,isLoading:gO(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 i=mZ(t.defaultValues)||mZ(t.values)?m5(t.defaultValues||t.values)||{}:{};let o=t.shouldUnregister?{}:m5(i);let a={action:false,mount:false,watch:false};let s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set};let l;let c=0;const u={isDirty:false,dirtyFields:false,validatingFields:false,touchedFields:false,isValidating:false,isValid:false,errors:false};let d={...u};const f={array:gE(),state:gE()};const p=t.criteriaMode===gi.all;const h=e=>t=>{clearTimeout(c);c=setTimeout(e,t)};const v=async e=>{if(!t.disabled&&(u.isValid||d.isValid||e)){const e=t.resolver?gk((await A()).errors):await I(n,true);if(e!==r.isValid){f.state.next({isValid:e})}}};const m=(e,n)=>{if(!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)){(e||Array.from(s.mount)).forEach(e=>{if(e){n?gr(r.validatingFields,e,n):gj(r.validatingFields,e)}});f.state.next({validatingFields:r.validatingFields,isValidating:!gk(r.validatingFields)})}};const g=(e,s=[],l,c,p=true,h=true)=>{if(c&&l&&!t.disabled){a.action=true;if(h&&Array.isArray(ge(n,e))){const t=l(ge(n,e),c.argA,c.argB);p&&gr(n,e,t)}if(h&&Array.isArray(ge(r.errors,e))){const t=l(ge(r.errors,e),c.argA,c.argB);p&&gr(r.errors,e,t);g8(r.errors,e)}if((u.touchedFields||d.touchedFields)&&h&&Array.isArray(ge(r.touchedFields,e))){const t=l(ge(r.touchedFields,e),c.argA,c.argB);p&&gr(r.touchedFields,e,t)}if(u.dirtyFields||d.dirtyFields){r.dirtyFields=gH(i,o)}f.state.next({name:e,isDirty:S(e,s),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else{gr(o,e,s)}};const b=(e,t)=>{gr(r.errors,e,t);f.state.next({errors:r.errors})};const _=e=>{r.errors=e;f.state.next({errors:r.errors,isValid:false})};const y=(e,t,r,s)=>{const l=ge(n,e);if(l){const n=ge(o,e,m8(r)?ge(i,e):r);m8(n)||s&&s.defaultChecked||t?gr(o,e,t?n:gW(l._f)):C(e,n);a.mount&&!a.action&&v()}};const x=(e,n,o,a,s)=>{let l=false;let c=false;const p={name:e};if(!t.disabled){if(!o||a){if(u.isDirty||d.isDirty){c=r.isDirty;r.isDirty=p.isDirty=S();l=c!==p.isDirty}const t=gv(ge(i,e),n);c=!!ge(r.dirtyFields,e);t?gj(r.dirtyFields,e):gr(r.dirtyFields,e,true);p.dirtyFields=r.dirtyFields;l=l||(u.dirtyFields||d.dirtyFields)&&c!==!t}if(o){const t=ge(r.touchedFields,e);if(!t){gr(r.touchedFields,e,o);p.touchedFields=r.touchedFields;l=l||(u.touchedFields||d.touchedFields)&&t!==o}}l&&s&&f.state.next(p)}return l?p:{}};const w=(e,n,i,o)=>{const a=ge(r.errors,e);const s=(u.isValid||d.isValid)&&gt(n)&&r.isValid!==n;if(t.delayError&&i){l=h(()=>b(e,i));l(t.delayError)}else{clearTimeout(c);l=null;i?gr(r.errors,e,i):gj(r.errors,e)}if((i?!gv(a,i):a)||!gk(o)||s){const t={...o,...s&&gt(n)?{isValid:n}:{},errors:r.errors,name:e};r={...r,...t};f.state.next(t)}};const A=async e=>{m(e,true);const r=await t.resolver(o,t.context,gG(e||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));m(e);return r};const E=async e=>{const{errors:t}=await A(e);if(e){for(const n of e){const e=ge(t,n);e?gr(r.errors,n,e):gj(r.errors,n)}}else{r.errors=t}return t};const I=async(e,n,i={valid:true})=>{for(const a in e){const l=e[a];if(l){const{_f:e,...a}=l;if(e){const a=s.array.has(e.name);const c=l._f&&gZ(l._f);if(c&&u.validatingFields){m([e.name],true)}const d=await bt(l,s.disabled,o,p,t.shouldUseNativeValidation&&!n,a);if(c&&u.validatingFields){m([e.name])}if(d[e.name]){i.valid=false;if(n){break}}!n&&(ge(d,e.name)?a?g9(r.errors,d,e.name):gr(r.errors,e.name,d[e.name]):gj(r.errors,e.name))}!gk(a)&&await I(a,n,i)}}return i.valid};const k=()=>{for(const e of s.unMount){const t=ge(n,e);t&&(t._f.refs?t._f.refs.every(e=>!gF(e)):!gF(t._f.ref))&&K(e)}s.unMount=new Set};const S=(e,r)=>!t.disabled&&(e&&r&&gr(o,e,r),!gv(j(),i));const O=(e,t,r)=>gp(e,s,{...a.mount?o:m8(t)?i:gf(e)?{[e]:t}:t},r,t);const T=e=>m9(ge(a.mount?o:i,e,t.shouldUnregister?ge(i,e,[]):[]));const C=(e,t,r={})=>{const i=ge(n,e);let a=t;if(i){const r=i._f;if(r){!r.disabled&&gr(o,e,gB(t,r));a=gT(r.ref)&&mX(t)?"":t;if(gC(r.ref)){[...r.ref.options].forEach(e=>e.selected=a.includes(e.value))}else if(r.refs){if(m$(r.ref)){r.refs.forEach(e=>{if(!e.defaultChecked||!e.disabled){if(Array.isArray(a)){e.checked=!!a.find(t=>t===e.value)}else{e.checked=a===e.value||!!a}}})}else{r.refs.forEach(e=>e.checked=e.value===a)}}else if(gS(r.ref)){r.ref.value=""}else{r.ref.value=a;if(!r.ref.type){f.state.next({name:e,values:m5(o)})}}}}(r.shouldDirty||r.shouldTouch)&&x(e,a,r.shouldTouch,r.shouldDirty,true);r.shouldValidate&&M(e)};const R=(e,t,r)=>{for(const i in t){if(!t.hasOwnProperty(i)){return}const o=t[i];const a=e+"."+i;const l=ge(n,a);(s.array.has(e)||mZ(o)||l&&!l._f)&&!mQ(o)?R(a,o,r):C(a,o,r)}};const D=(e,t,l={})=>{const c=ge(n,e);const p=s.array.has(e);const h=m5(t);gr(o,e,h);if(p){f.array.next({name:e,values:m5(o)});if((u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&l.shouldDirty){f.state.next({name:e,dirtyFields:gH(i,o),isDirty:S(e,h)})}}else{c&&!c._f&&!mX(h)?R(e,h,l):C(e,h,l)}g1(e,s)&&f.state.next({...r,name:e});f.state.next({name:a.mount?e:undefined,values:m5(o)})};const F=async e=>{a.mount=true;const i=e.target;let c=i.name;let h=true;const g=ge(n,c);const b=e=>{h=Number.isNaN(e)||mQ(e)&&isNaN(e.getTime())||gv(e,ge(o,c,e))};const _=gX(t.mode);const y=gX(t.reValidateMode);if(g){let a;let E;const k=i.type?gW(g._f):m0(e);const S=e.type===gn.BLUR||e.type===gn.FOCUS_OUT;const O=!g0(g._f)&&!t.resolver&&!ge(r.errors,c)&&!g._f.deps||g3(S,ge(r.touchedFields,c),r.isSubmitted,y,_);const T=g1(c,s,S);gr(o,c,k);if(S){if(!i||!i.readOnly){g._f.onBlur&&g._f.onBlur(e);l&&l(0)}}else if(g._f.onChange){g._f.onChange(e)}const C=x(c,k,S);const R=!gk(C)||T;!S&&f.state.next({name:c,type:e.type,values:m5(o)});if(O){if(u.isValid||d.isValid){if(t.mode==="onBlur"){if(S){v()}}else if(!S){v()}}return R&&f.state.next({name:c,...T?{}:C})}!S&&T&&f.state.next({...r});if(t.resolver){const{errors:e}=await A([c]);b(k);if(h){const t=g6(r.errors,n,c);const i=g6(e,n,t.name||c);a=i.error;c=i.name;E=gk(e)}}else{m([c],true);a=(await bt(g,s.disabled,o,p,t.shouldUseNativeValidation))[c];m([c]);b(k);if(h){if(a){E=false}else if(u.isValid||d.isValid){E=await I(n,true)}}}if(h){g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&M(g._f.deps);w(c,E,a,C)}}};const Y=(e,t)=>{if(ge(r.errors,t)&&e.focus){e.focus();return 1}return};const M=async(e,i={})=>{let o;let a;const l=gA(e);if(t.resolver){const t=await E(m8(e)?e:l);o=gk(t);a=e?!l.some(e=>ge(t,e)):o}else if(e){a=(await Promise.all(l.map(async e=>{const t=ge(n,e);return await I(t&&t._f?{[e]:t}:t)}))).every(Boolean);!(!a&&!r.isValid)&&v()}else{a=o=await I(n)}f.state.next({...!gf(e)||(u.isValid||d.isValid)&&o!==r.isValid?{}:{name:e},...t.resolver||!e?{isValid:o}:{},errors:r.errors});i.shouldFocus&&!a&&g2(n,Y,e?l:s.mount);return a};const j=(e,t)=>{let n={...a.mount?o:i};if(t){n=gI(t.dirtyFields?r.dirtyFields:r.touchedFields,n)}return m8(e)?n:gf(e)?ge(n,e):e.map(e=>ge(n,e))};const P=(e,t)=>({invalid:!!ge((t||r).errors,e),isDirty:!!ge((t||r).dirtyFields,e),error:ge((t||r).errors,e),isValidating:!!ge(r.validatingFields,e),isTouched:!!ge((t||r).touchedFields,e)});const L=e=>{e&&gA(e).forEach(e=>gj(r.errors,e));f.state.next({errors:e?r.errors:{}})};const N=(e,t,i)=>{const o=(ge(n,e,{_f:{}})._f||{}).ref;const a=ge(r.errors,e)||{};// Don't override existing error messages elsewhere in the object tree.
const{ref:s,message:l,type:c,...u}=a;gr(r.errors,e,{...u,...t,ref:o});f.state.next({name:e,errors:r.errors,isValid:false});i&&i.shouldFocus&&o&&o.focus&&o.focus()};const H=(e,t)=>gO(e)?f.state.subscribe({next:r=>"values"in r&&e(O(undefined,t),r)}):O(e,t,true);const V=e=>f.state.subscribe({next:t=>{if(g5(e.name,t.name,e.exact)&&g4(t,e.formState||u,Z,e.reRenderRoot)){e.callback({values:{...o},...r,...t,defaultValues:i})}}}).unsubscribe;const U=e=>{a.mount=true;d={...d,...e.formState};return V({...e,formState:d})};const K=(e,a={})=>{for(const l of e?gA(e):s.mount){s.mount.delete(l);s.array.delete(l);if(!a.keepValue){gj(n,l);gj(o,l)}!a.keepError&&gj(r.errors,l);!a.keepDirty&&gj(r.dirtyFields,l);!a.keepTouched&&gj(r.touchedFields,l);!a.keepIsValidating&&gj(r.validatingFields,l);!t.shouldUnregister&&!a.keepDefaultValue&&gj(i,l)}f.state.next({values:m5(o)});f.state.next({...r,...!a.keepDirty?{}:{isDirty:S()}});!a.keepIsValid&&v()};const B=({disabled:e,name:t})=>{if(gt(e)&&a.mount||!!e||s.disabled.has(t)){e?s.disabled.add(t):s.disabled.delete(t)}};const z=(e,r={})=>{let o=ge(n,e);const l=gt(r.disabled)||gt(t.disabled);gr(n,e,{...o||{},_f:{...o&&o._f?o._f:{ref:{name:e}},name:e,mount:true,...r}});s.mount.add(e);if(o){B({disabled:gt(r.disabled)?r.disabled:t.disabled,name:e})}else{y(e,true,r.value)}return{...l?{disabled:r.disabled||t.disabled}:{},...t.progressive?{required:!!r.required,min:gQ(r.min),max:gQ(r.max),minLength:gQ(r.minLength),maxLength:gQ(r.maxLength),pattern:gQ(r.pattern)}:{},name:e,onChange:F,onBlur:F,ref:l=>{if(l){z(e,r);o=ge(n,e);const t=m8(l.value)?l.querySelectorAll?l.querySelectorAll("input,select,textarea")[0]||l:l:l;const a=gD(t);const s=o._f.refs||[];if(a?s.find(e=>e===t):t===o._f.ref){return}gr(n,e,{_f:{...o._f,...a?{refs:[...s.filter(gF),t,...Array.isArray(ge(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}});y(e,false,undefined,t)}else{o=ge(n,e,{});if(o._f){o._f.mount=false}(t.shouldUnregister||r.shouldUnregister)&&!(m2(s.array,e)&&a.action)&&s.unMount.add(e)}}}};const q=()=>t.shouldFocusError&&g2(n,Y,s.mount);const W=e=>{if(gt(e)){f.state.next({disabled:e});g2(n,(t,r)=>{const i=ge(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 G=(e,i)=>async a=>{let l=undefined;if(a){a.preventDefault&&a.preventDefault();a.persist&&a.persist()}let c=m5(o);f.state.next({isSubmitting:true});if(t.resolver){const{errors:e,values:t}=await A();r.errors=e;c=m5(t)}else{await I(n)}if(s.disabled.size){for(const e of s.disabled){gj(c,e)}}gj(r.errors,"root");if(gk(r.errors)){f.state.next({errors:{}});try{await e(c,a)}catch(e){l=e}}else{if(i){await i({...r.errors},a)}q();setTimeout(q)}f.state.next({isSubmitted:true,isSubmitting:false,isSubmitSuccessful:gk(r.errors)&&!l,submitCount:r.submitCount+1,errors:r.errors});if(l){throw l}};const $=(e,t={})=>{if(ge(n,e)){if(m8(t.defaultValue)){D(e,m5(ge(i,e)))}else{D(e,t.defaultValue);gr(i,e,m5(t.defaultValue))}if(!t.keepTouched){gj(r.touchedFields,e)}if(!t.keepDirty){gj(r.dirtyFields,e);r.isDirty=t.defaultValue?S(e,m5(ge(i,e))):S()}if(!t.keepError){gj(r.errors,e);u.isValid&&v()}f.state.next({...r})}};const Q=(e,l={})=>{const c=e?m5(e):i;const d=m5(c);const p=gk(e);const h=p?i:d;if(!l.keepDefaultValues){i=c}if(!l.keepValues){if(l.keepDirtyValues){const e=new Set([...s.mount,...Object.keys(gH(i,o))]);for(const t of Array.from(e)){ge(r.dirtyFields,t)?gr(h,t,ge(o,t)):D(t,ge(h,t))}}else{if(m4&&m8(e)){for(const e of s.mount){const t=ge(n,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(gT(e)){const t=e.closest("form");if(t){t.reset();break}}}}}if(l.keepFieldsRef){for(const e of s.mount){D(e,ge(h,e))}}else{n={}}}o=t.shouldUnregister?l.keepDefaultValues?m5(i):{}:m5(h);f.array.next({values:{...h}});f.state.next({values:{...h}})}s={mount:l.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:false,focus:""};a.mount=!u.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!t.shouldUnregister&&!gk(h);a.watch=!!t.shouldUnregister;f.state.next({submitCount:l.keepSubmitCount?r.submitCount:0,isDirty:p?false:l.keepDirty?r.isDirty:!!(l.keepDefaultValues&&!gv(e,i)),isSubmitted:l.keepIsSubmitted?r.isSubmitted:false,dirtyFields:p?{}:l.keepDirtyValues?l.keepDefaultValues&&o?gH(i,o):r.dirtyFields:l.keepDefaultValues&&e?gH(i,e):l.keepDirty?r.dirtyFields:{},touchedFields:l.keepTouched?r.touchedFields:{},errors:l.keepErrors?r.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?r.isSubmitSuccessful:false,isSubmitting:false,defaultValues:i})};const X=(e,t)=>Q(gO(e)?e(o):e,t);const J=(e,t={})=>{const r=ge(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&&gO(e.select)&&e.select()}}};const Z=e=>{r={...r,...e}};const ee=()=>gO(t.defaultValues)&&t.defaultValues().then(e=>{X(e,t.resetOptions);f.state.next({isLoading:false})});const et={control:{register:z,unregister:K,getFieldState:P,handleSubmit:G,setError:N,_subscribe:V,_runSchema:A,_focusError:q,_getWatch:O,_getDirty:S,_setValid:v,_setFieldArray:g,_setDisabledField:B,_setErrors:_,_getFieldArray:T,_reset:Q,_resetDefaultValues:ee,_removeUnmounted:k,_disableForm:W,_subjects:f,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return a},set _state(value){a=value},get _defaultValues(){return i},get _names(){return s},set _names(value){s=value},get _formState(){return r},get _options(){return t},set _options(value){t={...t,...value}}},subscribe:U,trigger:M,register:z,handleSubmit:G,watch:H,setValue:D,getValues:j,reset:X,resetField:$,clearErrors:L,unregister:K,setError:N,setFocus:J,getFieldState:P};return{...et,formControl:et}}var bi=()=>{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 bo=(e,t,r={})=>r.shouldFocus||m8(r.shouldFocus)?r.focusName||`${e}.${m8(r.focusIndex)?t:r.focusIndex}.`:"";var ba=(e,t)=>[...e,...gA(t)];var bs=e=>Array.isArray(e)?e.map(()=>undefined):undefined;function bl(e,t,r){return[...e.slice(0,t),...gA(r),...e.slice(t)]}var bc=(e,t,r)=>{if(!Array.isArray(e)){return[]}if(m8(e[r])){e[r]=undefined}e.splice(r,0,e.splice(t,1)[0]);return e};var bu=(e,t)=>[...gA(t),...gA(e)];function bd(e,t){let r=0;const n=[...e];for(const e of t){n.splice(e-r,1);r++}return m9(n).length?n:[]}var bf=(e,t)=>m8(t)?[]:bd(e,gA(t).sort((e,t)=>e-t));var bp=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};var bh=(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 bv(e){const t=gs();const{control:r=t.control,name:n,keyName:i="id",shouldUnregister:o,rules:a}=e;const[s,l]=React.useState(r._getFieldArray(n));const c=React.useRef(r._getFieldArray(n).map(bi));const u=React.useRef(false);r._names.array.add(n);React.useMemo(()=>a&&s.length>=0&&r.register(n,a),[r,n,s.length,a]);gu(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===n||!t){const t=ge(e,n);if(Array.isArray(t)){l(t);c.current=t.map(bi)}}}}).unsubscribe,[r,n]);const d=React.useCallback(e=>{u.current=true;r._setFieldArray(n,e)},[r,n]);const f=(e,t)=>{const i=gA(m5(e));const o=ba(r._getFieldArray(n),i);r._names.focus=bo(n,o.length-1,t);c.current=ba(c.current,i.map(bi));d(o);l(o);r._setFieldArray(n,o,ba,{argA:bs(e)})};const p=(e,t)=>{const i=gA(m5(e));const o=bu(r._getFieldArray(n),i);r._names.focus=bo(n,0,t);c.current=bu(c.current,i.map(bi));d(o);l(o);r._setFieldArray(n,o,bu,{argA:bs(e)})};const h=e=>{const t=bf(r._getFieldArray(n),e);c.current=bf(c.current,e);d(t);l(t);!Array.isArray(ge(r._fields,n))&&gr(r._fields,n,undefined);r._setFieldArray(n,t,bf,{argA:e})};const v=(e,t,i)=>{const o=gA(m5(t));const a=bl(r._getFieldArray(n),e,o);r._names.focus=bo(n,e,i);c.current=bl(c.current,e,o.map(bi));d(a);l(a);r._setFieldArray(n,a,bl,{argA:e,argB:bs(t)})};const m=(e,t)=>{const i=r._getFieldArray(n);bp(i,e,t);bp(c.current,e,t);d(i);l(i);r._setFieldArray(n,i,bp,{argA:e,argB:t},false)};const g=(e,t)=>{const i=r._getFieldArray(n);bc(i,e,t);bc(c.current,e,t);d(i);l(i);r._setFieldArray(n,i,bc,{argA:e,argB:t},false)};const b=(e,t)=>{const i=m5(t);const o=bh(r._getFieldArray(n),e,i);c.current=[...o].map((t,r)=>!t||r===e?bi():c.current[r]);d(o);l([...o]);r._setFieldArray(n,o,bh,{argA:e,argB:i},true,false)};const _=e=>{const t=gA(m5(e));c.current=t.map(bi);d([...t]);l([...t]);r._setFieldArray(n,[...t],e=>e,{},true,false)};React.useEffect(()=>{r._state.action=false;g1(n,r._names)&&r._subjects.state.next({...r._formState});if(u.current&&(!gX(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!gX(r._options.reValidateMode).isOnSubmit){if(r._options.resolver){r._runSchema([n]).then(e=>{const t=ge(e.errors,n);const i=ge(r._formState.errors,n);if(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type){t?gr(r._formState.errors,n,t):gj(r._formState.errors,n);r._subjects.state.next({errors:r._formState.errors})}})}else{const e=ge(r._fields,n);if(e&&e._f&&!(gX(r._options.reValidateMode).isOnSubmit&&gX(r._options.mode).isOnSubmit)){bt(e,r._names.disabled,r._formValues,r._options.criteriaMode===gi.all,r._options.shouldUseNativeValidation,true).then(e=>!gk(e)&&r._subjects.state.next({errors:g9(r._formState.errors,e,n)}))}}}r._subjects.state.next({name:n,values:m5(r._formValues)});r._names.focus&&g2(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();u.current=false},[s,n,r]);React.useEffect(()=>{!ge(r._formValues,n)&&r._setFieldArray(n);return()=>{const e=(e,t)=>{const n=ge(r._fields,e);if(n&&n._f){n._f.mount=t}};r._options.shouldUnregister||o?r.unregister(n):e(n,false)}},[n,r,i,o]);return{swap:React.useCallback(m,[d,n,r]),move:React.useCallback(g,[d,n,r]),prepend:React.useCallback(p,[d,n,r]),append:React.useCallback(f,[d,n,r]),remove:React.useCallback(h,[d,n,r]),insert:React.useCallback(v,[d,n,r]),update:React.useCallback(b,[d,n,r]),replace:React.useCallback(_,[d,n,r]),fields:React.useMemo(()=>s.map((e,t)=>({...e,[i]:c.current[t]||bi()})),[s,i])}}/**
 * 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 bm(e={}){const t=n.useRef(undefined);const r=n.useRef(undefined);const[i,o]=n.useState({isDirty:false,isValidating:false,isLoading:gO(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:gO(e.defaultValues)?undefined:e.defaultValues});if(!t.current){if(e.formControl){t.current={...e.formControl,formState:i};if(e.defaultValues&&!gO(e.defaultValues)){e.formControl.reset(e.defaultValues,e.resetOptions)}}else{const{formControl:r,...n}=bn(e);t.current={...n,formState:i}}}const a=t.current.control;a._options=e;gu(()=>{const e=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:true});o(e=>({...e,isReady:true}));a._formState.isReady=true;return e},[a]);n.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]);n.useEffect(()=>{if(e.mode){a._options.mode=e.mode}if(e.reValidateMode){a._options.reValidateMode=e.reValidateMode}},[a,e.mode,e.reValidateMode]);n.useEffect(()=>{if(e.errors){a._setErrors(e.errors);a._focusError()}},[a,e.errors]);n.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]);n.useEffect(()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();if(e!==i.isDirty){a._subjects.state.next({isDirty:e})}}},[a,i.isDirty]);n.useEffect(()=>{var t;if(e.values&&!gv(e.values,r.current)){a._reset(e.values,{keepFieldsRef:true,...a._options.resetOptions});if(!((t=a._options.resetOptions)===null||t===void 0?void 0:t.keepIsValid)){a._setValid()}r.current=e.values;o(e=>({...e}))}else{a._resetDefaultValues()}},[a,e.values]);n.useEffect(()=>{if(!a._state.mount){a._setValid();a._state.mount=true}if(a._state.watch){a._state.watch=false;a._subjects.state.next({...a._formState})}a._removeUnmounted()});t.current.formState=gc(i,a);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 bg=({control:e,names:t,render:r})=>r(gm({control:e,name:t}));//# sourceMappingURL=index.esm.mjs.map
// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/utils/create-variation.ts
var bb=r(7367);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/MagicButton.tsx
var b_=/*#__PURE__*/i().forwardRef((e,r)=>{var{className:n,variant:i,size:o,children:a,type:s="button",disabled:l=false,roundedFull:c=true,loading:u}=e,d=(0,iO._)(e,["className","variant","size","children","type","disabled","roundedFull","loading"]);return/*#__PURE__*/(0,t/* .jsx */.Y)("button",(0,ep._)((0,ef._)({type:s,ref:r,css:bw({variant:i,size:o,rounded:c?"true":"false"}),className:n,disabled:l},d),{children:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:bx.buttonSpan,children:u?/*#__PURE__*/(0,t/* .jsx */.Y)(l1,{size:24}):a})}))});/* export default */const by=b_;var bx={buttonSpan:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.flexCenter */.x.flexCenter(),";z-index:",ik/* .zIndex.positive */.fE.positive,";"),base:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",iS/* .typography.small */.I.small("medium"),";display:flex;gap:",ik/* .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 ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:disabled{cursor:not-allowed;background:",ik/* .colorTokens.action.primary.disable */.I6.action.primary.disable,";pointer-events:none;color:",ik/* .colorTokens.text.disable */.I6.text.disable,";border-color:",ik/* .colorTokens.stroke.disable */.I6.stroke.disable,";}"),default:e=>/*#__PURE__*/(0,c/* .css */.AH)("background:",!e?ik/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1:ik/* .colorTokens.ai.gradient_1_rtl */.I6.ai.gradient_1_rtl,";color:",ik/* .colorTokens.text.white */.I6.text.white,";&::before{content:'';position:absolute;inset:0;background:",!e?ik/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2:ik/* .colorTokens.ai.gradient_2_rtl */.I6.ai.gradient_2_rtl,";opacity:0;transition:opacity 0.5s ease;}&:hover::before{opacity:1;}"),secondary:/*#__PURE__*/(0,c/* .css */.AH)("background-color:",ik/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";color:",ik/* .colorTokens.text.brand */.I6.text.brand,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";&:hover{background-color:",ik/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";}"),outline:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;&::before{content:'';position:absolute;inset:0;background:",ik/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1,";color:",ik/* .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:",ik/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2,";}}"),primaryOutline:/*#__PURE__*/(0,c/* .css */.AH)("border:1px solid ",ik/* .colorTokens.brand.blue */.I6.brand.blue,";color:",ik/* .colorTokens.brand.blue */.I6.brand.blue,";&:hover{background-color:",ik/* .colorTokens.brand.blue */.I6.brand.blue,";color:",ik/* .colorTokens.text.white */.I6.text.white,";}"),primary:/*#__PURE__*/(0,c/* .css */.AH)("background-color:",ik/* .colorTokens.brand.blue */.I6.brand.blue,";color:",ik/* .colorTokens.text.white */.I6.text.white,";"),ghost:/*#__PURE__*/(0,c/* .css */.AH)("background-color:transparent;color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";&:hover{color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}"),plain:/*#__PURE__*/(0,c/* .css */.AH)("span{background:",!ak/* .isRTL */.V8?ik/* .colorTokens.text.ai.gradient */.I6.text.ai.gradient:ik/* .colorTokens.ai.gradient_1_rtl */.I6.ai.gradient_1_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;&:hover{background:",!ak/* .isRTL */.V8?ik/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2:ik/* .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,c/* .css */.AH)("height:32px;padding-inline:",ik/* .spacing["12"] */.YK["12"],";padding-block:",ik/* .spacing["4"] */.YK["4"],";"),sm:/*#__PURE__*/(0,c/* .css */.AH)("height:24px;padding-inline:",ik/* .spacing["10"] */.YK["10"],";"),icon:/*#__PURE__*/(0,c/* .css */.AH)("width:32px;height:32px;")},rounded:{true:/*#__PURE__*/(0,c/* .css */.AH)("border-radius:",ik/* .borderRadius["54"] */.Vq["54"],";&::before{border-radius:",ik/* .borderRadius["54"] */.Vq["54"],";}"),false:/*#__PURE__*/(0,c/* .css */.AH)("border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";&::before{border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";}")}};var bw=(0,bb/* .createVariation */.s)({variants:{variant:{default:bx.default(ak/* .isRTL */.V8),primary:bx.primary,secondary:bx.secondary,outline:bx.outline,primary_outline:bx.primaryOutline,ghost:bx.ghost,plain:bx.plain},size:{default:bx.size.default,sm:bx.size.sm,icon:bx.size.icon},rounded:{true:bx.rounded.true,false:bx.rounded.false}},defaultVariants:{variant:"default",size:"default",rounded:"true"}},bx.base);// EXTERNAL MODULE: ../tutor/assets/src/js/v3/shared/config/config.ts
var bA=r(4336);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useVisibilityControl.tsx
/**
 * 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 bE=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,iH/* .isDefined */.O9)(e)){return true}var[r,n]=(e===null||e===void 0?void 0:e.split("."))||[];if(!(0,iH/* .isDefined */.O9)(r)||!(0,iH/* .isDefined */.O9)(n)){return true}var i=bA/* .tutorConfig */.P===null||bA/* .tutorConfig */.P===void 0?void 0:(t=bA/* .tutorConfig.visibility_control */.P.visibility_control)===null||t===void 0?void 0:t[r];if(!i){return true}var o=bA/* .tutorConfig.current_user.roles */.P.current_user.roles;var a=o.includes("administrator")?"admin":"instructor";var s="".concat(n,"_").concat(a);if(!Object.keys(i).includes(s)){return true}return i[s]==="on"},[e])};/* export default */const bI=bE;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hoc/withVisibilityControl.tsx
var bk=e=>{return r=>{var{visibilityKey:n}=r,i=(0,iO._)(r,["visibilityKey"]);var o=bI(n);if(!o){return null}// @ts-ignore
return/*#__PURE__*/(0,t/* .jsx */.Y)(e,(0,ef._)({},i))}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormTextareaInput.tsx
function bS(){var e=(0,eh._)(["\n        resize: vertical;\n      "]);bS=function t(){return e};return e}var bO=6;var bT=e=>{var{label:r,rows:i=bO,columns:o,maxLimit:a,field:s,fieldState:l,disabled:c,readOnly:u,loading:d,placeholder:f,helpText:p,onChange:h,onKeyDown:v,isHidden:m,enableResize:g=true,isSecondary:b=false,isMagicAi:_=false,inputCss:y,maxHeight:x,autoResize:w=false}=e;var A;var E=(A=s.value)!==null&&A!==void 0?A:"";var I=(0,n.useRef)(null);var k=undefined;if(a){k={maxLimit:a,inputCharacter:E.toString().length}}var S=()=>{if(I.current){if(x){I.current.style.maxHeight="".concat(x,"px")}I.current.style.height="auto";I.current.style.height="".concat(I.current.scrollHeight,"px")}};(0,n.useLayoutEffect)(()=>{if(w){S()}// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{label:r,field:s,fieldState:l,disabled:c,readOnly:u,loading:d,placeholder:f,helpText:p,isHidden:m,characterCount:k,isSecondary:b,isMagicAi:_,children:e=>{return/*#__PURE__*/(0,t/* .jsx */.Y)(t/* .Fragment */.FK,{children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:bR.container(g,y),children:/*#__PURE__*/(0,t/* .jsx */.Y)("textarea",(0,ep._)((0,ef._)({},s,e),{ref:e=>{s.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:x?"".concat(x,"px"):"none"},className:"tutor-input-field",value:E,onChange:e=>{var{value:t}=e.target;if(a&&t.trim().length>a){return}s.onChange(t);if(h){h(t)}if(w){S()}},onKeyDown:e=>{v===null||v===void 0?void 0:v(e.key)},autoComplete:"off",rows:i,cols:o}))})})}})};/* export default */const bC=bk(bT);var bR={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,c/* .css */.AH)("position:relative;display:flex;textarea{",iS/* .typography.body */.I.body(),";height:auto;padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["12"] */.YK["12"],";resize:none;",aR/* .styleUtils.overflowYAuto */.x.overflowYAuto,";&.tutor-input-field{",t,";}",e&&(0,c/* .css */.AH)(bS()),"}")}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/controls/For.tsx
var bD=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 bF=bD;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/magic-ai-content/OptionList.tsx
var bY=e=>{var{options:r,onChange:n}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:bM.wrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(bF,{each:r,children:(e,r)=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("button",{type:"button",onClick:()=>n(e.value),css:bM.item,children:e.label},r)}})})};var bM={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;padding-block:",ik/* .spacing["8"] */.YK["8"],";max-height:400px;overflow-y:auto;"),item:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",iS/* .typography.caption */.I.caption(),";width:100%;padding:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["16"] */.YK["16"],";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";display:flex;align-items:center;&:hover{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";color:",ik/* .colorTokens.text.title */.I6.text.title,";}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/config/magic-ai.ts
var bj=[{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 bP=[{label:(0,lo.__)("Formal","tutor-pro"),value:"formal"},{label:(0,lo.__)("Casual","tutor-pro"),value:"casual"},{label:(0,lo.__)("Professional","tutor-pro"),value:"professional"},{label:(0,lo.__)("Enthusiastic","tutor-pro"),value:"enthusiastic"},{label:(0,lo.__)("Informational","tutor-pro"),value:"informational"},{label:(0,lo.__)("Funny","tutor-pro"),value:"funny"}];var bL=[{label:(0,lo.__)("Title","tutor-pro"),value:"title"},{label:(0,lo.__)("Essay","tutor-pro"),value:"essay"},{label:(0,lo.__)("Paragraph","tutor-pro"),value:"paragraph"},{label:(0,lo.__)("Outline","tutor-pro"),value:"outline"}];// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/magic-ai-content/PromptControls.tsx
var bN=e=>{var{form:r}=e;return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:bH.wrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{control:r.control,name:"characters",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(wG,(0,ep._)((0,ef._)({},e),{isMagicAi:true,label:(0,lo.__)("Character Limit","tutor-pro"),type:"number"}))}),/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{control:r.control,name:"language",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(f5,(0,ep._)((0,ef._)({},e),{isMagicAi:true,label:(0,lo.__)("Language","tutor-pro"),options:bj}))}),/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{control:r.control,name:"tone",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(f5,(0,ep._)((0,ef._)({},e),{isMagicAi:true,options:bP,label:(0,lo.__)("Tone","tutor-pro")}))}),/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{control:r.control,name:"format",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(f5,(0,ep._)((0,ef._)({},e),{isMagicAi:true,label:(0,lo.__)("Format","tutor-pro"),options:bL}))})]})};var bH={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:repeat(2,1fr);gap:",ik/* .spacing["16"] */.YK["16"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/Skeleton.tsx
function bV(){var e=(0,eh._)(["\n      border-radius: ",";\n    "]);bV=function t(){return e};return e}function bU(){var e=(0,eh._)(["\n          background: linear-gradient(89.17deg, #fef4ff 0.2%, #f9d3ff 50.09%, #fef4ff 96.31%);\n        "]);bU=function t(){return e};return e}function bK(){var e=(0,eh._)(["\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    "]);bK=function t(){return e};return e}var bB=/*#__PURE__*/(0,n.forwardRef)((e,r)=>{var{width:n="100%",height:i=16,animation:o=false,isMagicAi:a=false,isRound:s=false,animationDuration:l=1.6,className:c}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)("span",{ref:r,css:bW.skeleton(n,i,o,a,s,l),className:c})});/* export default */const bz=bB;var bq={wave:/*#__PURE__*/(0,c/* .keyframes */.i7)("0%{transform:translateX(-100%);}50%{transform:translateX(0%);}100%{transform:translateX(100%);}")};var bW={skeleton:(e,t,r,n,i,o)=>/*#__PURE__*/(0,c/* .css */.AH)("display:block;width:",(0,iH/* .isNumber */.Et)(e)?"".concat(e,"px"):e,";height:",(0,iH/* .isNumber */.Et)(t)?"".concat(t,"px"):t,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";background-color:",!n?"rgba(0, 0, 0, 0.11)":ik/* .colorTokens.background.magicAi.skeleton */.I6.background.magicAi.skeleton,";position:relative;-webkit-mask-image:-webkit-radial-gradient(center,white,black);overflow:hidden;",i&&(0,c/* .css */.AH)(bV(),ik/* .borderRadius.circle */.Vq.circle)," ",r&&(0,c/* .css */.AH)(bK(),n&&(0,c/* .css */.AH)(bU()),o,bq.wave))};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/magic-ai-content/SkeletonLoader.tsx
var bG=()=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:bQ.container,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:bQ.wrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"20%",height:"12px"}),/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"40%",height:"12px"})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:bQ.wrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"80%",height:"12px"}),/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,isMagicAi:true,width:"80%",height:"12px"})]})]})};/* export default */const b$=bG;var bQ={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",ik/* .spacing["8"] */.YK["8"],";"),container:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",ik/* .spacing["32"] */.YK["32"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useFormWithGlobalError.ts
var bX=e=>{var[t,r]=(0,n.useState)();var i=bm(e);return(0,ep._)((0,ef._)({},i),{submitError:t,setSubmitError:r})};// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
// src/mutationObserver.ts
var bJ=class extends j{#E;#I=void 0;#k;#S;constructor(e,t){super();this.#E=e;this.setOptions(t);this.bindMethods();this.#O()}bindMethods(){this.mutate=this.mutate.bind(this);this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#E.defaultMutationOptions(e);if(!A(this.options,t)){this.#E.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#k,observer:this})}if(t?.mutationKey&&this.options.mutationKey&&y(t.mutationKey)!==y(this.options.mutationKey)){this.reset()}else if(this.#k?.state.status==="pending"){this.#k.setOptions(this.options)}}onUnsubscribe(){if(!this.hasListeners()){this.#k?.removeObserver(this)}}onMutationUpdate(e){this.#O();this.#T(e)}getCurrentResult(){return this.#I}reset(){this.#k?.removeObserver(this);this.#k=void 0;this.#O();this.#T()}mutate(e,t){this.#S=t;this.#k?.removeObserver(this);this.#k=this.#E.getMutationCache().build(this.#E,this.options);this.#k.addObserver(this);return this.#k.execute(e)}#O(){const e=this.#k?.state??Z();this.#I={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#T(e){M.batch(()=>{if(this.#S&&this.hasListeners()){const t=this.#I.variables;const r=this.#I.context;if(e?.type==="success"){this.#S.onSuccess?.(e.data,t,r);this.#S.onSettled?.(e.data,null,t,r)}else if(e?.type==="error"){this.#S.onError?.(e.error,t,r);this.#S.onSettled?.(void 0,e.error,t,r)}}this.listeners.forEach(e=>{e(this.#I)})})}};//# sourceMappingURL=mutationObserver.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/utils.js
// src/utils.ts
function bZ(e,t){if(typeof e==="function"){return e(...t)}return!!e}function b0(){}//# sourceMappingURL=utils.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/useMutation.js
"use client";// src/useMutation.ts
function b1(e,t){const r=eu(t);const[i]=n.useState(()=>new bJ(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);const o=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(M.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult());const a=n.useCallback((e,t)=>{i.mutate(e,t).catch(b0)},[i]);if(o.error&&bZ(i.options.throwOnError,[o.error])){throw o.error}return{...o,mutate:a,mutateAsync:o.mutate}}//# sourceMappingURL=useMutation.js.map
;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/bind.js
/**
 * 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 b2(e,t){return function r(){return e.apply(t,arguments)}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/utils.js
// utils is a library of generic helper functions non-specific to axios
const{toString:b6}=Object.prototype;const{getPrototypeOf:b4}=Object;const{iterator:b5,toStringTag:b3}=Symbol;const b8=(e=>t=>{const r=b6.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));const b9=e=>{e=e.toLowerCase();return t=>b8(t)===e};const b7=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:_e}=Array;/**
 * Determine if a value is undefined
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if the value is undefined, otherwise false
 */const _t=b7("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 _r(e){return e!==null&&!_t(e)&&e.constructor!==null&&!_t(e.constructor)&&_a(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 _n=b9("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 _i(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&_n(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 _o=b7("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 _a=b7("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 _s=b7("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 _l=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 _c=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 _u=e=>{if(b8(e)!=="object"){return false}const t=b4(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(b3 in e)&&!(b5 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 _d=e=>{// Early return for non-objects or Buffers to prevent RangeError
if(!_l(e)||_r(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 _f=b9("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 _p=b9("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 _h=b9("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 _v=b9("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 _m=e=>_l(e)&&_a(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 _g=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||_a(e.append)&&((t=b8(e))==="formdata"||// detect form-data instance
t==="object"&&_a(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 _b=b9("URLSearchParams");const[_y,_x,_w,_A]=["ReadableStream","Request","Response","Headers"].map(b9);/**
 * 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 _E=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 *
 * @param {Boolean} [allOwnKeys = false]
 * @returns {any}
 */function _I(e,t,{allOwnKeys:r=false}={}){// Don't bother if no value provided
if(e===null||typeof e==="undefined"){return}let n;let i;// Force an array if not already something iterable
if(typeof e!=="object"){/*eslint no-param-reassign:0*/e=[e]}if(_e(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(_r(e)){return}// Iterate over object keys
const i=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=i.length;let a;for(n=0;n<o;n++){a=i[n];t.call(null,e[a],a,e)}}}function _k(e,t){if(_r(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 _S=(()=>{/*eslint no-undef:0*/if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const _O=e=>!_t(e)&&e!==_S;/**
 * 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 _T(){const{caseless:e,skipUndefined:t}=_O(this)&&this||{};const r={};const n=(n,i)=>{const o=e&&_k(r,i)||i;if(_u(r[o])&&_u(n)){r[o]=_T(r[o],n)}else if(_u(n)){r[o]=_T({},n)}else if(_e(n)){r[o]=n.slice()}else if(!t||!_t(n)){r[o]=n}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&_I(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 _C=(e,t,r,{allOwnKeys:n}={})=>{_I(t,(t,n)=>{if(r&&_a(t)){e[n]=b2(t,r)}else{e[n]=t}},{allOwnKeys:n});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 _R=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 _D=(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 _F=(e,t,r,n)=>{let i;let o;let a;const s={};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){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&b4(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 _Y=(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 _M=e=>{if(!e)return null;if(_e(e))return e;let t=e.length;if(!_s(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 _j=(e=>{// eslint-disable-next-line func-names
return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&b4(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 _P=(e,t)=>{const r=e&&e[b5];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 _L=(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 _N=b9("HTMLFormElement");const _H=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 _V=(({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 _U=b9("RegExp");const _K=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};_I(r,(r,i)=>{let o;if((o=t(r,i,e))!==false){n[i]=o||r}});Object.defineProperties(e,n)};/**
 * Makes all methods read-only
 * @param {Object} obj
 */const _B=e=>{_K(e,(t,r)=>{// skip restricted props in strict mode
if(_a(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!_a(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 _z=(e,t)=>{const r={};const n=e=>{e.forEach(e=>{r[e]=true})};_e(e)?n(e):n(String(e).split(t));return r};const _q=()=>{};const _W=(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 _G(e){return!!(e&&_a(e.append)&&e[b3]==="FormData"&&e[b5])}const _$=e=>{const t=new Array(10);const r=(e,n)=>{if(_l(e)){if(t.indexOf(e)>=0){return}//Buffer check
if(_r(e)){return e}if(!("toJSON"in e)){t[n]=e;const i=_e(e)?[]:{};_I(e,(e,t)=>{const o=r(e,n+1);!_t(o)&&(i[t]=o)});t[n]=undefined;return i}}return e};return r(e,0)};const _Q=b9("AsyncFunction");const _X=e=>e&&(_l(e)||_a(e))&&_a(e.then)&&_a(e.catch);// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
const _J=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{_S.addEventListener("message",({source:r,data:n})=>{if(r===_S&&n===e){t.length&&t.shift()()}},false);return r=>{t.push(r);_S.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",_a(_S.postMessage));const _Z=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(_S):typeof process!=="undefined"&&process.nextTick||_J;// *********************
const _0=e=>e!=null&&_a(e[b5]);/* export default */const _1={isArray:_e,isArrayBuffer:_n,isBuffer:_r,isFormData:_g,isArrayBufferView:_i,isString:_o,isNumber:_s,isBoolean:_c,isObject:_l,isPlainObject:_u,isEmptyObject:_d,isReadableStream:_y,isRequest:_x,isResponse:_w,isHeaders:_A,isUndefined:_t,isDate:_f,isFile:_p,isBlob:_h,isRegExp:_U,isFunction:_a,isStream:_m,isURLSearchParams:_b,isTypedArray:_j,isFileList:_v,forEach:_I,merge:_T,extend:_C,trim:_E,stripBOM:_R,inherits:_D,toFlatObject:_F,kindOf:b8,kindOfTest:b9,endsWith:_Y,toArray:_M,forEachEntry:_P,matchAll:_L,isHTMLForm:_N,hasOwnProperty:_V,hasOwnProp:_V,reduceDescriptors:_K,freezeMethods:_B,toObjectSet:_z,toCamelCase:_H,noop:_q,toFiniteNumber:_W,findKey:_k,global:_S,isContextDefined:_O,isSpecCompliantForm:_G,toJSONObject:_$,isAsyncFn:_Q,isThenable:_X,setImmediate:_J,asap:_Z,isIterable:_0};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/AxiosError.js
/**
 * 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 _2(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}}_1.inherits(_2,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:_1.toJSONObject(this.config),code:this.code,status:this.status}}});const _6=_2.prototype;const _4={};["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=>{_4[e]={value:e}});Object.defineProperties(_2,_4);Object.defineProperty(_6,"isAxiosError",{value:true});// eslint-disable-next-line func-names
_2.from=(e,t,r,n,i,o)=>{const a=Object.create(_6);_1.toFlatObject(e,a,function e(e){return e!==Error.prototype},e=>{return e!=="isAxiosError"});const s=e&&e.message?e.message:"Error";// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
const l=t==null&&e?e.code:t;_2.call(a,s,l,r,n,i);// Chain the original error on the standard field; non-enumerable to avoid JSON noise
if(e&&a.cause==null){Object.defineProperty(a,"cause",{value:e,configurable:true})}a.name=e&&e.name||"Error";o&&Object.assign(a,o);return a};/* export default */const _5=_2;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/null.js
// eslint-disable-next-line strict
/* export default */const _3=null;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/toFormData.js
// 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 _8(e){return _1.isPlainObject(e)||_1.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 _9(e){return _1.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 _7(e,t,r){if(!e)return t;return e.concat(t).map(function e(e,t){// eslint-disable-next-line no-param-reassign
e=_9(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 ye(e){return _1.isArray(e)&&!e.some(_8)}const yt=_1.toFlatObject(_1,{},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 yr(e,t,r){if(!_1.isObject(e)){throw new TypeError("target must be an object")}// eslint-disable-next-line no-param-reassign
t=t||new(_3||FormData);// eslint-disable-next-line no-param-reassign
r=_1.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,function e(e,t){// eslint-disable-next-line no-eq-null,eqeqeq
return!_1.isUndefined(t[e])});const n=r.metaTokens;// eslint-disable-next-line no-use-before-define
const i=r.visitor||u;const o=r.dots;const a=r.indexes;const s=r.Blob||typeof Blob!=="undefined"&&Blob;const l=s&&_1.isSpecCompliantForm(t);if(!_1.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(_1.isDate(e)){return e.toISOString()}if(_1.isBoolean(e)){return e.toString()}if(!l&&_1.isBlob(e)){throw new _5("Blob is not supported. Use a Buffer instead.")}if(_1.isArrayBuffer(e)||_1.isTypedArray(e)){return l&&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 u(e,r,i){let s=e;if(e&&!i&&typeof e==="object"){if(_1.endsWith(r,"{}")){// eslint-disable-next-line no-param-reassign
r=n?r:r.slice(0,-2);// eslint-disable-next-line no-param-reassign
e=JSON.stringify(e)}else if(_1.isArray(e)&&ye(e)||(_1.isFileList(e)||_1.endsWith(r,"[]"))&&(s=_1.toArray(e))){// eslint-disable-next-line no-param-reassign
r=_9(r);s.forEach(function e(e,n){!(_1.isUndefined(e)||e===null)&&t.append(// eslint-disable-next-line no-nested-ternary
a===true?_7([r],n,o):a===null?r:r+"[]",c(e))});return false}}if(_8(e)){return true}t.append(_7(i,r,o),c(e));return false}const d=[];const f=Object.assign(yt,{defaultVisitor:u,convertValue:c,isVisitable:_8});function p(e,r){if(_1.isUndefined(e))return;if(d.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}d.push(e);_1.forEach(e,function e(e,n){const o=!(_1.isUndefined(e)||e===null)&&i.call(t,e,_1.isString(n)?n.trim():n,r,f);if(o===true){p(e,r?r.concat(n):[n])}});d.pop()}if(!_1.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}/* export default */const yn=yr;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
/**
 * 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 yi(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 yo(e,t){this._pairs=[];e&&yn(e,this,t)}const ya=yo.prototype;ya.append=function e(e,t){this._pairs.push([e,t])};ya.toString=function e(e){const t=e?function(t){return e.call(this,t,yi)}:yi;return this._pairs.map(function e(e){return t(e[0])+"="+t(e[1])},"").join("&")};/* export default */const ys=yo;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/buildURL.js
/**
 * 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 yl(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 yc(e,t,r){/*eslint no-param-reassign:0*/if(!t){return e}const n=r&&r.encode||yl;if(_1.isFunction(r)){r={serialize:r}}const i=r&&r.serialize;let o;if(i){o=i(t,r)}else{o=_1.isURLSearchParams(t)?t.toString():new ys(t,r).toString(n)}if(o){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/InterceptorManager.js
class yu{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){_1.forEach(this.handlers,function t(t){if(t!==null){e(t)}})}}/* export default */const yd=yu;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/defaults/transitional.js
/* export default */const yf={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
/* export default */const yp=typeof URLSearchParams!=="undefined"?URLSearchParams:ys;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/browser/classes/FormData.js
/* export default */const yh=typeof FormData!=="undefined"?FormData:null;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/browser/classes/Blob.js
/* export default */const yv=typeof Blob!=="undefined"?Blob:null;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/browser/index.js
/* export default */const ym={isBrowser:true,classes:{URLSearchParams:yp,FormData:yh,Blob:yv},protocols:["http","https","file","blob","url","data"]};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/common/utils.js
const yg=typeof window!=="undefined"&&typeof document!=="undefined";const yb=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 y_=yg&&(!yb||["ReactNative","NativeScript","NS"].indexOf(yb.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 yy=(()=>{return typeof WorkerGlobalScope!=="undefined"&&// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();const yx=yg&&window.location.href||"http://localhost";// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/platform/index.js
/* export default */const yw={...e,...ym};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
function yA(e,t){return yn(e,new yw.classes.URLSearchParams,{visitor:function(e,t,r,n){if(yw.isNode&&_1.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)},...t})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/formDataToJSON.js
/**
 * 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 yE(e){// foo[x][y][z]
// foo.x.y.z
// foo-x-y-z
// foo x y z
return _1.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 yI(e){const t={};const r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}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 yk(e){function t(e,r,n,i){let o=e[i++];if(o==="__proto__")return true;const a=Number.isFinite(+o);const s=i>=e.length;o=!o&&_1.isArray(n)?n.length:o;if(s){if(_1.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!_1.isObject(n[o])){n[o]=[]}const l=t(e,r,n[o],i);if(l&&_1.isArray(n[o])){n[o]=yI(n[o])}return!a}if(_1.isFormData(e)&&_1.isFunction(e.entries)){const r={};_1.forEachEntry(e,(e,n)=>{t(yE(e),n,r,0)});return r}return null}/* export default */const yS=yk;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/defaults/index.js
/**
 * 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 yO(e,t,r){if(_1.isString(e)){try{(t||JSON.parse)(e);return _1.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const yT={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function e(e,t){const r=t.getContentType()||"";const n=r.indexOf("application/json")>-1;const i=_1.isObject(e);if(i&&_1.isHTMLForm(e)){e=new FormData(e)}const o=_1.isFormData(e);if(o){return n?JSON.stringify(yS(e)):e}if(_1.isArrayBuffer(e)||_1.isBuffer(e)||_1.isStream(e)||_1.isFile(e)||_1.isBlob(e)||_1.isReadableStream(e)){return e}if(_1.isArrayBufferView(e)){return e.buffer}if(_1.isURLSearchParams(e)){t.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1){return yA(e,this.formSerializer).toString()}if((a=_1.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return yn(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(i||n){t.setContentType("application/json",false);return yO(e)}return e}],transformResponse:[function e(e){const t=this.transitional||yT.transitional;const r=t&&t.forcedJSONParsing;const n=this.responseType==="json";if(_1.isResponse(e)||_1.isReadableStream(e)){return e}if(e&&_1.isString(e)&&(r&&!this.responseType||n)){const r=t&&t.silentJSONParsing;const i=!r&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(i){if(e.name==="SyntaxError"){throw _5.from(e,_5.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:yw.classes.FormData,Blob:yw.classes.Blob},validateStatus:function e(e){return e>=200&&e<300},headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":undefined}}};_1.forEach(["delete","get","head","post","put","patch"],e=>{yT.headers[e]={}});/* export default */const yC=yT;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/parseHeaders.js
// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const yR=_1.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 yD=e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach(function e(e){i=e.indexOf(":");r=e.substring(0,i).trim().toLowerCase();n=e.substring(i+1).trim();if(!r||t[r]&&yR[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};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/AxiosHeaders.js
const yF=Symbol("internals");function yY(e){return e&&String(e).trim().toLowerCase()}function yM(e){if(e===false||e==null){return e}return _1.isArray(e)?e.map(yM):String(e)}function yj(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 yP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function yL(e,t,r,n,i){if(_1.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!_1.isString(t))return;if(_1.isString(n)){return t.indexOf(n)!==-1}if(_1.isRegExp(n)){return n.test(t)}}function yN(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>{return t.toUpperCase()+r})}function yH(e,t){const r=_1.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 yV{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=yY(t);if(!i){throw new Error("header name must be a non-empty string")}const o=_1.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=yM(e)}}const o=(e,t)=>_1.forEach(e,(e,r)=>i(e,r,t));if(_1.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(_1.isString(e)&&(e=e.trim())&&!yP(e)){o(yD(e),t)}else if(_1.isObject(e)&&_1.isIterable(e)){let r={},n,i;for(const t of e){if(!_1.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[i=t[0]]=(n=r[i])?_1.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else{e!=null&&i(t,e,r)}return this}get(e,t){e=yY(e);if(e){const r=_1.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return yj(e)}if(_1.isFunction(t)){return t.call(this,e,r)}if(_1.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=yY(e);if(e){const r=_1.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||yL(this,this[r],r,t)))}return false}delete(e,t){const r=this;let n=false;function i(e){e=yY(e);if(e){const i=_1.findKey(r,e);if(i&&(!t||yL(r,r[i],i,t))){delete r[i];n=true}}}if(_1.isArray(e)){e.forEach(i)}else{i(e)}return n}clear(e){const t=Object.keys(this);let r=t.length;let n=false;while(r--){const i=t[r];if(!e||yL(this,this[i],i,e,true)){delete this[i];n=true}}return n}normalize(e){const t=this;const r={};_1.forEach(this,(n,i)=>{const o=_1.findKey(r,i);if(o){t[o]=yM(n);delete t[i];return}const a=e?yN(i):String(i).trim();if(a!==i){delete t[i]}t[a]=yM(n);r[a]=true});return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);_1.forEach(this,(r,n)=>{r!=null&&r!==false&&(t[n]=e&&_1.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[yF]=this[yF]={accessors:{}};const r=t.accessors;const n=this.prototype;function i(e){const t=yY(e);if(!r[t]){yH(n,e);r[t]=true}}_1.isArray(e)?e.forEach(i):i(e);return this}}yV.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);// reserved names hotfix
_1.reduceDescriptors(yV.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);// map `set` => `Set`
return{get:()=>e,set(e){this[r]=e}}});_1.freezeMethods(yV);/* export default */const yU=yV;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/transformData.js
/**
 * 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 yK(e,t){const r=this||yC;const n=t||r;const i=yU.from(n.headers);let o=n.data;_1.forEach(e,function e(e){o=e.call(r,o,i.normalize(),t?t.status:undefined)});i.normalize();return o};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/isCancel.js
function yB(e){return!!(e&&e.__CANCEL__)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/CanceledError.js
/**
 * 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 yz(e,t,r){// eslint-disable-next-line no-eq-null,eqeqeq
_5.call(this,e==null?"canceled":e,_5.ERR_CANCELED,t,r);this.name="CanceledError"}_1.inherits(yz,_5,{__CANCEL__:true});/* export default */const yq=yz;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/settle.js
/**
 * 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 yW(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new _5("Request failed with status code "+r.status,[_5.ERR_BAD_REQUEST,_5.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/parseProtocol.js
function yG(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/speedometer.js
/**
 * Calculate data maxRate
 * @param {Number} [samplesCount= 10]
 * @param {Number} [min= 1000]
 * @returns {Function}
 */function y$(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let o=0;let a;t=t!==undefined?t:1e3;return function s(s){const l=Date.now();const c=n[o];if(!a){a=l}r[i]=s;n[i]=l;let u=o;let d=0;while(u!==i){d+=r[u++];u=u%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(l-a<t){return}const f=c&&l-c;return f?Math.round(d*1e3/f):undefined}}/* export default */const yQ=y$;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/throttle.js
/**
 * Throttle decorator
 * @param {Function} fn
 * @param {Number} freq
 * @return {Function}
 */function yX(e,t){let r=0;let n=1e3/t;let i;let o;const a=(t,n=Date.now())=>{r=n;i=null;if(o){clearTimeout(o);o=null}e(...t)};const s=(...e)=>{const t=Date.now();const s=t-r;if(s>=n){a(e,t)}else{i=e;if(!o){o=setTimeout(()=>{o=null;a(i)},n-s)}}};const l=()=>i&&a(i);return[s,l]}/* export default */const yJ=yX;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/progressEventReducer.js
const yZ=(e,t,r=3)=>{let n=0;const i=yQ(50,250);return yJ(r=>{const o=r.loaded;const a=r.lengthComputable?r.total:undefined;const s=o-n;const l=i(s);const c=o<=a;n=o;const u={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:l?l:undefined,estimated:l&&a&&c?(a-o)/l:undefined,event:r,lengthComputable:a!=null,[t?"download":"upload"]:true};e(u)},r)};const y0=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]};const y1=e=>(...t)=>_1.asap(()=>e(...t));// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
/* export default */const y2=yw.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,yw.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(yw.origin),yw.navigator&&/(msie|trident)/i.test(yw.navigator.userAgent)):()=>true;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/cookies.js
/* export default */const y6=yw.hasStandardBrowserEnv?// Standard browser envs support document.cookie
{write(e,t,r,n,i,o,a){if(typeof document==="undefined")return;const s=[`${e}=${encodeURIComponent(t)}`];if(_1.isNumber(r)){s.push(`expires=${new Date(r).toUTCString()}`)}if(_1.isString(n)){s.push(`path=${n}`)}if(_1.isString(i)){s.push(`domain=${i}`)}if(o===true){s.push("secure")}if(_1.isString(a)){s.push(`SameSite=${a}`)}document.cookie=s.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(){}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
/**
 * 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 y4(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)};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/combineURLs.js
/**
 * 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 y5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/buildFullPath.js
/**
 * 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 y3(e,t,r){let n=!y4(t);if(e&&(n||r==false)){return y5(e,t)}return t};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/mergeConfig.js
const y8=e=>e instanceof yU?{...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 y9(e,t){// eslint-disable-next-line no-param-reassign
t=t||{};const r={};function n(e,t,r,n){if(_1.isPlainObject(e)&&_1.isPlainObject(t)){return _1.merge.call({caseless:n},e,t)}else if(_1.isPlainObject(t)){return _1.merge({},t)}else if(_1.isArray(t)){return t.slice()}return t}// eslint-disable-next-line consistent-return
function i(e,t,r,i){if(!_1.isUndefined(t)){return n(e,t,r,i)}else if(!_1.isUndefined(e)){return n(undefined,e,r,i)}}// eslint-disable-next-line consistent-return
function o(e,t){if(!_1.isUndefined(t)){return n(undefined,t)}}// eslint-disable-next-line consistent-return
function a(e,t){if(!_1.isUndefined(t)){return n(undefined,t)}else if(!_1.isUndefined(e)){return n(undefined,e)}}// eslint-disable-next-line consistent-return
function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>i(y8(e),y8(t),r,true)};_1.forEach(Object.keys({...e,...t}),function n(n){const o=l[n]||i;const a=o(e[n],t[n],n);_1.isUndefined(a)&&o!==s||(r[n]=a)});return r};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/resolveConfig.js
/* export default */const y7=e=>{const t=y9({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=yU.from(a);t.url=yc(y3(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);// HTTP basic authentication
if(s){a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")))}if(_1.isFormData(r)){if(yw.hasStandardBrowserEnv||yw.hasStandardBrowserWebWorkerEnv){a.setContentType(undefined);// browser handles it
}else if(_1.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())){a.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(yw.hasStandardBrowserEnv){n&&_1.isFunction(n)&&(n=n(t));if(n||n!==false&&y2(t.url)){// Add xsrf header
const e=i&&o&&y6.read(o);if(e){a.set(i,e)}}}return t};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/xhr.js
const xe=typeof XMLHttpRequest!=="undefined";/* export default */const xt=xe&&function(e){return new Promise(function t(t,r){const n=y7(e);let i=n.data;const o=yU.from(n.headers).normalize();let{responseType:a,onUploadProgress:s,onDownloadProgress:l}=n;let c;let u,d;let f,p;function h(){f&&f();// flush events
p&&p();// flush events
n.cancelToken&&n.cancelToken.unsubscribe(c);n.signal&&n.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(n.method.toUpperCase(),n.url,true);// Set the request timeout in MS
v.timeout=n.timeout;function m(){if(!v){return}// Prepare the response
const n=yU.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());const i=!a||a==="text"||a==="json"?v.responseText:v.response;const o={data:i,status:v.status,statusText:v.statusText,headers:n,config:e,request:v};yW(function e(e){t(e);h()},function e(e){r(e);h()},o);// Clean up request
v=null}if("onloadend"in v){// Use onloadend if available
v.onloadend=m}else{// Listen for ready state to emulate onloadend
v.onreadystatechange=function e(){if(!v||v.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(v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)){return}// readystate handler is calling before onerror or ontimeout handlers,
// so we should call onloadend on the next 'tick'
setTimeout(m)}}// Handle browser request cancellation (as opposed to a manual cancellation)
v.onabort=function t(){if(!v){return}r(new _5("Request aborted",_5.ECONNABORTED,e,v));// Clean up request
v=null};// Handle low level network errors
v.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 _5(n,_5.ERR_NETWORK,e,v);// attach the underlying event for consumers who want details
i.event=t||null;r(i);v=null};// Handle timeout
v.ontimeout=function t(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||yf;if(n.timeoutErrorMessage){t=n.timeoutErrorMessage}r(new _5(t,i.clarifyTimeoutError?_5.ETIMEDOUT:_5.ECONNABORTED,e,v));// Clean up request
v=null};// Remove Content-Type if data is undefined
i===undefined&&o.setContentType(null);// Add headers to the request
if("setRequestHeader"in v){_1.forEach(o.toJSON(),function e(e,t){v.setRequestHeader(t,e)})}// Add withCredentials to request if needed
if(!_1.isUndefined(n.withCredentials)){v.withCredentials=!!n.withCredentials}// Add responseType to request if needed
if(a&&a!=="json"){v.responseType=n.responseType}// Handle progress if needed
if(l){[d,p]=yZ(l,true);v.addEventListener("progress",d)}// Not all browsers support upload events
if(s&&v.upload){[u,f]=yZ(s);v.upload.addEventListener("progress",u);v.upload.addEventListener("loadend",f)}if(n.cancelToken||n.signal){// Handle cancellation
// eslint-disable-next-line func-names
c=t=>{if(!v){return}r(!t||t.type?new yq(null,e,v):t);v.abort();v=null};n.cancelToken&&n.cancelToken.subscribe(c);if(n.signal){n.signal.aborted?c():n.signal.addEventListener("abort",c)}}const g=yG(n.url);if(g&&yw.protocols.indexOf(g)===-1){r(new _5("Unsupported protocol "+g+":",_5.ERR_BAD_REQUEST,e));return}// Send the request
v.send(i||null)})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/composeSignals.js
const xr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let n;const i=function(e){if(!n){n=true;a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof _5?t:new yq(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null;i(new _5(`timeout ${t} of ms exceeded`,_5.ETIMEDOUT))},t);const a=()=>{if(e){o&&clearTimeout(o);o=null;e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)});e=null}};e.forEach(e=>e.addEventListener("abort",i));const{signal:s}=r;s.unsubscribe=()=>_1.asap(a);return s}};/* export default */const xn=xr;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/trackStream.js
const xi=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 xo=async function*(e,t){for await(const r of xa(e)){yield*xi(r,t)}};const xa=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 xs=(e,t,r,n)=>{const i=xo(e,t);let o=0;let a;let s=e=>{if(!a){a=true;n&&n(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t){s();e.close();return}let a=n.byteLength;if(r){let e=o+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(e){s(e);throw e}},cancel(e){s(e);return i.return()}},{highWaterMark:2})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/fetch.js
const xl=64*1024;const{isFunction:xc}=_1;const xu=(({Request:e,Response:t})=>({Request:e,Response:t}))(_1.global);const{ReadableStream:xd,TextEncoder:xf}=_1.global;const xp=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const xh=e=>{e=_1.merge.call({skipUndefined:true},xu,e);const{fetch:t,Request:r,Response:n}=e;const i=t?xc(t):typeof fetch==="function";const o=xc(r);const a=xc(n);if(!i){return false}const s=i&&xc(xd);const l=i&&(typeof xf==="function"?(e=>t=>e.encode(t))(new xf):async e=>new Uint8Array(await new r(e).arrayBuffer()));const c=o&&s&&xp(()=>{let e=false;const t=new r(yw.origin,{body:new xd,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t});const u=a&&s&&xp(()=>_1.isReadableStream(new n("").body));const d={stream:u&&(e=>e.body)};i&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,r)=>{let n=t&&t[e];if(n){return n.call(t)}throw new _5(`Response type '${e}' is not supported`,_5.ERR_NOT_SUPPORT,r)})})})();const f=async e=>{if(e==null){return 0}if(_1.isBlob(e)){return e.size}if(_1.isSpecCompliantForm(e)){const t=new r(yw.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(_1.isArrayBufferView(e)||_1.isArrayBuffer(e)){return e.byteLength}if(_1.isURLSearchParams(e)){e=e+""}if(_1.isString(e)){return(await l(e)).byteLength}};const p=async(e,t)=>{const r=_1.toFiniteNumber(e.getContentLength());return r==null?f(t):r};return async e=>{let{url:i,method:a,data:s,signal:l,cancelToken:f,timeout:h,onDownloadProgress:v,onUploadProgress:m,responseType:g,headers:b,withCredentials:_="same-origin",fetchOptions:y}=y7(e);let x=t||fetch;g=g?(g+"").toLowerCase():"text";let w=xn([l,f&&f.toAbortSignal()],h);let A=null;const E=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let I;try{if(m&&c&&a!=="get"&&a!=="head"&&(I=await p(b,s))!==0){let e=new r(i,{method:"POST",body:s,duplex:"half"});let t;if(_1.isFormData(s)&&(t=e.headers.get("content-type"))){b.setContentType(t)}if(e.body){const[t,r]=y0(I,yZ(y1(m)));s=xs(e.body,xl,t,r)}}if(!_1.isString(_)){_=_?"include":"omit"}// Cloudflare Workers throws when credentials are defined
// see https://github.com/cloudflare/workerd/issues/902
const t=o&&"credentials"in r.prototype;const l={...y,signal:w,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:t?_:undefined};A=o&&new r(i,l);let f=await (o?x(A,y):x(i,l));const h=u&&(g==="stream"||g==="response");if(u&&(v||h&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=_1.toFiniteNumber(f.headers.get("content-length"));const[r,i]=v&&y0(t,yZ(y1(v),true))||[];f=new n(xs(f.body,xl,r,()=>{i&&i();E&&E()}),e)}g=g||"text";let k=await d[_1.findKey(d,g)||"text"](f,e);!h&&E&&E();return await new Promise((t,r)=>{yW(t,r,{data:k,headers:yU.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:A})})}catch(t){E&&E();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new _5("Network Error",_5.ERR_NETWORK,e,A),{cause:t.cause||t})}throw _5.from(t,t&&t.code,e,A)}}};const xv=new Map;const xm=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t;const o=[n,i,r];let a=o.length,s=a,l,c,u=xv;while(s--){l=o[s];c=u.get(l);c===undefined&&u.set(l,c=s?new Map:xh(t));u=c}return c};const xg=xm();/* export default */const xb=/* unused pure expression or super */null&&xg;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/adapters.js
/**
 * 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 x_={http:_3,xhr:xt,fetch:{get:xm}};// Assign adapter names for easier debugging and identification
_1.forEach(x_,(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 xy=e=>`- ${e}`;/**
 * Check if the adapter is resolved (function, null, or false)
 * 
 * @param {Function|null|false} adapter
 * @returns {boolean}
 */const xx=e=>_1.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 xw(e,t){e=_1.isArray(e)?e:[e];const{length:r}=e;let n;let i;const o={};for(let a=0;a<r;a++){n=e[a];let r;i=n;if(!xx(n)){i=x_[(r=String(n)).toLowerCase()];if(i===undefined){throw new _5(`Unknown adapter '${r}'`)}}if(i&&(_1.isFunction(i)||(i=i.get(t)))){break}o[r||"#"+a]=i}if(!i){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(xy).join("\n"):" "+xy(e[0]):"as no adapter specified";throw new _5(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return i}/**
 * Exports Axios adapters and utility to resolve an adapter
 *//* export default */const xA={/**
   * Resolve an adapter from a list of adapter names or functions.
   * @type {Function}
   */getAdapter:xw,/**
   * Exposes all known adapters
   * @type {Object<string, Function|Object>}
   */adapters:x_};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/dispatchRequest.js
/**
 * Throws a `CanceledError` if cancellation has been requested.
 *
 * @param {Object} config The config that is to be used for the request
 *
 * @returns {void}
 */function xE(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new yq(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 xI(e){xE(e);e.headers=yU.from(e.headers);// Transform request data
e.data=yK.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=xA.getAdapter(e.adapter||yC.adapter,e);return t(e).then(function t(t){xE(e);// Transform response data
t.data=yK.call(e,e.transformResponse,t);t.headers=yU.from(t.headers);return t},function t(t){if(!yB(t)){xE(e);// Transform response data
if(t&&t.response){t.response.data=yK.call(e,e.transformResponse,t.response);t.response.headers=yU.from(t.response.headers)}}return Promise.reject(t)})};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/env/data.js
const xk="1.13.2";// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/validator.js
const xS={};// eslint-disable-next-line func-names
["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xS[e]=function r(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xO={};/**
 * 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}
 */xS.transitional=function e(e,t,r){function n(e,t){return"[Axios v"+xk+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}// eslint-disable-next-line func-names
return(r,i,o)=>{if(e===false){throw new _5(n(i," has been removed"+(t?" in "+t:"")),_5.ERR_DEPRECATED)}if(t&&!xO[i]){xO[i]=true;// eslint-disable-next-line no-console
console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))}return e?e(r,i,o):true}};xS.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 xT(e,t,r){if(typeof e!=="object"){throw new _5("options must be an object",_5.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const o=n[i];const a=t[o];if(a){const t=e[o];const r=t===undefined||a(t,o,e);if(r!==true){throw new _5("option "+o+" must be "+r,_5.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new _5("Unknown option "+o,_5.ERR_BAD_OPTION)}}}/* export default */const xC={assertOptions:xT,validators:xS};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/Axios.js
const xR=xC.validators;/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 *
 * @return {Axios} A new instance of Axios
 */class xD{constructor(e){this.defaults=e||{};this.interceptors={request:new yd,response:new yd}}/**
   * 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=y9(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;if(r!==undefined){xC.assertOptions(r,{silentJSONParsing:xR.transitional(xR.boolean),forcedJSONParsing:xR.transitional(xR.boolean),clarifyTimeoutError:xR.transitional(xR.boolean)},false)}if(n!=null){if(_1.isFunction(n)){t.paramsSerializer={serialize:n}}else{xC.assertOptions(n,{encode:xR.function,serialize:xR.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}xC.assertOptions(t,{baseUrl:xR.spelling("baseURL"),withXsrfToken:xR.spelling("withXSRFToken")},true);// Set config.method
t.method=(t.method||this.defaults.method||"get").toLowerCase();// Flatten headers
let o=i&&_1.merge(i.common,i[t.method]);i&&_1.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]});t.headers=yU.concat(o,i);// filter out skipped interceptors
const a=[];let s=true;this.interceptors.request.forEach(function e(e){if(typeof e.runWhen==="function"&&e.runWhen(t)===false){return}s=s&&e.synchronous;a.unshift(e.fulfilled,e.rejected)});const l=[];this.interceptors.response.forEach(function e(e){l.push(e.fulfilled,e.rejected)});let c;let u=0;let d;if(!s){const e=[xI.bind(this),undefined];e.unshift(...a);e.push(...l);d=e.length;c=Promise.resolve(t);while(u<d){c=c.then(e[u++],e[u++])}return c}d=a.length;let f=t;while(u<d){const e=a[u++];const t=a[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=xI.call(this,f)}catch(e){return Promise.reject(e)}u=0;d=l.length;while(u<d){c=c.then(l[u++],l[u++])}return c}getUri(e){e=y9(this.defaults,e);const t=y3(e.baseURL,e.url,e.allowAbsoluteUrls);return yc(t,e.params,e.paramsSerializer)}}// Provide aliases for supported request methods
_1.forEach(["delete","get","head","options"],function e(e){/*eslint func-names:0*/xD.prototype[e]=function(t,r){return this.request(y9(r||{},{method:e,url:t,data:(r||{}).data}))}});_1.forEach(["post","put","patch"],function e(e){/*eslint func-names:0*/function t(t){return function r(r,n,i){return this.request(y9(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}xD.prototype[e]=t();xD.prototype[e+"Form"]=t(true)});/* export default */const xF=xD;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/CancelToken.js
/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @param {Function} executor The executor function.
 *
 * @returns {CancelToken}
 */class xY{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,n,i){if(r.reason){// Cancellation has already been requested
return}r.reason=new yq(e,n,i);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 xY(function t(t){e=t});return{token:t,cancel:e}}}/* export default */const xM=xY;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/spread.js
/**
 * 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 xj(e){return function t(t){return e.apply(null,t)}};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/isAxiosError.js
/**
 * 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 xP(e){return _1.isObject(e)&&e.isAxiosError===true};// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/HttpStatusCode.js
const xL={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(xL).forEach(([e,t])=>{xL[t]=e});/* export default */const xN=xL;// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/axios.js
/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 *
 * @returns {Axios} A new instance of Axios
 */function xH(e){const t=new xF(e);const r=b2(xF.prototype.request,t);// Copy axios.prototype to instance
_1.extend(r,xF.prototype,t,{allOwnKeys:true});// Copy context to instance
_1.extend(r,t,null,{allOwnKeys:true});// Factory for creating new instances
r.create=function t(t){return xH(y9(e,t))};return r}// Create the default instance to be exported
const xV=xH(yC);// Expose Axios class to allow class inheritance
xV.Axios=xF;// Expose Cancel & CancelToken
xV.CanceledError=yq;xV.CancelToken=xM;xV.isCancel=yB;xV.VERSION=xk;xV.toFormData=yn;// Expose AxiosError class
xV.AxiosError=_5;// alias for CanceledError for backward compatibility
xV.Cancel=xV.CanceledError;// Expose all/spread
xV.all=function e(e){return Promise.all(e)};xV.spread=xj;// Expose isAxiosError
xV.isAxiosError=xP;// Expose mergeConfig
xV.mergeConfig=y9;xV.AxiosHeaders=yU;xV.formToJSON=e=>yS(_1.isHTMLForm(e)?new FormData(e):e);xV.getAdapter=xA.getAdapter;xV.HttpStatusCode=xN;xV.default=xV;// this module should only have a default export
/* export default */const xU=xV;// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/querystring@0.2.1/node_modules/querystring/index.js
var xK=r(9919);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/utils/form.ts
var xB=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,xB(_object_spread({},i),"".concat(t).concat(n,".")))}return _object_spread_props(_object_spread({},r),{["".concat(t).concat(n)]:i})},{})};var xz=(e,t)=>{var r=e;if(r.status===404||r.status===403||r.status===500){return{nonFieldErrors:["Unexpected error!"]}}var n=xB(t);var i=xB(r.data);var{non_field_errors:o}=i,a=_object_without_properties(i,["non_field_errors"]);var s=isStringArray(o)?o:[];for(var l of Object.keys(a)){if(!(l in n)){var c=i[l];if(isStringArray(c)){s.push(...c)}}}return{nonFieldErrors:s.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 xq=(e,t,r)=>{if(!isAxiosError(e)||!e.response){throw e}var{fieldErrors:n,nonFieldErrors:i}=xz(e.response,r);if(i===null||i===void 0?void 0:i.length){t.setSubmitError(i[0])}if(n){for(var o of Object.keys(n)){var a=n[o];if(a.length>0){t.setError(o,{message:a[0]})}}}};var xW=(e,t)=>{return r=>_async_to_generator(function*(){e.setSubmitError(undefined);try{yield t(r)}catch(t){xq(t,e,r)}})()};var xG=(e,t)=>{var r=function(t){var r=e[t];if(Array.isArray(r)){r.forEach((e,r)=>{if((0,iH/* .isFileOrBlob */.$X)(e)||(0,iH/* .isString */.Kg)(e)){n.append("".concat(t,"[").concat(r,"]"),e)}else if((0,iH/* .isBoolean */.Lm)(e)||(0,iH/* .isNumber */.Et)(e)){n.append("".concat(t,"[").concat(r,"]"),e.toString())}else if(typeof e==="object"&&e!==null){n.append("".concat(t,"[").concat(r,"]"),JSON.stringify(e))}else{n.append("".concat(t,"[").concat(r,"]"),e)}})}else{if((0,iH/* .isFileOrBlob */.$X)(r)||(0,iH/* .isString */.Kg)(r)){n.append(t,r)}else if((0,iH/* .isBoolean */.Lm)(r)){n.append(t,r.toString())}else if((0,iH/* .isNumber */.Et)(r)){n.append(t,"".concat(r))}else if(typeof r==="object"&&r!==null){n.append(t,JSON.stringify(r))}else{n.append(t,r)}}};var n=new FormData;for(var i of Object.keys(e))r(i);n.append("_method",t.toUpperCase());return n};var x$=e=>{var t={};for(var r in e){var n=e[r];if(!(0,iH/* .isDefined */.O9)(n)){t[r]="null"}else if((0,iH/* .isBoolean */.Lm)(n)){t[r]=n===true?"true":"false"}else{t[r]=n}}return t};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/utils/api.ts
xU.defaults.paramsSerializer=e=>{return xK.stringify(e)};var xQ=xU.create({baseURL:bA/* ["default"].WP_API_BASE_URL */.A.WP_API_BASE_URL});xQ.interceptors.request.use(e=>{var t;(t=e).headers||(t.headers={});e.headers["X-WP-Nonce"]=bA/* .tutorConfig.wp_rest_nonce */.P.wp_rest_nonce;if(e.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())){if(e.data){e.data=xG(e.data,e.method)}if(["put","patch"].includes(e.method.toLowerCase())){e.method="POST"}}if(e.params){e.params=x$(e.params)}if(e.method&&["get","delete"].includes(e.method.toLowerCase())){e.params=(0,ep._)((0,ef._)({},e.params),{_method:e.method})}return e},e=>{return Promise.reject(e)});xQ.interceptors.response.use(e=>{return Promise.resolve(e).then(e=>e)});var xX=xU.create({baseURL:bA/* ["default"].WP_AJAX_BASE_URL */.A.WP_AJAX_BASE_URL});xX.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=x$(e.params)}(r=e).data||(r.data={});var n=bA/* .tutorConfig.nonce_key */.P.nonce_key;var i=bA/* .tutorConfig._tutor_nonce */.P._tutor_nonce;e.data=(0,ep._)((0,ef._)({},e.data,e.params),{action:e.url,[n]:i});e.data=xG(e.data,e.method);e.params={};e.url=undefined;return e},e=>Promise.reject(e));xX.interceptors.response.use(e=>Promise.resolve(e).then(e=>e.data));// CONCATENATED MODULE: ../tutor/assets/core/ts/utils/endpoints.ts
var xJ={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",CREATE_DRAFT_COURSE:"tutor_create_new_draft_course",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",GENERATE_AI_QUIZ_QUESTIONS:"tutor_pro_ai_generate_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",UPDATE_SUBSCRIPTION_STATUS:"tutor_subscription_status_update",RESUME_SUBSCRIPTION:"tutor_subscription_resume",EARLY_RENEW_SUBSCRIPTION:"tutor_subscription_early_renew",// COURSE
GET_COURSE_DETAILS:"tutor_course_details",UPDATE_COURSE:"tutor_update_course",GET_COURSE_LIST:"tutor_course_list",RESET_COURSE_PROGRESS:"tutor_reset_course_progress",TUTOR_COMPLETE_COURSE:"tutor_complete_course",// 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",START_QUIZ:"tutor_start_quiz",QUIZ_ABANDON:"tutor_quiz_abandon",QUIZ_TIMEOUT:"tutor_quiz_timeout",QUIZ_ATTEMPT_SUBMIT:"tutor_answering_quiz_question",REVIEW_QUIZ_ANSWERS:"tutor_review_quiz_answers",INSTRUCTOR_FEEDBACK:"tutor_instructor_feedback",// ZOOM
GET_ZOOM_MEETING_DETAILS:"tutor_zoom_meeting_details",SAVE_ZOOM_MEETING:"tutor_zoom_save_meeting",DELETE_ZOOM_MEETING:"tutor_zoom_delete_meeting",ZOOM_SAVE_API:"tutor_save_zoom_api",ZOOM_SAVE_SETTINGS:"tutor_save_zoom_settings",// 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",UPLOAD_GOOGLE_MEET_CREDENTIALS:"tutor_pro_google_meet_credential_upload",RESET_GOOGLE_MEET_CREDENTIALS:"tutor_google_meet_reset_cred",UPDATE_GOOGLE_MEET_SETTINGS:"tutor_update_google_meet_settings",// 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",LOAD_LESSON_COMMENTS:"tutor_load_lesson_comments",CREATE_LESSON_COMMENT:"tutor_create_lesson_comment",UPDATE_LESSON_COMMENT:"tutor_update_lesson_comment",DELETE_LESSON_COMMENT:"tutor_delete_lesson_comment",REPLY_LESSON_COMMENT:"tutor_reply_lesson_comment",LOAD_COMMENT_REPLIES:"tutor_load_comment_replies",// Q&A
QNA_SINGLE_ACTION:"tutor_qna_single_action",DELETE_DASHBOARD_QNA:"tutor_delete_dashboard_question",CREATE_UPDATE_QNA:"tutor_qna_create_update",UPDATE_QNA:"tutor_qna_update",LOAD_QNA_REPLIES:"tutor_qna_load_replies",// ASSIGNMENT
GET_ASSIGNMENT_DETAILS:"tutor_assignment_details",SAVE_ASSIGNMENT:"tutor_assignment_save",ASSIGNMENT_SUBMIT:"tutor_assignment_submit",REMOVE_ATTACHMENT:"tutor_remove_assignment_attachment",REMOVE_ASSIGNMENT_ATTEMPT:"tutor_remove_assignment_attempt",// 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",// Calendar
GET_CALENDAR_EVENTS:"get_calendar_materials",// Announcement
CREATE_ANNOUNCEMENT:"tutor_announcement_create",DELETE_ANNOUNCEMENT:"tutor_announcement_delete",// Notifications
PUSH_NOTIFICATION_SAVE_SUBSCRIPTION:"tutor_pn_save_subscription",GET_ALL_NOTIFICATIONS:"tutor_get_all_notifications",MARK_ALL_NOTIFICATIONS_AS_READ:"toggle_all_notifications_status_as_read",MARK_SINGLE_NOTIFICATION_AS_READ:"toggle_single_notification_status_as_read",MARK_ALL_NOTIFICATIONS_AS_UNREAD:"tutor_mark_all_notifications_as_unread",//Reviews
PLACE_RATING:"tutor_place_rating",DELETE_REVIEW:"delete_tutor_review",CLEAR_REVIEW_POPUP_DATA:"tutor_clear_review_popup_data",// Settings
FETCH_COUNTRIES:"/assets/json/countries.json",UPLOAD_PROFILE_PHOTO:"tutor_user_photo_upload",REMOVE_PROFILE_PHOTO:"tutor_user_photo_remove",UPDATE_PROFILE:"tutor_update_profile",SAVE_SOCIAL_PROFILE:"tutor_social_profile",SAVE_BILLING_INFO:"tutor_save_billing_info",SAVE_WITHDRAW_METHOD:"tutor_save_withdraw_account",RESET_PASSWORD:"tutor_profile_password_reset",UPDATE_PROFILE_NOTIFICATION:"tutor_save_notification_preference",UPDATE_USER_PREFERENCES:"tutor_save_user_preferences",RESET_USER_PREFERENCES:"tutor_reset_user_preferences",REMOVE_DEVICE_MANUALLY:"tutor_remove_device_manually",REMOVE_ALL_ACTIVE_LOGINS:"tutor_remove_all_active_logins",// Withdrawals
MAKE_AN_WITHDRAW:"tutor_make_an_withdraw",// Certificate
VERIFY_CERTIFICATE:"tutor_verify_certificate",// Instructor Dashboard
SAVE_INSTRUCTOR_HOME_SECTIONS_ORDER:"tutor_save_instructor_home_sections_order",SAVE_INSTRUCTOR_HOME_SECTIONS_VISIBILITY:"tutor_save_instructor_home_sections_visibility",// Tour
COMPLETE_TOUR:"tutor_complete_tour"};/* export default */const xZ=xJ;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/services/magic-ai.ts
var x0=e=>{return wpAjaxInstance.post(endpoints.GENERATE_AI_IMAGE,e)};var x1=()=>{return useMutation({mutationFn:x0})};var x2=e=>{return wpAjaxInstance.post(endpoints.MAGIC_FILL_AI_IMAGE,e).then(e=>e.data.data[0].b64_json)};var x6=()=>{var{showToast:e}=useToast();return useMutation({mutationFn:x2,onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var x4=e=>{return xX.post(xZ.MAGIC_TEXT_GENERATION,e)};var x5=()=>{var{showToast:e}=i2();return b1({mutationFn:x4,onError:t=>{e({type:"danger",message:(0,iV/* .convertToErrorMessage */.EL)(t)})}})};var x3=e=>{return xX.post(xZ.MAGIC_AI_MODIFY_CONTENT,e)};var x8=()=>{var{showToast:e}=i2();return b1({mutationFn:x3,onError:t=>{e({type:"danger",message:(0,iV/* .convertToErrorMessage */.EL)(t)})}})};var x9=e=>{return wpAjaxInstance.post(endpoints.USE_AI_GENERATED_IMAGE,e)};var x7=()=>{var{showToast:e}=useToast();return useMutation({mutationFn:x9,onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var we=e=>{return wpAjaxInstance.post(endpoints.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var wt=e=>{var{showToast:t}=useToast();return useMutation({mutationKey:["GenerateCourseContent",e],mutationFn:we,onError:e=>{t({type:"danger",message:convertToErrorMessage(e)})}})};var wr=e=>{return wpAjaxInstance.post(endpoints.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var wn=()=>{var{showToast:e}=useToast();return useMutation({mutationFn:wr,onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var wi=e=>{return wpAjaxInstance.post(endpoints.GENERATE_COURSE_TOPIC_CONTENT,e,{signal:e.signal})};var wo=()=>{var{showToast:e}=useToast();return useMutation({mutationFn:wi,onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var wa=e=>{return wpAjaxInstance.post(endpoints.SAVE_AI_GENERATED_COURSE_CONTENT,e)};var ws=()=>{var{showToast:e}=useToast();var t=useQueryClient();return useMutation({mutationFn:wa,onSuccess(){t.invalidateQueries({queryKey:["CourseDetails"]})},onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var wl=e=>{return wpAjaxInstance.post(endpoints.GENERATE_QUIZ_QUESTIONS,e,{signal:e.signal})};var wc=()=>{var{showToast:e}=useToast();return useMutation({mutationFn:wl,onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var wu=e=>{return wpAjaxInstance.post(endpoints.GENERATE_AI_QUIZ_QUESTIONS,e,{signal:e.signal})};var wd=()=>{var{showToast:e}=useToast();return useMutation({mutationFn:wu,onError:t=>{e({type:"danger",message:convertToErrorMessage(t)})}})};var wf=e=>{return xX.post(xZ.OPEN_AI_SAVE_SETTINGS,(0,ef._)({},e))};var wh=()=>{var{showToast:e}=i2();return b1({mutationFn:wf,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,iV/* .convertToErrorMessage */.EL)(t)})}})};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/AITextModal.tsx
var wv=[(0,lo.__)("Mastering Digital Marketing: A Complete Guide","tutor-pro"),(0,lo.__)("The Ultimate Photoshop Course for Beginners","tutor-pro"),(0,lo.__)("Python Programming: From Zero to Hero","tutor-pro"),(0,lo.__)("Creative Writing Essentials: Unlock Your Storytelling Potential","tutor-pro"),(0,lo.__)("The Complete Guide to Web Development with React","tutor-pro"),(0,lo.__)("Master Public Speaking: Deliver Powerful Presentations","tutor-pro"),(0,lo.__)("Excel for Business: From Basics to Advanced Analytics","tutor-pro"),(0,lo.__)("Fitness Fundamentals: Build Strength and Confidence","tutor-pro"),(0,lo.__)("Photography Made Simple: Capture Stunning Shots","tutor-pro"),(0,lo.__)("Financial Freedom: Learn the Basics of Investing","tutor-pro")];var wm=e=>{var{title:r,icon:i,closeModal:o,field:a,format:s="essay",characters:l=250,is_html:u=false,fieldLabel:d="",fieldPlaceholder:f=""}=e;var p=bX({defaultValues:{prompt:"",characters:l,language:"english",tone:"formal",format:s}});var h=x5();var v=x8();var[m,g]=(0,n.useState)([]);var[b,_]=(0,n.useState)(0);var[y,x]=(0,n.useState)(false);var[w,A]=(0,n.useState)(null);var E=(0,n.useRef)(null);var I=(0,n.useRef)(null);var k=(0,n.useMemo)(()=>{return m[b]},[m,b]);var S=p.watch("prompt");function O(e){g(t=>[e,...t]);_(0)}function T(e,t){return mG(function*(){if(m.length===0){return}var r=m[b];if(e==="translation"&&!!t){var n=yield v.mutateAsync({type:"translation",content:r,language:t,is_html:u});if(n.data){O(n.data)}return}if(e==="change_tone"&&!!t){var i=yield v.mutateAsync({type:"change_tone",content:r,tone:t,is_html:u});if(i.data){O(i.data)}return}var o=yield v.mutateAsync({type:e,content:r,is_html:u});if(o.data){O(o.data)}})()}(0,n.useEffect)(()=>{p.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,t/* .jsx */.Y)(mI,{onClose:o,title:r,icon:i,maxWidth:524,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("form",{onSubmit:p.handleSubmit(e=>mG(function*(){var t=yield h.mutateAsync((0,ep._)((0,ef._)({},e),{is_html:u}));if(t.data){O(t.data)}})()),children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wb.container,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wb.fieldsWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{control:p.control,name:"prompt",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(bC,(0,ep._)((0,ef._)({},e),{label:d||(0,lo.__)("Craft Your Course Description","tutor-pro"),placeholder:f||(0,lo.__)("Provide a brief overview of your course topic, target audience, and key takeaways","tutor-pro"),rows:4,isMagicAi:true}))}),/*#__PURE__*/(0,t/* .jsxs */.FD)("button",{type:"button",css:wb.inspireButton,onClick:()=>{var e=wv.length;var t=Math.floor(Math.random()*e);p.reset((0,ep._)((0,ef._)({},p.getValues()),{prompt:wv[t]}))},children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"bulbLine"}),(0,lo.__)("Inspire Me","tutor-pro")]})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!h.isPending&&!v.isPending,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(b$,{}),children:/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:m.length>0,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(bN,{form:p}),children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wb.actionBar,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wb.navigation,children:/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:m.length>1,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",onClick:()=>_(e=>Math.max(0,e-1)),disabled:b===0,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:!ak/* .isRTL */.V8?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wb.pageInfo,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:b+1})," / ",m.length]}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",onClick:()=>_(e=>Math.min(m.length-1,e+1)),disabled:b===m.length-1,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:!ak/* .isRTL */.V8?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",onClick:()=>mG(function*(){if(m.length===0){return}var e=m[b];yield(0,iV/* .copyToClipboard */.lW)(e);x(true);setTimeout(()=>{x(false)},1500)})(),children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:y,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"copy",width:20,height:20}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"checkFilled",width:20,height:20,style:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.success */.I6.text.success," !important;")})})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wb.content,dangerouslySetInnerHTML:{__html:k}})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wb.otherActions,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"outline",roundedFull:false,onClick:()=>T("rephrase"),children:(0,lo.__)("Rephrase","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"outline",roundedFull:false,onClick:()=>T("make_shorter"),children:(0,lo.__)("Make Shorter","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)(by,{variant:"outline",roundedFull:false,ref:E,onClick:()=>A("tone"),children:[(0,lo.__)("Change Tone","tutor-pro"),/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)(by,{variant:"outline",roundedFull:false,ref:I,onClick:()=>A("translate"),children:[(0,lo.__)("Translate to","tutor-pro"),/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"outline",roundedFull:false,onClick:()=>T("write_as_bullets"),children:(0,lo.__)("Write as Bullets","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"outline",roundedFull:false,onClick:()=>T("make_longer"),children:(0,lo.__)("Make Longer","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"outline",roundedFull:false,onClick:()=>T("simplify_language"),children:(0,lo.__)("Simplify Language","tutor-pro")})]})]})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(lz,{isOpen:w==="tone",triggerRef:E,arrow:true,closePopover:()=>A(null),maxWidth:"160px",animationType:ij.slideDown,children:/*#__PURE__*/(0,t/* .jsx */.Y)(bY,{options:bP,onChange:e=>mG(function*(){A(null);yield T("change_tone",e)})()})}),/*#__PURE__*/(0,t/* .jsx */.Y)(lz,{isOpen:w==="translate",triggerRef:I,closePopover:()=>A(null),maxWidth:"160px",animationType:ij.slideDown,children:/*#__PURE__*/(0,t/* .jsx */.Y)(bY,{options:bj,onChange:e=>mG(function*(){A(null);yield T("translation",e)})()})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wb.footer,children:/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:m.length>0,fallback:/*#__PURE__*/(0,t/* .jsxs */.FD)(by,{type:"submit",disabled:h.isPending||!S||v.isPending,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,lo.__)("Generate Now","tutor-pro")]}),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"outline",type:"submit",disabled:h.isPending||!S||v.isPending,children:(0,lo.__)("Generate Again","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(by,{variant:"primary",disabled:h.isPending||m.length===0||v.isPending,onClick:()=>{a.onChange(m[b]);o()},children:(0,lo.__)("Use This","tutor-pro")})]})})]})})};/* export default */const wg=wm;var wb={container:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;gap:",ik/* .spacing["16"] */.YK["16"],";"),fieldsWrapper:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;textarea{padding-bottom:",ik/* .spacing["40"] */.YK["40"]," !important;}"),footer:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";display:flex;align-items:center;justify-content:end;gap:",ik/* .spacing["10"] */.YK["10"],";box-shadow:0px 1px 0px 0px #e4e5e7 inset;button{width:fit-content;}"),pageInfo:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";& > span{font-weight:",ik/* .fontWeight.medium */.Wy.medium,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}"),inspireButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",iS/* .typography.small */.I.small(),";position:absolute;height:28px;bottom:",ik/* .spacing["12"] */.YK["12"],";left:",ik/* .spacing["12"] */.YK["12"],";border:1px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";color:",ik/* .colorTokens.text.brand */.I6.text.brand,";padding-inline:",ik/* .spacing["12"] */.YK["12"],";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";&:hover{background-color:",ik/* .colorTokens.background.brand */.I6.background.brand,";color:",ik/* .colorTokens.text.white */.I6.text.white,";}&:focus-visible{outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:disabled{background-color:",ik/* .colorTokens.background.disable */.I6.background.disable,";color:",ik/* .colorTokens.text.disable */.I6.text.disable,";}"),navigation:/*#__PURE__*/(0,c/* .css */.AH)("margin-left:-",ik/* .spacing["8"] */.YK["8"],";display:flex;align-items:center;"),content:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";height:180px;overflow-y:auto;background-color:",ik/* .colorTokens.background.magicAi["default"] */.I6.background.magicAi["default"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";padding:",ik/* .spacing["6"] */.YK["6"]," ",ik/* .spacing["12"] */.YK["12"],";color:",ik/* .colorTokens.text.magicAi */.I6.text.magicAi,";"),actionBar:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;"),otherActions:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;gap:",ik/* .spacing["10"] */.YK["10"],";flex-wrap:wrap;& > button{width:fit-content;}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/ProIdentifierModal.tsx
var w_={title:/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[(0,lo.__)("Upgrade to Tutor LMS Pro today and experience the power of ","tutor-pro"),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:aR/* .styleUtils.aiGradientText */.x.aiGradientText,children:(0,lo.__)("AI Studio","tutor-pro")})]}),message:(0,lo.__)("Upgrade your plan to access the AI feature","tutor-pro"),featuresTitle:(0,lo.__)("Don’t miss out on this game-changing feature!","tutor-pro"),features:[(0,lo.__)("Generate a complete course outline in seconds!","tutor-pro"),(0,lo.__)("Let the AI Studio create Quizzes on your behalf and give your brain a well-deserved break.","tutor-pro"),(0,lo.__)("Generate images, customize backgrounds, and even remove unwanted objects with ease.","tutor-pro"),(0,lo.__)("Say goodbye to typos and grammar errors with AI-powered copy editing.","tutor-pro")],footer:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{onClick:()=>window.open(bA/* ["default"].TUTOR_PRICING_PAGE */.A.TUTOR_PRICING_PAGE,"_blank","noopener"),icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"crown",width:24,height:24}),children:(0,lo.__)("Get Tutor LMS Pro","tutor-pro")})};var wy=e=>{var{title:r=w_.title,message:n=w_.message,featuresTitle:i=w_.featuresTitle,features:o=w_.features,closeModal:a,image:s,image2x:l,footer:c=w_.footer}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)(mI,{onClose:a,entireHeader:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:ww.message,children:n}),maxWidth:496,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:ww.wrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:r,children:/*#__PURE__*/(0,t/* .jsx */.Y)("h4",{css:ww.title,children:r})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:s,children:/*#__PURE__*/(0,t/* .jsx */.Y)("img",{css:ww.image,src:s,alt:typeof r==="string"?r:(0,lo.__)("Illustration","tutor-pro"),srcSet:l?"".concat(s," ").concat(l," 2x"):undefined})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:i,children:/*#__PURE__*/(0,t/* .jsx */.Y)("h6",{css:ww.featuresTiTle,children:i})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:o.length,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:ww.features,children:/*#__PURE__*/(0,t/* .jsx */.Y)(bF,{each:o,children:(e,r)=>/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:ww.feature,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"materialCheck",width:20,height:20,style:ww.checkIcon}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:e})]},r)})})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:c,children:c})]})})};/* export default */const wx=wy;var ww={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("padding:0 ",ik/* .spacing["24"] */.YK["24"]," ",ik/* .spacing["32"] */.YK["32"]," ",ik/* .spacing["24"] */.YK["24"],";",aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["16"] */.YK["16"],";"),message:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";padding-left:",ik/* .spacing["8"] */.YK["8"],";padding-top:",ik/* .spacing["24"] */.YK["24"],";padding-bottom:",ik/* .spacing["4"] */.YK["4"],";"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.heading6 */.I.heading6("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";text-wrap:pretty;"),image:/*#__PURE__*/(0,c/* .css */.AH)("height:270px;width:100%;object-fit:cover;object-position:center;border-radius:",ik/* .borderRadius["8"] */.Vq["8"],";"),featuresTiTle:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";text-wrap:pretty;"),features:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["4"] */.YK["4"],";padding-right:",ik/* .spacing["48"] */.YK["48"],";"),feature:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";gap:",ik/* .spacing["12"] */.YK["12"],";",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";span{text-wrap:pretty;}"),checkIcon:/*#__PURE__*/(0,c/* .css */.AH)("flex-shrink:0;color:",ik/* .colorTokens.text.success */.I6.text.success,";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormSwitch.tsx
var wA=e=>{var{field:r,fieldState:n,label:i,disabled:o,loading:a,labelPosition:s="left",helpText:l,isHidden:c,labelCss:u,onChange:d}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{label:i,field:r,fieldState:n,loading:a,helpText:l,isHidden:c,isInlineLabel:true,children:e=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wI.wrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(mg,(0,ep._)((0,ef._)({},r,e),{disabled:o,checked:r.value,labelCss:u,labelPosition:s,onChange:()=>{r.onChange(!r.value);d===null||d===void 0?void 0:d(!r.value)}}))})}})};/* export default */const wE=bk(wA);var wI={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;gap:",ik/* .spacing["40"] */.YK["40"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/utils/validation.ts
var wk=()=>({required:{value:true,message:(0,lo.__)("This field is required","tutor-pro")}});var wS=e=>{var{maxValue:t,message:r}=e;return{maxLength:{value:t,message:r||__("Max. value should be ".concat(t),"tutor-pro")}}};var wO=()=>({validate:e=>{if((e===null||e===void 0?void 0:e.amount)===undefined){return __("The field is required","tutor-pro")}return undefined}});var wT=e=>{if(!isValid(new Date(e||""))){return __("Invalid date entered!","tutor-pro")}return undefined};var wC=e=>({validate:t=>{if(t&&e<t.length){return __("Maximum ".concat(e," character supported"),"tutor-pro")}return undefined}});var wR=e=>{if(!e){return undefined}var t=__("Invalid time entered!","tutor-pro");var[r,n]=e.split(":");if(!r||!n){return t}var[i,o]=n.split(" ");if(!i||!o){return t}if(r.length!==2||i.length!==2){return t}if(Number(r)<1||Number(r)>12){return t}if(Number(i)<0||Number(i)>59){return t}if(!["am","pm"].includes(o.toLowerCase())){return t}return undefined};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/SetupOpenAiModal.tsx
function wD(){var e=(0,eh._)(["\n      padding: ",";\n      padding-top: ",";\n    "]);wD=function t(){return e};return e}var wF,wY;var wM=((wF=bA/* .tutorConfig.settings */.P.settings)===null||wF===void 0?void 0:wF.chatgpt_enable)==="on";var wj=(wY=bA/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||wY===void 0?void 0:wY.includes(ak/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var wP=e=>{var{closeModal:r,image:i,image2x:o}=e;var a=bX({defaultValues:{openAIApiKey:"",enable_open_ai:wM},shouldFocusError:true});var s=wh();var l=e=>mG(function*(){var t=yield s.mutateAsync({chatgpt_api_key:e.openAIApiKey,chatgpt_enable:e.enable_open_ai?1:0});if(t.status_code===200){r({action:"CONFIRM"});window.location.reload()}})();(0,n.useEffect)(()=>{a.setFocus("openAIApiKey");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,t/* .jsx */.Y)(mI,{onClose:()=>r({action:"CLOSE"}),title:wj?(0,lo.__)("Set OpenAI API key","tutor-pro"):undefined,entireHeader:wj?undefined:/*#__PURE__*/(0,t/* .jsx */.Y)(t/* .Fragment */.FK,{children:" "}),maxWidth:560,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wN.wrapper({isCurrentUserAdmin:wj}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:wj,fallback:/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("img",{css:wN.image,src:i,srcSet:o?"".concat(i," 1x, ").concat(o," 2x"):"".concat(i," 1x"),alt:(0,lo.__)("Connect API KEY","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wN.message,children:(0,lo.__)("API is not connected","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:wN.title,children:(0,lo.__)("Please, ask your Admin to connect the API with Tutor LMS Pro.","tutor-pro")})]})]}),children:/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("form",{css:wN.formWrapper,onSubmit:a.handleSubmit(l),children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wN.infoText,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{dangerouslySetInnerHTML:{/* translators: %1$s and %2$s are opening and closing anchor tags for the "OpenAI User settings" link */__html:(0,lo.sprintf)((0,lo.__)("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-pro"),'<a href="'.concat(bA/* ["default"].CHATGPT_PLATFORM_URL */.A.CHATGPT_PLATFORM_URL,'" target="_blank" rel="noopener noreferrer">'),"</a>")}}),/*#__PURE__*/(0,t/* .jsx */.Y)(lc,{type:"info",icon:"warning",children:(0,lo.__)("The page will reload after submission. Make sure to save the course information.","tutor-pro")})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{name:"openAIApiKey",control:a.control,rules:wk(),render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(wG,(0,ep._)((0,ef._)({},e),{type:"password",isPassword:true,label:(0,lo.__)("OpenAI API key","tutor-pro"),placeholder:(0,lo.__)("Enter your OpenAI API key","tutor-pro")}))}),/*#__PURE__*/(0,t/* .jsx */.Y)(gb,{name:"enable_open_ai",control:a.control,render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(wE,(0,ep._)((0,ef._)({},e),{label:(0,lo.__)("Enable OpenAI","tutor-pro")}))})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:wN.formFooter,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{onClick:()=>r({action:"CLOSE"}),variant:"text",size:"small",children:(0,lo.__)("Cancel","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{size:"small",onClick:a.handleSubmit(l),loading:s.isPending,children:(0,lo.__)("Save","tutor-pro")})]})]})})})})};/* export default */const wL=wP;var wN={wrapper:e=>{var{isCurrentUserAdmin:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["20"] */.YK["20"],";",!t&&(0,c/* .css */.AH)(wD(),ik/* .spacing["24"] */.YK["24"],ik/* .spacing["6"] */.YK["6"]))},formWrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["20"] */.YK["20"],";padding:",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["16"] */.YK["16"]," 0 ",ik/* .spacing["16"] */.YK["16"],";"),infoText:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";",aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["8"] */.YK["8"],";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";a{",aR/* .styleUtils.resetButton */.x.resetButton,"      color:",ik/* .colorTokens.text.brand */.I6.text.brand,";}"),formFooter:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:flex-end;gap:",ik/* .spacing["16"] */.YK["16"],";border-top:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";padding:",ik/* .spacing["16"] */.YK["16"],";"),image:/*#__PURE__*/(0,c/* .css */.AH)("height:310px;width:100%;object-fit:cover;object-position:center;border-radius:",ik/* .borderRadius["8"] */.Vq["8"],";"),message:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.heading4 */.I.heading4("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";margin-top:",ik/* .spacing["4"] */.YK["4"],";text-wrap:pretty;")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/pro-placeholders/generate-text.webp
const wH=r.p+"images/generate-text-269f7e17.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/pro-placeholders/generate-text-2x.webp
const wV=r.p+"images/generate-text-2x-45983f4c.webp";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormInput.tsx
function wU(){var e=(0,eh._)(["\n        height: 32px;\n        padding: "," ",";\n      "]);wU=function t(){return e};return e}function wK(){var e=(0,eh._)(["\n      svg {\n        color: ",";\n      }\n    "]);wK=function t(){return e};return e}var wB;var wz=!!bA/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var wq=(wB=bA/* .tutorConfig.settings */.P.settings)===null||wB===void 0?void 0:wB.chatgpt_key_exist;var wW=e=>{var{size:r="regular",label:i,type:o="text",maxLimit:a,field:s,fieldState:l,disabled:c,readOnly:u,loading:d,placeholder:f,helpText:p,onChange:h,onKeyDown:v,isHidden:m,isClearable:g=false,isSecondary:b=false,removeBorder:_,dataAttribute:y,isInlineLabel:x=false,isPassword:w=false,style:A,formFieldWrapperCss:E,inputContainerCss:I,selectOnFocus:k=false,autoFocus:S=false,generateWithAi:O=false,isMagicAi:T=false,allowNegative:C=false,onClickAiButton:R}=e;var[D,F]=(0,n.useState)(o);var{showModal:Y}=i7();var M=(0,n.useRef)(null);var j;var P=(j=s.value)!==null&&j!==void 0?j:"";var L=undefined;if(D==="number"){P=(0,iV/* .parseNumberOnly */.TW)("".concat(P),C).replace(/(\..*)\./g,"$1")}if(a){L={maxLimit:a,inputCharacter:P.toString().length}}var N=(0,ef._)({},(0,iH/* .isDefined */.O9)(y)&&{[y]:true});var H=()=>{if(!wz){Y({component:wx,props:{image:wH,image2x:wV}})}else if(!wq){Y({component:wL,props:{image:wH,image2x:wV}})}else{Y({component:wg,isMagicAi:true,props:{title:(0,lo.__)("AI Studio","tutor-pro"),icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),characters:120,field:s,fieldState:l,format:"title",is_html:false,fieldLabel:(0,lo.__)("Create a Compelling Title","tutor-pro"),fieldPlaceholder:(0,lo.__)("Describe the main focus of your course in a few words","tutor-pro")}});R===null||R===void 0?void 0:R()}};return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{label:i,field:s,fieldState:l,disabled:c,readOnly:u,loading:d,placeholder:f,helpText:p,isHidden:m,characterCount:L,isSecondary:b,removeBorder:_,isInlineLabel:x,inputStyle:A,wrapperCss:E,inputContainerCss:I,generateWithAi:O,onClickAiButton:H,isMagicAi:T,children:e=>{return/*#__PURE__*/(0,t/* .jsx */.Y)(t/* .Fragment */.FK,{children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:w$.container(g||w),children:[/*#__PURE__*/(0,t/* .jsx */.Y)("input",(0,ep._)((0,ef._)({},s,e,N),{css:[e.css,w$.input(r)],type:D==="number"?"text":D,value:P,autoFocus:S,onChange:e=>{var{value:t}=e.target;var r=D==="number"?(0,iV/* .parseNumberOnly */.TW)(t):t;s.onChange(r);if(h){h(r)}},onClick:e=>{e.stopPropagation()},onKeyDown:e=>{e.stopPropagation();v===null||v===void 0?void 0:v(e.key)},autoComplete:"off",ref:e=>{s.ref(e);// @ts-ignore
M.current=e;// this is not ideal but it is the only way to set ref to the input element
},onFocus:()=>{if(!k||!M.current){return}M.current.select()}})),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:w,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{isIconOnly:true,variant:"text",size:"small",onClick:()=>F(e=>e==="password"?"text":"password"),icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"eye",width:24,height:24}),"aria-label":(0,lo.__)("Show/Hide Password","tutor-pro"),buttonCss:w$.eyeButton({type:D})})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:g&&!!s.value&&D!=="password",children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{isIconOnly:true,variant:"text",size:"small",onClick:()=>s.onChange(""),buttonCss:aR/* .styleUtils.inputClearButton */.x.inputClearButton,icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"cross",width:24,height:24}),"aria-label":(0,lo.__)("Clear","tutor-pro")})})]})})}})};/* export default */const wG=bk(wW);var w$={input:e=>/*#__PURE__*/(0,c/* .css */.AH)("&.tutor-input-field:not(textarea){min-height:auto;",e==="small"&&(0,c/* .css */.AH)(wU(),ik/* .spacing["6"] */.YK["6"],ik/* .spacing["12"] */.YK["12"]),"}"),container:e=>/*#__PURE__*/(0,c/* .css */.AH)("position:relative;display:flex;input{&.tutor-input-field{",e&&"padding-right: ".concat(ik/* .spacing["36"] */.YK["36"],";"),";}}"),eyeButton:e=>{var{type:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.inputClearButton */.x.inputClearButton,";",t!=="password"&&(0,c/* .css */.AH)(wK(),ik/* .colorTokens.icon.brand */.I6.icon.brand))}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormInputWithContent.tsx
function wQ(){var e=(0,eh._)(["\n      border: 1px solid ",";\n      border-radius: ",";\n      box-shadow: ",";\n      background-color: ",";\n    "]);wQ=function t(){return e};return e}function wX(){var e=(0,eh._)(["\n      border-color: ",";\n      background-color: ",";\n    "]);wX=function t(){return e};return e}function wJ(){var e=(0,eh._)(["\n        border-color: ",";\n      "]);wJ=function t(){return e};return e}function wZ(){var e=(0,eh._)(["\n          padding-",": ",";\n        "]);wZ=function t(){return e};return e}function w0(){var e=(0,eh._)(["\n            padding-",": ",";\n          "]);w0=function t(){return e};return e}function w1(){var e=(0,eh._)(["\n          font-size: ",";\n          font-weight: ",";\n          height: 34px;\n          ",";\n        "]);w1=function t(){return e};return e}function w2(){var e=(0,eh._)(["\n            padding-",": ",";\n          "]);w2=function t(){return e};return e}function w6(){var e=(0,eh._)(["\n          font-size: ",";\n          height: 32px;\n          ",";\n        "]);w6=function t(){return e};return e}function w4(){var e=(0,eh._)(["\n      ","\n    "]);w4=function t(){return e};return e}function w5(){var e=(0,eh._)(["\n      min-width: 32px;\n      height: 32px;\n      padding-inline: ",";\n    "]);w5=function t(){return e};return e}function w3(){var e=(0,eh._)(["\n      border-right: 1px solid ",";\n    "]);w3=function t(){return e};return e}function w8(){var e=(0,eh._)(["\n      ","\n    "]);w8=function t(){return e};return e}function w9(){var e=(0,eh._)(["\n      height: 32px;\n      min-width: 32px;\n      padding-inline: ",";\n    "]);w9=function t(){return e};return e}function w7(){var e=(0,eh._)(["\n      border-left: 1px solid ",";\n    "]);w7=function t(){return e};return e}var Ae=e=>{var{label:r,content:i,contentPosition:o="left",showVerticalBar:a=true,size:s="regular",type:l="text",field:c,fieldState:u,disabled:d,readOnly:f,loading:p,placeholder:h,helpText:v,onChange:m,onKeyDown:g,isHidden:b,wrapperCss:_,contentCss:y,removeBorder:x=false,selectOnFocus:w=false,isInlineLabel:A=false}=e;var E=(0,n.useRef)(null);return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{label:r,field:c,fieldState:u,disabled:d,readOnly:f,loading:p,placeholder:h,helpText:v,isHidden:b,removeBorder:x,isInlineLabel:A,children:e=>{var{css:r}=e,n=(0,iO._)(e,["css"]);var d;return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:[Ar.inputWrapper(!!u.error,x),_],children:[o==="left"&&/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:[Ar.inputLeftContent(a,s),y],children:i}),/*#__PURE__*/(0,t/* .jsx */.Y)("input",(0,ep._)((0,ef._)({},c,n),{type:"text",value:(d=c.value)!==null&&d!==void 0?d:"",onChange:e=>{var t=l==="number"?e.target.value.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"$1"):e.target.value;c.onChange(t);if(m){m(t)}},onKeyDown:e=>g===null||g===void 0?void 0:g(e.key),css:[r,Ar.input(o,a,s)],autoComplete:"off",ref:e=>{c.ref(e);// @ts-ignore
E.current=e;// this is not ideal but it is the only way to set ref to the input element
},onFocus:()=>{if(!w||!E.current){return}E.current.select()},"data-input":true})),o==="right"&&/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:[Ar.inputRightContent(a,s),y],children:i})]})}})};/* export default */const At=bk(Ae);var Ar={inputWrapper:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;",!t&&(0,c/* .css */.AH)(wQ(),ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],ik/* .borderRadius["6"] */.Vq["6"],ik/* .shadow.input */.r7.input,ik/* .colorTokens.background.white */.I6.background.white)," ",e&&(0,c/* .css */.AH)(wX(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger,ik/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail),";&:focus-within{",aR/* .styleUtils.inputFocus */.x.inputFocus,";",e&&(0,c/* .css */.AH)(wJ(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger),"}"),input:(e,t,r)=>/*#__PURE__*/(0,c/* .css */.AH)("&.tutor-input-field:not(textarea){",iS/* .typography.body */.I.body(),";border:none;box-shadow:none;background-color:transparent;padding-",e,":0;",t&&(0,c/* .css */.AH)(wZ(),e,ik/* .spacing["10"] */.YK["10"]),";",r==="large"&&(0,c/* .css */.AH)(w1(),ik/* .fontSize["24"] */.J["24"],ik/* .fontWeight.medium */.Wy.medium,t&&(0,c/* .css */.AH)(w0(),e,ik/* .spacing["12"] */.YK["12"]))," ",r==="small"&&(0,c/* .css */.AH)(w6(),ik/* .fontSize["16"] */.J["16"],t&&(0,c/* .css */.AH)(w2(),e,ik/* .spacing["4"] */.YK["4"])),"  \n      &:focus{box-shadow:none;outline:none;}}"),inputLeftContent:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small()," ",aR/* .styleUtils.flexCenter */.x.flexCenter(),"    height:40px;min-width:48px;color:",ik/* .colorTokens.icon.subdued */.I6.icon.subdued,";padding-inline:",ik/* .spacing["12"] */.YK["12"],";",t==="large"&&(0,c/* .css */.AH)(w4(),iS/* .typography.body */.I.body())," ",t==="small"&&(0,c/* .css */.AH)(w5(),ik/* .spacing["4"] */.YK["4"])," ",e&&(0,c/* .css */.AH)(w3(),ik/* .colorTokens.stroke["default"] */.I6.stroke["default"])),inputRightContent:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small()," ",aR/* .styleUtils.flexCenter */.x.flexCenter(),"    height:40px;min-width:48px;color:",ik/* .colorTokens.icon.subdued */.I6.icon.subdued,";padding-inline:",ik/* .spacing["12"] */.YK["12"],";",t==="large"&&(0,c/* .css */.AH)(w8(),iS/* .typography.body */.I.body())," ",t==="small"&&(0,c/* .css */.AH)(w9(),ik/* .spacing["4"] */.YK["4"])," ",e&&(0,c/* .css */.AH)(w7(),ik/* .colorTokens.stroke["default"] */.I6.stroke["default"]))};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormInputWithPresets.tsx
function An(){var e=(0,eh._)(["\n      border: 1px solid ",";\n      border-radius: ",";\n      box-shadow: ",";\n      background-color: ",";\n    "]);An=function t(){return e};return e}function Ai(){var e=(0,eh._)(["\n      border-color: ",";\n      background-color: ",";\n    "]);Ai=function t(){return e};return e}function Ao(){var e=(0,eh._)(["\n        border-color: ",";\n      "]);Ao=function t(){return e};return e}function Aa(){var e=(0,eh._)(["\n          padding-",": ",";\n        "]);Aa=function t(){return e};return e}function As(){var e=(0,eh._)(["\n              padding-",": ",";\n            "]);As=function t(){return e};return e}function Al(){var e=(0,eh._)(["\n        font-size: ",";\n        font-weight: ",";\n        height: 34px;\n        ",";\n      "]);Al=function t(){return e};return e}function Ac(){var e=(0,eh._)(["\n          padding-",": ",";\n        "]);Ac=function t(){return e};return e}function Au(){var e=(0,eh._)(["\n        height: 32px;\n        ",";\n      "]);Au=function t(){return e};return e}function Ad(){var e=(0,eh._)(["\n      min-width: 200px;\n    "]);Ad=function t(){return e};return e}function Af(){var e=(0,eh._)(["\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    "]);Af=function t(){return e};return e}function Ap(){var e=(0,eh._)(["\n      ","\n    "]);Ap=function t(){return e};return e}function Ah(){var e=(0,eh._)(["\n      min-width: 40px;\n      height: 32px;\n      padding-inline: ",";\n    "]);Ah=function t(){return e};return e}function Av(){var e=(0,eh._)(["\n      border-right: 1px solid ",";\n    "]);Av=function t(){return e};return e}function Am(){var e=(0,eh._)(["\n      ","\n    "]);Am=function t(){return e};return e}function Ag(){var e=(0,eh._)(["\n      min-width: 40px;\n      height: 32px;\n      padding-inline: ",";\n    "]);Ag=function t(){return e};return e}function Ab(){var e=(0,eh._)(["\n      border-left: 1px solid ",";\n    "]);Ab=function t(){return e};return e}var A_=e=>{var{field:t,fieldState:r,content:n,contentPosition:i="left",showVerticalBar:o=true,type:a="text",size:s="regular",label:l,placeholder:c="",disabled:u,readOnly:d,loading:f,helpText:p,removeOptionsMinWidth:h=true,onChange:v,presetOptions:m=[],selectOnFocus:g=false,wrapperCss:b,contentCss:_,formFieldWrapperCss:y,removeBorder:x=false}=e;var w;var A=(w=t.value)!==null&&w!==void 0?w:"";var E=useRef(null);var I=useRef(null);var[k,S]=useState(false);return /*#__PURE__*/_jsx(FormFieldWrapper,{fieldState:r,field:t,label:l,disabled:u,readOnly:d,loading:f,helpText:p,removeBorder:x,wrapperCss:y,placeholder:c,children:e=>{var{css:l}=e,c=_object_without_properties(e,["css"]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("div",{css:[Ax.inputWrapper(!!r.error,x),b],ref:I,children:[n&&i==="left"&&/*#__PURE__*/_jsx("div",{css:[Ax.inputLeftContent(o,s),_],children:n}),/*#__PURE__*/_jsx("input",_object_spread_props(_object_spread({},c),{css:[l,Ax.input(i,o,s)],onClick:()=>S(true),autoComplete:"off",readOnly:d,ref:e=>{t.ref(e);// @ts-ignore
E.current=e;// this is not ideal but it is the only way to set ref to the input element
},onFocus:()=>{if(!g||!E.current){return}E.current.select()},value:A,onChange:e=>{var r=a==="number"?e.target.value.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"$1"):e.target.value;t.onChange(r);if(v){v(r)}},"data-input":true})),n&&i==="right"&&/*#__PURE__*/_jsx("div",{css:Ax.inputRightContent(o,s),children:n})]}),/*#__PURE__*/_jsx(Show,{when:m.length>0,children:/*#__PURE__*/_jsx(Popover,{triggerRef:I,isOpen:k,closePopover:()=>S(false),animationType:AnimationType.slideDown,children:/*#__PURE__*/_jsx("ul",{css:[Ax.options(h)],children:m.map(e=>/*#__PURE__*/_jsx("li",{css:Ax.optionItem({isSelected:e.value===t.value}),children:/*#__PURE__*/_jsxs("button",{type:"button",css:Ax.label,onClick:()=>{t.onChange(e.value);v===null||v===void 0?void 0:v(e.value);S(false)},children:[/*#__PURE__*/_jsx(Show,{when:e.icon,children:/*#__PURE__*/_jsx(SVGIcon,{name:e.icon,width:32,height:32})}),/*#__PURE__*/_jsx("span",{children:e.label})]})},String(e.value)))})})})]})}})};/* export default */const Ay=/* unused pure expression or super */null&&A_;var Ax={mainWrapper:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;"),inputWrapper:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;",!t&&(0,c/* .css */.AH)(An(),ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],ik/* .borderRadius["6"] */.Vq["6"],ik/* .shadow.input */.r7.input,ik/* .colorTokens.background.white */.I6.background.white)," ",e&&(0,c/* .css */.AH)(Ai(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger,ik/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail),";&:focus-within{",aR/* .styleUtils.inputFocus */.x.inputFocus,";",e&&(0,c/* .css */.AH)(Ao(),ik/* .colorTokens.stroke.danger */.I6.stroke.danger),"}"),input:(e,t,r)=>/*#__PURE__*/(0,c/* .css */.AH)("&.tutor-input-field:not(textarea){",iS/* .typography.body */.I.body(),";border:none;box-shadow:none;background-color:transparent;","padding-".concat(e),":0;",t&&(0,c/* .css */.AH)(Aa(),e,ik/* .spacing["10"] */.YK["10"]),";",r==="large"&&(0,c/* .css */.AH)(Al(),ik/* .fontSize["24"] */.J["24"],ik/* .fontWeight.medium */.Wy.medium,t&&(0,c/* .css */.AH)(As(),e,ik/* .spacing["12"] */.YK["12"]))," ",r==="small"&&(0,c/* .css */.AH)(Au(),t&&(0,c/* .css */.AH)(Ac(),e,ik/* .spacing["4"] */.YK["4"])),"      &:focus{box-shadow:none;outline:none;}}"),label:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";width:100%;height:100%;display:flex;align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";margin:0 ",ik/* .spacing["12"] */.YK["12"],";padding:",ik/* .spacing["6"] */.YK["6"]," 0;text-align:left;line-height:",ik/* .lineHeight["24"] */.K_["24"],";word-break:break-all;cursor:pointer;span{flex-shrink:0;}"),options:e=>/*#__PURE__*/(0,c/* .css */.AH)("z-index:",ik/* .zIndex.dropdown */.fE.dropdown,";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";list-style-type:none;box-shadow:",ik/* .shadow.popover */.r7.popover,";padding:",ik/* .spacing["4"] */.YK["4"]," 0;margin:0;max-height:500px;border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";",aR/* .styleUtils.overflowYAuto */.x.overflowYAuto,";",!e&&(0,c/* .css */.AH)(Ad())),optionItem:e=>{var{isSelected:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(iS/* .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:pointer;&:hover{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";}",t&&(0,c/* .css */.AH)(Af(),ik/* .colorTokens.background.active */.I6.background.active,ik/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],ik/* .borderRadius["6"] */.Vq["6"],ik/* .borderRadius["6"] */.Vq["6"]))},inputLeftContent:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small()," ",aR/* .styleUtils.flexCenter */.x.flexCenter(),"    height:40px;min-width:48px;color:",ik/* .colorTokens.icon.subdued */.I6.icon.subdued,";padding-inline:",ik/* .spacing["12"] */.YK["12"],";",t==="large"&&(0,c/* .css */.AH)(Ap(),iS/* .typography.body */.I.body())," ",t==="small"&&(0,c/* .css */.AH)(Ah(),ik/* .spacing["6"] */.YK["6"])," ",e&&(0,c/* .css */.AH)(Av(),ik/* .colorTokens.stroke["default"] */.I6.stroke["default"])),inputRightContent:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small()," ",aR/* .styleUtils.flexCenter */.x.flexCenter(),"    height:40px;min-width:48px;color:",ik/* .colorTokens.icon.subdued */.I6.icon.subdued,";padding-inline:",ik/* .spacing["12"] */.YK["12"],";",t==="large"&&(0,c/* .css */.AH)(Am(),iS/* .typography.body */.I.body())," ",t==="small"&&(0,c/* .css */.AH)(Ag(),ik/* .spacing["6"] */.YK["6"])," ",e&&(0,c/* .css */.AH)(Ab(),ik/* .colorTokens.stroke["default"] */.I6.stroke["default"]))};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/usePrefersReducedMotion.ts
var Aw="data-tutor-motion";var AA=()=>{if(typeof document==="undefined"){return null}return document.documentElement.getAttribute(Aw)};var AE=()=>{if(typeof window==="undefined"||!window.matchMedia){return false}return window.matchMedia("(prefers-reduced-motion: reduce)").matches};var AI=()=>{var e=AA();// Explicit override always wins.
if(e==="reduce")return true;// 'auto' (or unset) defers to the OS/browser setting.
return AE()};/**
 * Resolves whether motion should be reduced, honoring:
 * - data-tutor-motion="reduce" on <html>  -> always reduce
 * - data-tutor-motion="auto" (or absent)  -> defer to prefers-reduced-motion
 */var Ak=()=>{var[e,t]=useState(AI);useEffect(()=>{if(typeof window==="undefined"||!window.matchMedia){return}var e=window.matchMedia("(prefers-reduced-motion: reduce)");var r=()=>t(AI());r();e.addEventListener("change",r);// In case data-tutor-motion is toggled at runtime (e.g. a settings panel)
var n=new MutationObserver(r);n.observe(document.documentElement,{attributes:true,attributeFilter:[Aw]});return()=>{e.removeEventListener("change",r);n.disconnect()}},[]);return e};// EXTERNAL MODULE: ./node_modules/.pnpm/style-loader@4.0.0_webpack@5.101.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
var AS=r(6615);var AO=/*#__PURE__*/r.n(AS);// EXTERNAL MODULE: ./node_modules/.pnpm/style-loader@4.0.0_webpack@5.101.1/node_modules/style-loader/dist/runtime/styleDomAPI.js
var AT=r(8612);var AC=/*#__PURE__*/r.n(AT);// EXTERNAL MODULE: ./node_modules/.pnpm/style-loader@4.0.0_webpack@5.101.1/node_modules/style-loader/dist/runtime/insertBySelector.js
var AR=r(8840);var AD=/*#__PURE__*/r.n(AR);// EXTERNAL MODULE: ./node_modules/.pnpm/style-loader@4.0.0_webpack@5.101.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
var AF=r(879);var AY=/*#__PURE__*/r.n(AF);// EXTERNAL MODULE: ./node_modules/.pnpm/style-loader@4.0.0_webpack@5.101.1/node_modules/style-loader/dist/runtime/insertStyleElement.js
var AM=r(9619);var Aj=/*#__PURE__*/r.n(AM);// EXTERNAL MODULE: ./node_modules/.pnpm/style-loader@4.0.0_webpack@5.101.1/node_modules/style-loader/dist/runtime/styleTagTransform.js
var AP=r(1536);var AL=/*#__PURE__*/r.n(AP);// EXTERNAL MODULE: ./node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.5_@swc+helpers@0.5.17__webpack@5.101.1/node_modules/css-loader/dist/cjs.js!../tutor/node_modules/.pnpm/react-day-picker@9.11.3_react@18.3.1/node_modules/react-day-picker/src/style.css
var AN=r(4634);// CONCATENATED MODULE: ../tutor/node_modules/.pnpm/react-day-picker@9.11.3_react@18.3.1/node_modules/react-day-picker/src/style.css
var AH={};AH.styleTagTransform=AL();AH.setAttributes=AY();AH.insert=AD().bind(null,"head");AH.domAPI=AC();AH.insertStyleElement=Aj();var AV=AO()(AN/* ["default"] */.A,AH);/* export default */const AU=AN/* ["default"] */.A&&AN/* ["default"].locals */.A.locals?AN/* ["default"].locals */.A.locals:undefined;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormDateInput.tsx
// Create DayPicker formatters based on WordPress locale
var AK=()=>{if(typeof window==="undefined"||!window.wp||!window.wp.date){return}var{format:e}=wp.date;return{formatMonthDropdown:t=>e("F",t),formatMonthCaption:t=>e("F",t),formatCaption:t=>e("F",t),formatWeekdayName:t=>e("D",t)}};var AB=e=>{if(!e)return undefined;return isValid(new Date(e))?new Date(e.length===10?e+"T00:00:00":e):undefined};var Az=e=>{var{label:t,field:r,fieldState:n,disabled:i,disabledBefore:o,disabledAfter:a,loading:s,placeholder:l,helpText:c,isClearable:u=true,onChange:d,dateFormat:f=DateFormats.monthDayYear}=e;var p=usePrefersReducedMotion();var h=useRef(null);var[v,m]=useState(false);var g=AB(r.value);var b=typeof window!=="undefined"&&window.wp&&window.wp.date;var _=g?b?window.wp.date.format("F j, Y",g):format(g,f):"";var{triggerRef:y,position:x,popoverRef:w}=usePortalPopover({isOpen:v,placement:POPOVER_PLACEMENTS.BOTTOM_LEFT});var A=()=>{var e;m(false);(e=h.current)===null||e===void 0?void 0:e.focus()};var E=AB(o);var I=AB(a);return /*#__PURE__*/_jsx(FormFieldWrapper,{label:t,field:r,fieldState:n,disabled:i,loading:s,placeholder:l,helpText:c,children:e=>{var{css:t}=e,n=_object_without_properties(e,["css"]);return /*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsxs("div",{css:AW.wrapper,ref:y,children:[/*#__PURE__*/_jsx("input",_object_spread_props(_object_spread({},n),{css:[t,AW.input],title:_,ref:e=>{r.ref(e);// @ts-ignore
h.current=e},type:"text",value:_,onClick:e=>{e.stopPropagation();m(e=>!e)},onKeyDown:e=>{if(e.key==="Enter"){e.preventDefault();m(e=>!e)}},autoComplete:"off","data-input":true})),/*#__PURE__*/_jsx(SVGIcon,{name:"calendarLine",width:30,height:32,style:AW.icon}),u&&r.value&&/*#__PURE__*/_jsx(Button,{isIconOnly:true,"aria-label":__("Clear","tutor-pro"),size:"small",variant:"text",buttonCss:styleUtils.inputClearButton,onClick:()=>{r.onChange("")},icon:/*#__PURE__*/_jsx(SVGIcon,{name:"times",width:12,height:12})})]}),/*#__PURE__*/_jsx(Portal,{isOpen:v,onClickOutside:A,onEscape:A,children:/*#__PURE__*/_jsx("div",{css:AW.pickerWrapper,style:{left:x.left,top:x.top},ref:w,children:/*#__PURE__*/_jsx(DayPicker,{dir:isRTL?"rtl":"ltr",animate:!p,mode:"single",formatters:AK(),disabled:[!!E&&{before:E},!!I&&{after:I}],selected:g,onSelect:e=>{if(e){var t=format(e,DateFormats.yearMonthDay);r.onChange(t);A();if(d){d(t)}}},showOutsideDays:true,captionLayout:"dropdown",autoFocus:true,defaultMonth:g||new Date,startMonth:E||new Date(new Date().getFullYear()-10,0),endMonth:I||new Date(new Date().getFullYear()+10,11),weekStartsOn:b?window.wp.date.getSettings().l10n.startOfWeek:0})})})]})}})};/* export default */const Aq=/* unused pure expression or super */null&&Az;var AW={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;&:hover,&:focus-within{& > button{opacity:1;}}"),input:/*#__PURE__*/(0,c/* .css */.AH)("&[data-input]{padding-left:",ik/* .spacing["40"] */.YK["40"],";}"),icon:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;top:50%;left:",ik/* .spacing["8"] */.YK["8"],";transform:translateY(-50%);color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";"),pickerWrapper:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body("regular"),";position:absolute;background-color:",ik/* .colorTokens.background.white */.I6.background.white,";box-shadow:",ik/* .shadow.popover */.r7.popover,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";.rdp-root{--rdp-day-height:40px;--rdp-day-width:40px;--rdp-day_button-height:40px;--rdp-day_button-width:40px;--rdp-nav-height:40px;--rdp-today-color:",ik/* .colorTokens.text.title */.I6.text.title,";--rdp-caption-font-size:",ik/* .fontSize["18"] */.J["18"],";--rdp-accent-color:",ik/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],";--rdp-background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";--rdp-accent-color-dark:",ik/* .colorTokens.action.primary.active */.I6.action.primary.active,";--rdp-background-color-dark:",ik/* .colorTokens.action.primary.hover */.I6.action.primary.hover,";--rdp-selected-color:",ik/* .colorTokens.text.white */.I6.text.white,";--rdp-day_button-border-radius:",ik/* .borderRadius.circle */.Vq.circle,";--rdp-outside-opacity:0.5;--rdp-disabled-opacity:0.25;}.rdp-months{margin:",ik/* .spacing["16"] */.YK["16"],";}.rdp-month_grid{margin:0px;}.rdp-day{padding:0px;}.rdp-nav{--rdp-accent-color:",ik/* .colorTokens.text.primary */.I6.text.primary,";button{border-radius:",ik/* .borderRadius.circle */.Vq.circle,";&:hover,&:focus,&:active{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}&:focus-visible:not(:disabled){--rdp-accent-color:",ik/* .colorTokens.text.white */.I6.text.white,";background-color:",ik/* .colorTokens.background.brand */.I6.background.brand,";}}}.rdp-dropdown_root{.rdp-caption_label{padding:",ik/* .spacing["8"] */.YK["8"],";}}.rdp-today{.rdp-day_button{font-weight:",ik/* .fontWeight.bold */.Wy.bold,";}}.rdp-selected{color:var(--rdp-selected-color);background-color:var(--rdp-accent-color);border-radius:",ik/* .borderRadius.circle */.Vq.circle,";font-weight:",ik/* .fontWeight.regular */.Wy.regular,";.rdp-day_button{&:hover,&:focus,&:active{background-color:var(--rdp-accent-color);color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}&:focus-visible{outline:2px solid var(--rdp-accent-color);outline-offset:2px;}&:not(.rdp-outside){color:var(--rdp-selected-color);}}}.rdp-day_button{&:hover,&:focus,&:active{background-color:var(--rdp-background-color);color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}&:focus-visible:not([disabled]){color:var(--rdp-selected-color);opacity:1;background-color:var(--rdp-accent-color);}}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/fields/FormTimeInput.tsx
var AG=e=>{var{label:t,field:r,fieldState:n,interval:i=30,disabled:o,loading:a,placeholder:s,helpText:l,isClearable:c=true}=e;var[u,d]=useState(false);var f=useRef(null);var p=useRef(null);var h=useMemo(()=>{var e=setMinutes(setHours(new Date,0),0);var t=setMinutes(setHours(new Date,23),59);var r=eachMinuteOfInterval({start:e,end:t},{step:i});return r.map(e=>format(e,DateFormats.hoursMinutes))},[i]);var{activeIndex:v,setActiveIndex:m}=useSelectKeyboardNavigation({options:h.map(e=>({label:e,value:e})),isOpen:u,selectedValue:r.value,onSelect:e=>{r.onChange(e.value);d(false)},onClose:()=>d(false)});useEffect(()=>{if(u&&v>=0&&p.current){p.current.scrollIntoView({block:"nearest",behavior:"smooth"})}},[u,v]);return /*#__PURE__*/_jsx(FormFieldWrapper,{label:t,field:r,fieldState:n,disabled:o,loading:a,placeholder:s,helpText:l,children:e=>{var{css:t}=e,n=_object_without_properties(e,["css"]);var i;return /*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsxs("div",{css:AQ.wrapper,ref:f,children:[/*#__PURE__*/_jsx("input",_object_spread_props(_object_spread({},n),{ref:r.ref,css:[t,AQ.input],type:"text",onClick:e=>{e.stopPropagation();d(e=>!e)},onKeyDown:e=>{if(e.key==="Enter"){e.preventDefault();d(e=>!e)}if(e.key==="Tab"){d(false)}},value:(i=r.value)!==null&&i!==void 0?i:"",onChange:e=>{var{value:t}=e.target;r.onChange(t)},autoComplete:"off","data-input":true})),/*#__PURE__*/_jsx(SVGIcon,{name:"clock",width:32,height:32,style:AQ.icon}),c&&r.value&&/*#__PURE__*/_jsx(Button,{isIconOnly:true,"aria-label":__("Clear","tutor-pro"),size:"small",variant:"text",buttonCss:styleUtils.inputClearButton,onClick:()=>r.onChange(""),icon:/*#__PURE__*/_jsx(SVGIcon,{name:"times",width:12,height:12})})]}),/*#__PURE__*/_jsx(Popover,{triggerRef:f,isOpen:u,closePopover:()=>d(false),animationType:AnimationType.slideDown,children:/*#__PURE__*/_jsx("ul",{css:AQ.list,children:h.map((e,t)=>{return /*#__PURE__*/_jsx("li",{css:AQ.listItem,ref:v===t?p:null,"data-active":v===t,children:/*#__PURE__*/_jsx("button",{type:"button",css:AQ.itemButton,onClick:()=>{r.onChange(e);d(false)},onMouseOver:()=>m(t),onMouseLeave:()=>t!==v&&m(-1),onFocus:()=>m(t),children:e})},t)})})})]})}})};/* export default */const A$=/* unused pure expression or super */null&&AG;var AQ={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;&:hover,&:focus-within{& > button{opacity:1;}}"),input:/*#__PURE__*/(0,c/* .css */.AH)("&[data-input]{padding-left:",ik/* .spacing["40"] */.YK["40"],";}"),icon:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;top:50%;left:",ik/* .spacing["8"] */.YK["8"],";transform:translateY(-50%);color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";"),list:/*#__PURE__*/(0,c/* .css */.AH)("height:380px;list-style:none;padding:0;margin:0;",aR/* .styleUtils.overflowYAuto */.x.overflowYAuto,";"),listItem:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:40px;cursor:pointer;display:flex;align-items:center;transition:background-color 0.3s ease-in-out;&[data-active='true']{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";}:hover{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";}"),itemButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",iS/* .typography.body */.I.body(),";margin:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["12"] */.YK["12"],";width:100%;height:100%;&:focus,&:active,&:hover{background:none;color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/subscription/OfferSalePrice.tsx
var{tutor_currency:AX}=bA/* .tutorConfig */.P;function AJ(){var e=useFormContext();var t=e.watch("offer_sale_price");var r=e.watch("regular_price");var n=!!e.watch("schedule_sale_price");return /*#__PURE__*/_jsxs("div",{css:AZ.wrapper,children:[/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(Controller,{control:e.control,name:"offer_sale_price",render:e=>/*#__PURE__*/_jsx(FormSwitch,_object_spread_props(_object_spread({},e),{label:__("Offer sale price","tutor-pro")}))})}),/*#__PURE__*/_jsx(Show,{when:t,children:/*#__PURE__*/_jsxs("div",{css:AZ.inputWrapper,children:[/*#__PURE__*/_jsx(Controller,{control:e.control,name:"sale_price",rules:_object_spread_props(_object_spread({},requiredRule()),{validate:e=>{if(e&&r&&Number(e)>=Number(r)){return __("Sale price should be less than regular price","tutor-pro")}if(e&&r&&Number(e)<=0){return __("Sale price should be greater than 0","tutor-pro")}return undefined}}),render:e=>/*#__PURE__*/_jsx(FormInputWithContent,_object_spread_props(_object_spread({},e),{type:"number",label:__("Sale Price","tutor-pro"),content:(AX===null||AX===void 0?void 0:AX.symbol)||"$",selectOnFocus:true,contentCss:styleUtils.inputCurrencyStyle}))}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"schedule_sale_price",render:e=>/*#__PURE__*/_jsx(FormCheckbox,_object_spread_props(_object_spread({},e),{label:__("Schedule the sale price","tutor-pro")}))}),/*#__PURE__*/_jsxs(Show,{when:n,children:[/*#__PURE__*/_jsxs("div",{css:AZ.datetimeWrapper,children:[/*#__PURE__*/_jsx("label",{children:__("Sale starts from","tutor-pro")}),/*#__PURE__*/_jsxs("div",{css:styleUtils.dateAndTimeWrapper,children:[/*#__PURE__*/_jsx(Controller,{name:"sale_price_from_date",control:e.control,rules:{required:__("Schedule date is required","tutor-pro")},render:e=>/*#__PURE__*/_jsx(FormDateInput,_object_spread_props(_object_spread({},e),{isClearable:false,placeholder:"yyyy-mm-dd",disabledBefore:new Date().toISOString()}))}),/*#__PURE__*/_jsx(Controller,{name:"sale_price_from_time",control:e.control,rules:{required:__("Schedule time is required","tutor-pro")},render:e=>/*#__PURE__*/_jsx(FormTimeInput,_object_spread_props(_object_spread({},e),{interval:60,isClearable:false,placeholder:"hh:mm A"}))})]})]}),/*#__PURE__*/_jsxs("div",{css:AZ.datetimeWrapper,children:[/*#__PURE__*/_jsx("label",{children:__("Sale ends to","tutor-pro")}),/*#__PURE__*/_jsxs("div",{css:styleUtils.dateAndTimeWrapper,children:[/*#__PURE__*/_jsx(Controller,{name:"sale_price_to_date",control:e.control,rules:{required:__("Schedule date is required","tutor-pro"),validate:{checkEndDate:t=>{var r=e.watch("sale_price_from_date");var n=t;if(r&&n){return new Date(r)>new Date(n)?__("Sales End date should be greater than start date","tutor-pro"):undefined}return undefined}},deps:["sale_price_from_date"]},render:t=>/*#__PURE__*/_jsx(FormDateInput,_object_spread_props(_object_spread({},t),{isClearable:false,placeholder:"yyyy-mm-dd",disabledBefore:e.watch("sale_price_from_date")||undefined}))}),/*#__PURE__*/_jsx(Controller,{name:"sale_price_to_time",control:e.control,rules:{required:__("Schedule time is required","tutor-pro"),validate:{checkEndTime:t=>{var r=e.watch("sale_price_from_date");var n=e.watch("sale_price_from_time");var i=e.watch("sale_price_to_date");var o=t;if(r&&i&&n&&o){return new Date("".concat(r," ").concat(n))>new Date("".concat(i," ").concat(o))?__("Sales End time should be greater than start time","tutor-pro"):undefined}return undefined}},deps:["sale_price_from_date","sale_price_from_time","sale_price_to_date"]},render:e=>/*#__PURE__*/_jsx(FormTimeInput,_object_spread_props(_object_spread({},e),{interval:60,isClearable:false,placeholder:"hh:mm A"}))})]})]})]})]})})]})}var AZ={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("background-color:",ik/* .colorTokens.background.white */.I6.background.white,";padding:",ik/* .spacing["12"] */.YK["12"],";border:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",ik/* .borderRadius["8"] */.Vq["8"],";display:flex;flex-direction:column;gap:",ik/* .spacing["20"] */.YK["20"],";"),inputWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",ik/* .spacing["12"] */.YK["12"],";padding:",ik/* .spacing["4"] */.YK["4"],";margin:-",ik/* .spacing["4"] */.YK["4"],";"),datetimeWrapper:/*#__PURE__*/(0,c/* .css */.AH)("label{",iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";}")};// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+query-core@5.62.15/node_modules/@tanstack/query-core/build/modern/queryObserver.js
// src/queryObserver.ts
var A0=class extends j{constructor(e,t){super();this.options=t;this.#E=e;this.#C=null;this.#R=V();if(!this.options.experimental_prefetchInRender){this.#R.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))}this.bindMethods();this.setOptions(t)}#E;#D=void 0;#F=void 0;#I=void 0;#Y;#M;#R;#C;#j;#P;// 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.
#L;#N;#H;#V;#U=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){this.#D.addObserver(this);if(A2(this.#D,this.options)){this.#K()}else{this.updateResult()}this.#B()}}onUnsubscribe(){if(!this.hasListeners()){this.destroy()}}shouldFetchOnReconnect(){return A6(this.#D,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return A6(this.#D,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set;this.#z();this.#q();this.#D.removeObserver(this)}setOptions(e,t){const r=this.options;const n=this.#D;this.options=this.#E.defaultQueryOptions(e);if(this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof m(this.options.enabled,this.#D)!=="boolean"){throw new Error("Expected enabled to be a boolean or a callback that returns a boolean")}this.#W();this.#D.setOptions(this.options);if(r._defaulted&&!A(this.options,r)){this.#E.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#D,observer:this})}const i=this.hasListeners();if(i&&A4(this.#D,n,this.options,r)){this.#K()}this.updateResult(t);if(i&&(this.#D!==n||m(this.options.enabled,this.#D)!==m(r.enabled,this.#D)||v(this.options.staleTime,this.#D)!==v(r.staleTime,this.#D))){this.#G()}const o=this.#$();if(i&&(this.#D!==n||m(this.options.enabled,this.#D)!==m(r.enabled,this.#D)||o!==this.#V)){this.#Q(o)}}getOptimisticResult(e){const t=this.#E.getQueryCache().build(this.#E,e);const r=this.createResult(t,e);if(A3(this,r)){this.#I=r;this.#M=this.options;this.#Y=this.#D.state}return r}getCurrentResult(){return this.#I}trackResult(e,t){const r={};Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:false,enumerable:true,get:()=>{this.trackProp(n);t?.(n);return e[n]}})});return r}trackProp(e){this.#U.add(e)}getCurrentQuery(){return this.#D}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#E.defaultQueryOptions(e);const r=this.#E.getQueryCache().build(this.#E,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#K({...e,cancelRefetch:e.cancelRefetch??true}).then(()=>{this.updateResult();return this.#I})}#K(e){this.#W();let t=this.#D.fetch(this.options,e);if(!e?.throwOnError){t=t.catch(d)}return t}#G(){this.#z();const e=v(this.options.staleTime,this.#D);if(u||this.#I.isStale||!p(e)){return}const t=h(this.#I.dataUpdatedAt,e);const r=t+1;this.#N=setTimeout(()=>{if(!this.#I.isStale){this.updateResult()}},r)}#$(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#D):this.options.refetchInterval)??false}#Q(e){this.#q();this.#V=e;if(u||m(this.options.enabled,this.#D)===false||!p(this.#V)||this.#V===0){return}this.#H=setInterval(()=>{if(this.options.refetchIntervalInBackground||L.isFocused()){this.#K()}},this.#V)}#B(){this.#G();this.#Q(this.#$())}#z(){if(this.#N){clearTimeout(this.#N);this.#N=void 0}}#q(){if(this.#H){clearInterval(this.#H);this.#H=void 0}}createResult(e,t){const r=this.#D;const n=this.options;const i=this.#I;const o=this.#Y;const a=this.#M;const s=e!==r;const l=s?e.state:this.#F;const{state:c}=e;let u={...c};let d=false;let f;if(t._optimisticResults){const i=this.hasListeners();const o=!i&&A2(e,t);const a=i&&A4(e,r,t,n);if(o||a){u={...u,...$(c.data,e.options)}}if(t._optimisticResults==="isRestoring"){u.fetchStatus="idle"}}let{error:p,errorUpdatedAt:h,status:v}=u;if(t.select&&u.data!==void 0){if(i&&u.data===o?.data&&t.select===this.#j){f=this.#P}else{try{this.#j=t.select;f=t.select(u.data);f=O(i?.data,f,t);this.#P=f;this.#C=null}catch(e){this.#C=e}}}else{f=u.data}if(t.placeholderData!==void 0&&f===void 0&&v==="pending"){let e;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData){e=i.data}else{e=typeof t.placeholderData==="function"?t.placeholderData(this.#L?.state.data,this.#L):t.placeholderData;if(t.select&&e!==void 0){try{e=t.select(e);this.#C=null}catch(e){this.#C=e}}}if(e!==void 0){v="success";f=O(i?.data,e,t);d=true}}if(this.#C){p=this.#C;f=this.#P;h=Date.now();v="error"}const m=u.fetchStatus==="fetching";const g=v==="pending";const b=v==="error";const _=g&&m;const y=f!==void 0;const x={status:v,fetchStatus:u.fetchStatus,isPending:g,isSuccess:v==="success",isError:b,isInitialLoading:_,isLoading:_,data:f,dataUpdatedAt:u.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:b&&!y,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:b&&y,isStale:A5(e,t),refetch:this.refetch,promise:this.#R};const w=x;if(this.options.experimental_prefetchInRender){const t=e=>{if(w.status==="error"){e.reject(w.error)}else if(w.data!==void 0){e.resolve(w.data)}};const n=()=>{const e=this.#R=w.promise=V();t(e)};const i=this.#R;switch(i.status){case"pending":if(e.queryHash===r.queryHash){t(i)}break;case"fulfilled":if(w.status==="error"||w.data!==i.value){n()}break;case"rejected":if(w.status!=="error"||w.error!==i.reason){n()}break}}return w}updateResult(e){const t=this.#I;const r=this.createResult(this.#D,this.options);this.#Y=this.#D.state;this.#M=this.options;if(this.#Y.data!==void 0){this.#L=this.#D}if(A(r,t)){return}this.#I=r;const n={};const i=()=>{if(!t){return true}const{notifyOnChangeProps:e}=this.options;const r=typeof e==="function"?e():e;if(r==="all"||!r&&!this.#U.size){return true}const n=new Set(r??this.#U);if(this.options.throwOnError){n.add("error")}return Object.keys(this.#I).some(e=>{const r=e;const i=this.#I[r]!==t[r];return i&&n.has(r)})};if(e?.listeners!==false&&i()){n.listeners=true}this.#T({...n,...e})}#W(){const e=this.#E.getQueryCache().build(this.#E,this.options);if(e===this.#D){return}const t=this.#D;this.#D=e;this.#F=e.state;if(this.hasListeners()){t?.removeObserver(this);e.addObserver(this)}}onQueryUpdate(){this.updateResult();if(this.hasListeners()){this.#B()}}#T(e){M.batch(()=>{if(e.listeners){this.listeners.forEach(e=>{e(this.#I)})}this.#E.getQueryCache().notify({query:this.#D,type:"observerResultsUpdated"})})}};function A1(e,t){return m(t.enabled,e)!==false&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===false)}function A2(e,t){return A1(e,t)||e.state.data!==void 0&&A6(e,t,t.refetchOnMount)}function A6(e,t,r){if(m(t.enabled,e)!==false){const n=typeof r==="function"?r(e):r;return n==="always"||n!==false&&A5(e,t)}return false}function A4(e,t,r,n){return(e!==t||m(n.enabled,e)===false)&&(!r.suspense||e.state.status!=="error")&&A5(e,r)}function A5(e,t){return m(t.enabled,e)!==false&&e.isStaleByTime(v(t.staleTime,e))}function A3(e,t){if(!A(e.getCurrentResult(),t)){return true}return false}//# sourceMappingURL=queryObserver.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js
"use client";// src/QueryErrorResetBoundary.tsx
function A8(){let e=false;return{clearReset:()=>{e=false},reset:()=>{e=true},isReset:()=>{return e}}}var A9=n.createContext(A8());var A7=()=>n.useContext(A9);var Ee=({children:e})=>{const[t]=React.useState(()=>A8());return /* @__PURE__ */jsx(A9.Provider,{value:t,children:typeof e==="function"?e(t):e})};//# sourceMappingURL=QueryErrorResetBoundary.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js
"use client";// src/errorBoundaryUtils.ts
var Et=(e,t)=>{if(e.suspense||e.throwOnError||e.experimental_prefetchInRender){if(!t.isReset()){e.retryOnMount=false}}};var Er=e=>{n.useEffect(()=>{e.clearReset()},[e])};var En=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>{return e.isError&&!t.isReset()&&!e.isFetching&&n&&bZ(r,[e.error,n])};//# sourceMappingURL=errorBoundaryUtils.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/isRestoring.js
"use client";// src/isRestoring.ts
var Ei=n.createContext(false);var Eo=()=>n.useContext(Ei);var Ea=Ei.Provider;//# sourceMappingURL=isRestoring.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/suspense.js
// src/suspense.ts
var Es=(e,t)=>t.state.data===void 0;var El=e=>{const t=e.staleTime;if(e.suspense){e.staleTime=typeof t==="function"?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3);if(typeof e.gcTime==="number"){e.gcTime=Math.max(e.gcTime,1e3)}}};var Ec=(e,t)=>e.isLoading&&e.isFetching&&!t;var Eu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending;var Ed=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});//# sourceMappingURL=suspense.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js
"use client";// src/useBaseQuery.ts
function Ef(e,t,r){var i,o,a,s,l;if(false){}const c=eu(r);const d=Eo();const f=A7();const p=c.defaultQueryOptions(e);(o=(i=c.getDefaultOptions().queries)==null?void 0:i._experimental_beforeQuery)==null?void 0:o.call(i,p);p._optimisticResults=d?"isRestoring":"optimistic";El(p);Et(p,f);Er(f);const h=!c.getQueryCache().get(p.queryHash);const[v]=n.useState(()=>new t(c,p));const m=v.getOptimisticResult(p);n.useSyncExternalStore(n.useCallback(e=>{const t=d?b0:v.subscribe(M.batchCalls(e));v.updateResult();return t},[v,d]),()=>v.getCurrentResult(),()=>v.getCurrentResult());n.useEffect(()=>{v.setOptions(p,{listeners:false})},[p,v]);if(Eu(p,m)){throw Ed(p,v,f)}if(En({result:m,errorResetBoundary:f,throwOnError:p.throwOnError,query:c.getQueryCache().get(p.queryHash)})){throw m.error};(s=(a=c.getDefaultOptions().queries)==null?void 0:a._experimental_afterQuery)==null?void 0:s.call(a,p,m);if(p.experimental_prefetchInRender&&!u&&Ec(m,d)){const e=h?// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
Ed(p,v,f):// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
(l=c.getQueryCache().get(p.queryHash))==null?void 0:l.promise;e==null?void 0:e.catch(b0).finally(()=>{v.updateResult()})}return!p.notifyOnChangeProps?v.trackResult(m):m}//# sourceMappingURL=useBaseQuery.js.map
;// CONCATENATED MODULE: ./node_modules/.pnpm/@tanstack+react-query@5.62.15_react@18.3.1/node_modules/@tanstack/react-query/build/legacy/useQuery.js
"use client";// src/useQuery.ts
function Ep(e,t){return Ef(e,A0,t)}//# sourceMappingURL=useQuery.js.map
;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/services/subscription.ts
var Eh=/* unused pure expression or super */null&&[3,6,9,12];var Ev={untilCancelled:(0,lo.__)("Until cancelled","tutor-pro"),noRenewal:(0,lo.__)("No Renewal","tutor-pro")};var Em={id:"0",payment_type:"recurring",plan_type:"course",assign_id:"0",plan_name:"",plan_order:"0",recurring_value:"1",recurring_interval:"month",is_featured:false,is_enabled:true,regular_price:"0",sale_price:"0",sale_price_from_date:"",sale_price_from_time:"",sale_price_to_date:"",sale_price_to_time:"",recurring_limit:(0,lo.__)("Until cancelled","tutor-pro"),do_not_provide_certificate:false,enrollment_fee:"0",trial_value:"1",trial_interval:"day",charge_enrollment_fee:false,enable_free_trial:false,offer_sale_price:false,schedule_sale_price:false};var Eg=e=>{var t=()=>{if(e.recurring_limit==="0"){return Ev.untilCancelled}if(e.recurring_limit==="-1"){return Ev.noRenewal}return e.recurring_limit||""};var r,n,i,o,a,s,l,c,u,d,f;return{id:e.id,payment_type:(r=e.payment_type)!==null&&r!==void 0?r:"recurring",plan_type:(n=e.plan_type)!==null&&n!==void 0?n:"course",assign_id:e.assign_id,plan_name:(i=e.plan_name)!==null&&i!==void 0?i:"",plan_order:(o=e.plan_order)!==null&&o!==void 0?o:"0",recurring_value:(a=e.recurring_value)!==null&&a!==void 0?a:"0",recurring_interval:(s=e.recurring_interval)!==null&&s!==void 0?s:"month",is_featured:!!Number(e.is_featured),is_enabled:!!Number(e.is_enabled),regular_price:(l=e.regular_price)!==null&&l!==void 0?l:"0",recurring_limit:t(),enrollment_fee:(c=e.enrollment_fee)!==null&&c!==void 0?c:"0",trial_value:(u=e.trial_value)!==null&&u!==void 0?u:"0",trial_interval:(d=e.trial_interval)!==null&&d!==void 0?d:"day",sale_price:(f=e.sale_price)!==null&&f!==void 0?f:"0",charge_enrollment_fee:!!Number(e.enrollment_fee),enable_free_trial:!!Number(e.trial_value),offer_sale_price:!!Number(e.sale_price),schedule_sale_price:!!e.sale_price_from,do_not_provide_certificate:!Number(e.provide_certificate),sale_price_from_date:e.sale_price_from?format(convertGMTtoLocalDate(e.sale_price_from),DateFormats.yearMonthDay):"",sale_price_from_time:e.sale_price_from?format(convertGMTtoLocalDate(e.sale_price_from),DateFormats.hoursMinutes):"",sale_price_to_date:e.sale_price_to?format(convertGMTtoLocalDate(e.sale_price_to),DateFormats.yearMonthDay):"",sale_price_to_time:e.sale_price_to?format(convertGMTtoLocalDate(e.sale_price_to),DateFormats.hoursMinutes):""}};var Eb=e=>{var t=()=>{if(e.recurring_limit===Ev.untilCancelled){return"0"}if(e.recurring_limit===Ev.noRenewal){return"-1"}return e.recurring_limit};return _object_spread_props(_object_spread(_object_spread_props(_object_spread(_object_spread_props(_object_spread(_object_spread_props(_object_spread({},e.id&&String(e.id)!=="0"&&{id:e.id}),{payment_type:e.payment_type,plan_type:e.plan_type,assign_id:e.assign_id,plan_name:e.plan_name}),e.id&&String(e.id)==="0"&&{plan_order:e.plan_order},e.payment_type==="recurring"&&{recurring_value:e.recurring_value,recurring_interval:e.recurring_interval}),{regular_price:e.regular_price,recurring_limit:t(),is_featured:e.is_featured?"1":"0",is_enabled:e.is_enabled?"1":"0"}),e.charge_enrollment_fee&&{enrollment_fee:e.enrollment_fee},e.enable_free_trial&&{trial_value:e.trial_value,trial_interval:e.trial_interval}),{sale_price:e.offer_sale_price?e.sale_price:"0"}),e.schedule_sale_price&&{sale_price_from:convertToGMT(new Date("".concat(e.sale_price_from_date," ").concat(e.sale_price_from_time))),sale_price_to:convertToGMT(new Date("".concat(e.sale_price_to_date," ").concat(e.sale_price_to_time)))}),{provide_certificate:e.do_not_provide_certificate?"0":"1"})};var E_=e=>{return wpAjaxInstance.post(endpoints.GET_SUBSCRIPTIONS_LIST,{object_id:e})};var Ey=e=>{return useQuery({queryKey:["SubscriptionsList",e],queryFn:()=>E_(e).then(e=>e.data)})};var Ex=(e,t)=>{return wpAjaxInstance.post(endpoints.SAVE_SUBSCRIPTION,_object_spread({object_id:e},t.id&&{id:t.id},t))};var Ew=e=>{var t=useQueryClient();var{showToast:r}=useToast();return useMutation({mutationFn:t=>Ex(e,t),onSuccess:n=>{if(n.status_code===200||n.status_code===201){r({message:n.message,type:"success"});t.invalidateQueries({queryKey:["SubscriptionsList",e]})}},onError:e=>{r({type:"danger",message:convertToErrorMessage(e)})}})};var EA=(e,t)=>{return wpAjaxInstance.post(endpoints.DELETE_SUBSCRIPTION,{object_id:e,id:t})};var EE=e=>{var t=useQueryClient();var{showToast:r}=useToast();return useMutation({mutationFn:t=>EA(e,t),onSuccess:(n,i)=>{if(n.status_code===200){r({message:n.message,type:"success"});t.setQueryData(["SubscriptionsList",e],e=>{return e.filter(e=>e.id!==String(i))})}},onError:e=>{r({type:"danger",message:convertToErrorMessage(e)})}})};var EI=(e,t)=>{return wpAjaxInstance.post(endpoints.DUPLICATE_SUBSCRIPTION,{object_id:e,id:t})};var Ek=e=>{var t=useQueryClient();var{showToast:r}=useToast();return useMutation({mutationFn:t=>EI(e,t),onSuccess:n=>{if(n.data){r({message:n.message,type:"success"});t.invalidateQueries({queryKey:["SubscriptionsList",e]})}},onError:e=>{r({type:"danger",message:convertToErrorMessage(e)})}})};var ES=(e,t)=>{return wpAjaxInstance.post(endpoints.SORT_SUBSCRIPTION,{object_id:e,plan_ids:t})};var EO=e=>{var t=useQueryClient();var{showToast:r}=useToast();return useMutation({mutationFn:t=>ES(e,t),onSuccess:(r,n)=>{if(r.status_code===200){t.setQueryData(["SubscriptionsList",e],e=>{var t=n.map(e=>String(e));return e.sort((e,r)=>t.indexOf(e.id)-t.indexOf(r.id))});t.invalidateQueries({queryKey:["SubscriptionsList",e]})}},onError:n=>{r({type:"danger",message:convertToErrorMessage(n)});t.invalidateQueries({queryKey:["SubscriptionsList",e]})}})};var ET=()=>{return xX.get(xZ.GET_MEMBERSHIP_PLANS).then(e=>e.data)};var EC=()=>{return Ep({queryKey:["MembershipPlans"],queryFn:ET})};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/subscription/SubscriptionItem.tsx
var ER=250;// this is hack to fix layout shifting while animating.
var{tutor_currency:ED}=bA/* .tutorConfig */.P;function EF(){var e=useFormContext();useEffect(()=>{var t=setTimeout(()=>{e.setFocus("plan_name")},ER);return()=>{clearTimeout(t)};// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);var t=e.watch("charge_enrollment_fee");// @TODO: Will be added after confirmation
// const enableTrial = form.watch(`subscriptions.${index}.enable_free_trial` as `subscriptions.0.enable_free_trial`);
var r=Object.values(BILLING_CYCLE_CUSTOM_PRESETS);var n=[...BILLING_CYCLE_PRESETS.map(e=>({/* translators: %s: number of times. */label:sprintf(__("%s times","tutor-pro"),e.toString()),value:String(e)})),...r.map(e=>({label:e,value:e}))];return /*#__PURE__*/_jsx("form",{css:EY.subscription,children:/*#__PURE__*/_jsx("div",{css:styleUtils.display.flex("column"),children:/*#__PURE__*/_jsxs("div",{css:EY.subscriptionContent,children:[/*#__PURE__*/_jsx(Controller,{control:e.control,name:"plan_name",rules:requiredRule(),render:e=>/*#__PURE__*/_jsx(FormInput,_object_spread_props(_object_spread({},e),{placeholder:__("Enter plan name","tutor-pro"),label:__("Plan Name","tutor-pro")}))}),/*#__PURE__*/_jsxs("div",{css:EY.inputGroup,children:[/*#__PURE__*/_jsx(Controller,{control:e.control,name:"regular_price",rules:_object_spread_props(_object_spread({},requiredRule()),{validate:e=>{if(Number(e)<=0){return __("Price must be greater than 0","tutor-pro")}}}),render:e=>/*#__PURE__*/_jsx(FormInputWithContent,_object_spread_props(_object_spread({},e),{label:__("Price","tutor-pro"),content:(ED===null||ED===void 0?void 0:ED.symbol)||"$",placeholder:__("Plan price","tutor-pro"),selectOnFocus:true,contentCss:styleUtils.inputCurrencyStyle,type:"number"}))}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"recurring_value",rules:_object_spread_props(_object_spread({},requiredRule()),{validate:e=>{if(Number(e)<1){return __("This value must be equal to or greater than 1","tutor-pro")}}}),render:e=>/*#__PURE__*/_jsx(FormInput,_object_spread_props(_object_spread({},e),{label:__("Billing Interval","tutor-pro"),placeholder:__("12","tutor-pro"),selectOnFocus:true,type:"number"}))}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"recurring_interval",render:e=>/*#__PURE__*/_jsx(FormSelectInput,_object_spread_props(_object_spread({},e),{label:/*#__PURE__*/_jsx("div",{children:" "}),options:[{label:__("Day(s)","tutor-pro"),value:"day"},{label:__("Week(s)","tutor-pro"),value:"week"},{label:__("Month(s)","tutor-pro"),value:"month"},{label:__("Year(s)","tutor-pro"),value:"year"}],removeOptionsMinWidth:true}))}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"recurring_limit",rules:_object_spread_props(_object_spread({},requiredRule()),{validate:e=>{if(r.includes(e)){return true}if(Number(e)<=0){return __("Renew plan must be greater than 0","tutor-pro")}return true}}),render:e=>{var t;return /*#__PURE__*/_jsx(FormInputWithPresets,_object_spread_props(_object_spread({},e),{label:__("Billing Cycles","tutor-pro"),placeholder:__("Select or type times to renewing the plan","tutor-pro"),content:!r.includes((t=e.field.value)!==null&&t!==void 0?t:"")&&__("Times","tutor-pro"),contentPosition:"right",type:"number",presetOptions:n,selectOnFocus:true}))}})]}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"charge_enrollment_fee",render:e=>/*#__PURE__*/_jsx(FormCheckbox,_object_spread_props(_object_spread({},e),{label:__("Charge enrollment fee","tutor-pro")}))}),/*#__PURE__*/_jsx(Show,{when:t,children:/*#__PURE__*/_jsx(Controller,{control:e.control,name:"enrollment_fee",rules:_object_spread_props(_object_spread({},requiredRule()),{validate:e=>{if(Number(e)<=0){return __("Enrollment fee must be greater than 0","tutor-pro")}return true}}),render:e=>/*#__PURE__*/_jsx(FormInputWithContent,_object_spread_props(_object_spread({},e),{label:__("Enrollment fee","tutor-pro"),content:(ED===null||ED===void 0?void 0:ED.symbol)||"$",placeholder:__("Enter enrollment fee","tutor-pro"),selectOnFocus:true,contentCss:styleUtils.inputCurrencyStyle,type:"number"}))})}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"do_not_provide_certificate",render:e=>/*#__PURE__*/_jsx(FormCheckbox,_object_spread_props(_object_spread({},e),{label:__("Do not provide certificate","tutor-pro")}))}),/*#__PURE__*/_jsx(Controller,{control:e.control,name:"is_featured",render:e=>/*#__PURE__*/_jsx(FormCheckbox,_object_spread_props(_object_spread({},e),{label:__("Mark as featured","tutor-pro")}))}),/*#__PURE__*/_jsx(OfferSalePrice,{})]})})})}var EY={trialWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:",ik/* .spacing["8"] */.YK["8"],";"),subscription:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;border:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",ik/* .borderRadius.card */.Vq.card,";overflow:hidden;transition:border-color 0.3s ease;"),subscriptionContent:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["16"] */.YK["16"],";display:flex;flex-direction:column;gap:",ik/* .spacing["12"] */.YK["12"],";"),inputGroup:/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:1fr 0.7fr 1fr 1fr;align-items:start;gap:",ik/* .spacing["8"] */.YK["8"],";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{grid-template-columns:1fr;}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/modals/SubscriptionModal.tsx
function EM(e){var{courseId:t,isBundle:r=false,icon:n,closeModal:i,subscription:o}=e;var a=useFormWithGlobalError({defaultValues:o||defaultSubscriptionFormData,mode:"onChange"});var s=useSaveCourseSubscriptionMutation(t);var l=a.formState.isDirty;var c=o.isSaved;var u=e=>_async_to_generator(function*(){var n=convertFormDataToSubscription(_object_spread_props(_object_spread({},e),{id:e.isSaved?e.id:"0",assign_id:String(t),plan_type:r?"bundle":"course"}));var o=yield s.mutateAsync(n);if(o.status_code===200||o.status_code===201){i({action:"CONFIRM"})}})();return /*#__PURE__*/_jsx(FormProvider,_object_spread_props(_object_spread({},a),{children:/*#__PURE__*/_jsx(ModalWrapper,{onClose:()=>i({action:"CLOSE"}),icon:l?/*#__PURE__*/_jsx(SVGIcon,{name:"warning",width:24,height:24}):n,title:l?CURRENT_VIEWPORT.isAboveMobile?__("Unsaved Changes","tutor-pro"):"":__("Subscription Plan","tutor-pro"),subtitle:o.isSaved?__("Update plan","tutor-pro"):__("Create plan","tutor-pro"),maxWidth:1218,actions:l&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Button,{variant:"text",size:"small",onClick:()=>c?a.reset():i({action:"CLOSE"}),children:c?__("Discard Changes","tutor-pro"):__("Cancel","tutor-pro")}),/*#__PURE__*/_jsx(Button,{"data-cy":"save-subscription",loading:s.isPending,variant:"primary",size:"small",onClick:a.handleSubmit(u),children:c?__("Update","tutor-pro"):__("Save","tutor-pro")})]}),children:/*#__PURE__*/_jsx("div",{css:Ej.wrapper,children:/*#__PURE__*/_jsx("div",{css:Ej.container,children:/*#__PURE__*/_jsx("div",{css:Ej.content,children:/*#__PURE__*/_jsx(SubscriptionItem,{},o.id)})})})})}))}var Ej={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:100%;"),container:/*#__PURE__*/(0,c/* .css */.AH)("max-width:640px;width:100%;padding-block:",ik/* .spacing["40"] */.YK["40"],";margin-inline:auto;display:flex;flex-direction:column;gap:",ik/* .spacing["32"] */.YK["32"],";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{padding-block:",ik/* .spacing["24"] */.YK["24"],";padding-inline:",ik/* .spacing["8"] */.YK["8"],";}"),content:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;flex-direction:column;gap:",ik/* .spacing["16"] */.YK["16"],";")};// EXTERNAL MODULE: ../tutor/node_modules/.pnpm/polished@4.3.1/node_modules/polished/lib/color/rgba.js
var EP=r(8212);var EL=/*#__PURE__*/r.n(EP);// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/molecules/ThreeDots.tsx
function EN(){var e=(0,eh._)(["\n      padding-block: ",";\n    "]);EN=function t(){return e};return e}function EH(){var e=(0,eh._)(["\n      padding: "," ",";\n      ",";\n    "]);EH=function t(){return e};return e}function EV(){var e=(0,eh._)(["\n      color: ",";\n      svg {\n        color: ",";\n      }\n\n      &:hover:not(:disabled) {\n        color: ",";\n        background-color: ",";\n\n        svg {\n          color: ",";\n        }\n      }\n\n      &:active {\n        color: ",";\n        background-color: ",";\n\n        svg {\n          color: ",";\n        }\n      }\n    "]);EV=function t(){return e};return e}function EU(){var e=(0,eh._)(["\n      background-color: ",";\n      svg {\n        color: ",";\n      }\n    "]);EU=function t(){return e};return e}function EK(){var e=(0,eh._)(["\n      background-color: ",";\n      :hover {\n        background-color: ",";\n        svg {\n          color: ",";\n        }\n      }\n    "]);EK=function t(){return e};return e}var EB=e=>{var{text:r,icon:n,onClick:i,onClosePopover:o,isTrash:a=false,size:s="medium",buttonCss:l,disabled:c}=e,u=(0,iO._)(e,["text","icon","onClick","onClosePopover","isTrash","size","buttonCss","disabled"]);return/*#__PURE__*/(0,t/* .jsxs */.FD)("button",(0,ep._)((0,ef._)({type:"button",css:[EW.option({isTrash:a,size:s}),l],onClick:e=>{if(i){i(e)}if(o){o()}},disabled:c},u),{children:[n&&n,/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:r})]}))};var Ez=e=>{var{onClick:r,isOpen:o,disabled:a=false,closePopover:s,placement:l=lk.BOTTOM_RIGHT,children:c,animationType:u=ij.slideLeft,dotsOrientation:d="horizontal",maxWidth:f="148px",isInverse:p=false,arrow:h=false,size:v="medium",closeOnEscape:m=true,wrapperCss:g}=e,b=(0,iO._)(e,["onClick","isOpen","disabled","closePopover","placement","children","animationType","dotsOrientation","maxWidth","isInverse","arrow","size","closeOnEscape","wrapperCss"]);var _=(0,n.useRef)(null);return/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("button",(0,ep._)((0,ef._)({type:"button",ref:_,onClick:r,css:[EW.button({isOpen:o,isInverse:p,isDisabled:a}),g],disabled:a},b),{children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:d==="horizontal"?"threeDots":"threeDotsVertical",width:32,height:32})})),/*#__PURE__*/(0,t/* .jsx */.Y)(lz,{gap:13,maxWidth:f,placement:l,triggerRef:_,isOpen:o,closePopover:s,animationType:u,arrow:h,closeOnEscape:m,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:EW.wrapper({size:v}),children:i().Children.map(c,e=>{if(/*#__PURE__*/i().isValidElement(e)){var t={size:v};return /*#__PURE__*/i().cloneElement(e,t)}return e})})})]})};Ez.Option=EB;/* export default */const Eq=/* unused pure expression or super */null&&Ez;var EW={wrapper:e=>{var{size:t="medium"}=e;return/*#__PURE__*/(0,c/* .css */.AH)("padding-block:",ik/* .spacing["8"] */.YK["8"],";position:relative;",t==="small"&&(0,c/* .css */.AH)(EN(),ik/* .spacing["4"] */.YK["4"]))},option:e=>{var{isTrash:t=false,size:r="medium"}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",iS/* .typography.body */.I.body(),";width:100%;padding:",ik/* .spacing["10"] */.YK["10"]," ",ik/* .spacing["20"] */.YK["20"],";transition:background-color 0.3s ease-in-out;cursor:pointer;display:flex;align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";&:focus,&:active,&:hover{background:none;color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}svg{flex-shrink:0;color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}",r==="small"&&(0,c/* .css */.AH)(EH(),ik/* .spacing["8"] */.YK["8"],ik/* .spacing["16"] */.YK["16"],iS/* .typography.small */.I.small("medium")),":hover:not(:disabled){background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";color:",ik/* .colorTokens.text.title */.I6.text.title,";svg{color:",ik/* .colorTokens.icon.hover */.I6.icon.hover,";filter:grayscale(0%);}}:disabled{cursor:not-allowed;color:",ik/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",ik/* .colorTokens.icon.disable.background */.I6.icon.disable.background,";}}",t&&(0,c/* .css */.AH)(EV(),ik/* .colorTokens.text.error */.I6.text.error,ik/* .colorTokens.icon.error */.I6.icon.error,ik/* .colorTokens.text.error */.I6.text.error,EL()(ik/* .colorTokens.bg.error */.I6.bg.error,.1),ik/* .colorTokens.icon.error */.I6.icon.error,ik/* .colorTokens.text.error */.I6.text.error,ik/* .colorTokens.color.danger["40"] */.I6.color.danger["40"],ik/* .colorTokens.icon.error */.I6.icon.error),":focus-visible{outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:-4px;border-radius:",ik/* .borderRadius.input */.Vq.input,";}")},button:e=>{var{isOpen:t=false,isInverse:r=false,isDisabled:n=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";width:32px;height:32px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";display:flex;justify-content:center;align-items:center;transition:background-color 0.3s ease-in-out;svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";flex-shrink:0;}:hover{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}}&:focus,&:active{background:none;}&:focus-visible{outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}",t&&(0,c/* .css */.AH)(EU(),ik/* .colorTokens.background.hover */.I6.background.hover,ik/* .colorTokens.icon.brand */.I6.icon.brand)," ",r&&(0,c/* .css */.AH)(EK(),ik/* .colorTokens.background.white */.I6.background.white,ik/* .colorTokens.background.white */.I6.background.white,!n&&ik/* .colorTokens.icon.brand */.I6.icon.brand),":disabled{cursor:not-allowed;}")}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/utils/dndkit.ts
var EG=e=>defaultAnimateLayoutChanges(_object_spread_props(_object_spread({},e),{wasDragging:true}));var E$={droppable:{strategy:hq.Always}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/components/subscription/PreviewItem.tsx
function EQ(){var e=(0,eh._)(["\n        overflow: hidden;\n        text-overflow: ellipsis;\n        max-width: 100%;\n        min-width: 0;\n      "]);EQ=function t(){return e};return e}function EX(){var e=(0,eh._)(["\n          overflow: unset;\n          text-overflow: unset;\n          animation: marquee-slide ","s ease-out forwards;\n          will-change: transform;\n\n          @keyframes marquee-slide {\n            0% {\n              transform: translateX(0);\n            }\n            100% {\n              transform: translateX(-","px);\n            }\n          }\n        "]);EX=function t(){return e};return e}function EJ(){var e=(0,eh._)(["\n      border-radius: ",";\n      box-shadow: ",";\n\n      [data-grabber] {\n        cursor: grabbing;\n      }\n    "]);EJ=function t(){return e};return e}function EZ(){var e=(0,eh._)(["\n      overflow: hidden;\n      text-overflow: ellipsis;\n      max-width: 100%;\n      min-width: 0;\n    "]);EZ=function t(){return e};return e}var E0=60;var E1=(e,t)=>{switch(e){case"hour":return t>1?(0,lo.__)("Hours","tutor-pro"):(0,lo.__)("Hour","tutor-pro");case"day":return t>1?(0,lo.__)("Days","tutor-pro"):(0,lo.__)("Day","tutor-pro");case"week":return t>1?(0,lo.__)("Weeks","tutor-pro"):(0,lo.__)("Week","tutor-pro");case"month":return t>1?(0,lo.__)("Months","tutor-pro"):(0,lo.__)("Month","tutor-pro");case"year":return t>1?(0,lo.__)("Years","tutor-pro"):(0,lo.__)("Year","tutor-pro");case"until_cancellation":return(0,lo.__)("Until Cancellation","tutor-pro")}};var E2=e=>{var{subscription:t,courseId:r,isBundle:n,isOverlay:i}=e;var o;var[a,s]=useState(false);var[l,c]=useState(0);var[u,d]=useState(0);var{showModal:f,updateModal:p,closeModal:h}=useModal();var v=useSaveCourseSubscriptionMutation(r);var m=useDeleteCourseSubscriptionMutation(r);var g=useDuplicateCourseSubscriptionMutation(r);var b=useRef(null);var _=useRef(null);var{attributes:y,listeners:x,setNodeRef:w,transform:A,transition:E,isDragging:I}=useSortable({id:t.id||"",animateLayoutChanges});var k={transform:CSS.Transform.toString(A),transition:E,opacity:I?.3:undefined,background:I?colorTokens.stroke.hover:undefined};var S=useMemo(()=>{var e="".concat(t.recurring_limit.toString().padStart(2,"0")," ").concat(__("Billing Cycles","tutor-pro"));if(t.recurring_limit===BILLING_CYCLE_CUSTOM_PRESETS.untilCancelled){e=__("Until Cancellation","tutor-pro")}if(t.recurring_limit===BILLING_CYCLE_CUSTOM_PRESETS.noRenewal){e=__("No Renewal","tutor-pro")}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("span",{children:"•"}),/*#__PURE__*/_jsx("span",{children:e})]})},[t.recurring_limit]);var O=useMemo(()=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Show,{when:t.payment_type==="recurring",fallback:/*#__PURE__*/_jsx("span",{children:__("Lifetime","tutor-pro")}),children:/*#__PURE__*/_jsx("span",{children:/*#__PURE__*/_jsx(Show,{when:t.recurring_limit!==BILLING_CYCLE_CUSTOM_PRESETS.noRenewal,fallback:"".concat(t.recurring_value.toString().padStart(2,"0")," ").concat(E1(t.recurring_interval,Number(t.recurring_value))),children:sprintf(__("Renew every %1$s %2$s","tutor-pro"),t.recurring_value.toString().padStart(2,"0"),E1(t.recurring_interval,Number(t.recurring_value)))})})}),/*#__PURE__*/_jsx(Show,{when:t.payment_type!=="onetime",children:S})]}),[t.payment_type,t.recurring_limit,t.recurring_interval,t.recurring_value,S]);var T=useCallback(e=>{var r=convertFormDataToSubscription(t);v.mutate(_object_spread_props(_object_spread({},r),{is_enabled:e?"1":"0"}))},[t,v]);var C=useCallback(()=>{var e=_object_spread_props(_object_spread({},t),{isSaved:true});f({component:SubscriptionModal,props:{icon:/*#__PURE__*/_jsx(SVGIcon,{name:"dollarRecurring",width:24,height:24}),subscription:e,courseId:r,isBundle:n}});s(false)},[t,f,r,n]);var R=useCallback(()=>_async_to_generator(function*(){p("subscription-delete-modal",{isLoading:true});var e=yield m.mutateAsync(Number(t.id));if(e.status_code===200){h()}})(),[p,m,t.id,h]);var D=useCallback(()=>_async_to_generator(function*(){var e=yield g.mutateAsync(Number(t.id));if(e.data){s(false)}})(),[g,t.id]);var F=useCallback(e=>{if(e.key==="Enter"||e.key===" "){C()}},[C]);var Y=useCallback(()=>{s(false);f({id:"subscription-delete-modal",component:ConfirmationModal,props:{title:sprintf(__('Delete "%s"',"tutor-pro"),t.plan_name),description:__("Are you sure you want to delete this plan? This cannot be undone.","tutor-pro"),onConfirm:R,confirmButtonVariant:"danger"}})},[f,t.plan_name,R]);useEffect(()=>{var e=b.current;var t=_.current;if(!e||!t){return}var r=t.scrollWidth>e.clientWidth;if(r){var n=t.scrollWidth-e.clientWidth;d(n);c(n/E0)}},[t.plan_name,t.payment_type,t.recurring_value,t.recurring_interval,t.recurring_limit]);var M;return /*#__PURE__*/_jsxs("div",{"data-cy":"subscription-preview-item",css:E6.wrapper({isActionButtonVisible:a||v.isPending,isOverlay:i,marqueeDuration:l,marqueeDistance:u}),style:k,ref:w,"aria-label":__("Subscription plan item","tutor-pro"),children:[/*#__PURE__*/_jsx(SVGIcon,_object_spread_props(_object_spread({},x,y),{"data-grabber":true,name:"threeDotsVerticalDouble",width:20,height:20})),/*#__PURE__*/_jsxs("div",{css:E6.item,children:[/*#__PURE__*/_jsxs("div",{css:E6.header,children:[/*#__PURE__*/_jsxs("p",{css:E6.title,onClick:C,onKeyDown:F,tabIndex:0,"aria-label":__("Edit subscription plan","tutor-pro"),children:[/*#__PURE__*/_jsx("span",{"data-plan-name":true,title:t.plan_name,children:t.plan_name}),/*#__PURE__*/_jsx(Show,{when:t.is_featured,children:/*#__PURE__*/_jsx(SVGIcon,{style:E6.featuredIcon,name:"starFill",height:16,width:16})}),/*#__PURE__*/_jsx(Show,{when:!t.is_enabled,children:/*#__PURE__*/_jsx(TutorBadge,{css:E6.badge,variant:"secondary",title:__("Inactive","tutor-pro"),children:__("Inactive","tutor-pro")})})]}),/*#__PURE__*/_jsxs("div",{css:E6.actionButtons,"data-action-buttons":true,children:[/*#__PURE__*/_jsx(Switch,{checked:t.is_enabled,onChange:T,loading:v.isPending,size:"small"}),/*#__PURE__*/_jsxs(ThreeDots,{isOpen:a,closePopover:()=>s(false),onClick:()=>s(!a),dotsOrientation:"vertical",size:"small",arrow:true,"data-three-dot":true,children:[/*#__PURE__*/_jsx(ThreeDots.Option,{icon:/*#__PURE__*/_jsx(SVGIcon,{name:"edit",width:16,height:16}),text:__("Edit","tutor-pro"),"data-cy":"edit-subscription",onClick:C}),/*#__PURE__*/_jsx(ThreeDots.Option,{icon:g.isPending?/*#__PURE__*/_jsx(LoadingSpinner,{size:16}):/*#__PURE__*/_jsx(SVGIcon,{name:"duplicate",width:16,height:16}),text:__("Duplicate","tutor-pro"),onClick:D}),/*#__PURE__*/_jsx(ThreeDots.Option,{icon:/*#__PURE__*/_jsx(SVGIcon,{name:"delete",width:16,height:16}),text:__("Delete","tutor-pro"),isTrash:true,onClick:Y})]})]})]}),/*#__PURE__*/_jsx("p",{css:E6.information,ref:b,"aria-label":__("Subscription plan details","tutor-pro"),title:(M=(o=b.current)===null||o===void 0?void 0:o.textContent)!==null&&M!==void 0?M:undefined,children:/*#__PURE__*/_jsx("span",{css:E6.marqueeSlide,ref:_,"data-marquee-content":true,children:/*#__PURE__*/_jsx("span",{children:O})})})]})]})};var E6={wrapper:e=>{var{isActionButtonVisible:t=false,isOverlay:r=false,marqueeDuration:n=0,marqueeDistance:i=0}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";gap:",ik/* .spacing["4"] */.YK["4"],";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["4"] */.YK["4"],";min-width:0;[data-grabber]{align-self:flex-start;margin-top:",ik/* .spacing["2"] */.YK["2"],";color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";flex-shrink:0;cursor:grab;&:focus-visible{border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";}}[data-three-dot]{height:20px;width:20px;svg{height:24px;width:24px;flex-shrink:0;}}[data-action-buttons]{opacity:",t?1:0,";background-color:inherit;}[data-marquee-content]{",i>0&&(0,c/* .css */.AH)(EQ()),"}&:hover{background-color:",ik/* .colorTokens.background.hover */.I6.background.hover,";[data-action-buttons]{opacity:1;}[data-marquee-content]{",i>0&&(0,c/* .css */.AH)(EX(),n,i),"}}&:not(:last-of-type){border-bottom:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";}&:focus-within{[data-action-buttons]{opacity:1;}}",r&&(0,c/* .css */.AH)(EJ(),ik/* .borderRadius.card */.Vq.card,ik/* .shadow.drag */.r7.drag))},item:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;min-height:48px;",aR/* .styleUtils.display.flex */.x.display.flex("column"),";justify-content:center;gap:",ik/* .spacing["4"] */.YK["4"],";min-width:0;"),header:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;gap:",ik/* .spacing["8"] */.YK["8"],";min-width:0;"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";display:flex;align-items:center;cursor:pointer;[data-plan-name]{",aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),";}&:focus-visible{border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),information:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;max-width:100%;min-width:0;",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";display:flex;align-items:center;flex-grow:1;overflow:hidden;position:relative;white-space:nowrap;"),marqueeContent:e=>{var{shouldEllipsis:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:inline-block;white-space:nowrap;vertical-align:middle;min-width:100%;span{margin-right:",ik/* .spacing["4"] */.YK["4"],";white-space:nowrap;&:last-child{margin-right:0;}}",t&&(0,c/* .css */.AH)(EZ()))},marqueeSlide:/*#__PURE__*/(0,c/* .css */.AH)("display:inline-block;white-space:nowrap;vertical-align:middle;min-width:100%;span{margin-right:",ik/* .spacing["4"] */.YK["4"],";white-space:nowrap;&:last-child{margin-right:0;}}"),featuredIcon:/*#__PURE__*/(0,c/* .css */.AH)("flex-shrink:0;color:",ik/* .colorTokens.icon.brand */.I6.icon.brand,";"),actionButtons:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";height:100%;align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";"),badge:/*#__PURE__*/(0,c/* .css */.AH)("flex-shrink:0;margin-left:",ik/* .spacing["8"] */.YK["8"],";font-size:",ik/* .fontSize["11"] */.J["11"],";padding:0 ",ik/* .spacing["6"] */.YK["6"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/utils/currency.ts
var E4,E5,E3,E8,E9;var E7=e=>{var{symbol:t="$",position:r="left",thousandSeparator:n=",",decimalSeparator:i=".",fraction_digits:o=2}=e;return e=>{var a=e=>{var t=e.toFixed(o);var[r,a]=t.split(".");var s=r.replace(/\B(?=(\d{3})+(?!\d))/g,n);return a?"".concat(s).concat(i).concat(a):s};var s=a(Number(e));if(r==="left"){return"".concat(t).concat(s)}return"".concat(s).concat(t)}};var Ie,It,Ir,In,Ii;var Io=E7({symbol:(Ie=(E4=bA/* .tutorConfig.tutor_currency */.P.tutor_currency)===null||E4===void 0?void 0:E4.symbol)!==null&&Ie!==void 0?Ie:"$",position:(It=(E5=bA/* .tutorConfig.tutor_currency */.P.tutor_currency)===null||E5===void 0?void 0:E5.position)!==null&&It!==void 0?It:"left",thousandSeparator:(Ir=(E3=bA/* .tutorConfig.tutor_currency */.P.tutor_currency)===null||E3===void 0?void 0:E3.thousand_separator)!==null&&Ir!==void 0?Ir:",",decimalSeparator:(In=(E8=bA/* .tutorConfig.tutor_currency */.P.tutor_currency)===null||E8===void 0?void 0:E8.decimal_separator)!==null&&In!==void 0?In:".",fraction_digits:Number((Ii=(E9=bA/* .tutorConfig.tutor_currency */.P.tutor_currency)===null||E9===void 0?void 0:E9.no_of_decimal)!==null&&Ii!==void 0?Ii:2)});var Ia=e=>{var t,r,n;var i;var o=(i=(t=tutorConfig.tutor_currency)===null||t===void 0?void 0:t.currency)!==null&&i!==void 0?i:"USD";var a;var s=(a=(r=tutorConfig.local)===null||r===void 0?void 0:r.replace("_","-"))!==null&&a!==void 0?a:"en-US";var l;var c=Number((l=(n=tutorConfig.tutor_currency)===null||n===void 0?void 0:n.no_of_decimal)!==null&&l!==void 0?l:2);var u=new Intl.NumberFormat(s,{style:"currency",currency:o,minimumFractionDigits:c});return u.format(e)};var Is=e=>{var{discount_type:t,discount_amount:r,total:n}=e;var i=Il({discount_amount:r,discount_type:t,total:n});return n-i};var Il=e=>{var{discount_type:t,discount_amount:r,total:n}=e;if(t==="flat"){return r}return n*(r/100)};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/CourseCard.tsx
function Ic(e){var{course:r,isSubscriptionCourse:n,handleReplaceClick:i}=e;var o;var{title:a,image:s,last_updated:l,course_duration:c,total_enrolled:u,regular_price:d,sale_price:f,is_purchasable:p}=r;var h=a4();var v=h.watch("subscription");var m=(o=r.plans)===null||o===void 0?void 0:o.find(e=>String(e.id)===v);return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Id.wrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Id.overlay,"data-overlay":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"secondary",icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"refresh",width:24,height:24}),onClick:i,children:(0,lo.__)("Replace","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Id.thumb,children:/*#__PURE__*/(0,t/* .jsx */.Y)("img",{src:s,alt:a})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Id.content,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Id.time,children:l}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Id.title,children:a}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Id.bottom,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"clock",width:20,height:20}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:c})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"user",width:20,height:20}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:u})]})]})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!n&&!m,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Id.footer,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:Id.priceLabel,children:(0,lo.__)("Price:","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:p,fallback:(0,lo.__)("Free","tutor-pro"),children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:Id.price,children:f?f:d}),f&&/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:Id.discountPrice,children:d})]})]})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:m,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Id.footer,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:Id.price,children:Number(m===null||m===void 0?void 0:m.sale_price)>0?Io(Number(m===null||m===void 0?void 0:m.sale_price)):Io(Number(m===null||m===void 0?void 0:m.regular_price))}),Number(m===null||m===void 0?void 0:m.sale_price)>0&&/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:Id.discountPrice,children:Io(Number(m===null||m===void 0?void 0:m.regular_price))}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Id.recurringInterval,children:["/"," ",Number(m===null||m===void 0?void 0:m.recurring_value)>1?m===null||m===void 0?void 0:m.recurring_value.toString().padStart(2,"0"):""," ",E1((m===null||m===void 0?void 0:m.recurring_interval)||"",Number(m===null||m===void 0?void 0:m.recurring_value))]})]})})]})}/* export default */const Iu=Ic;var Id={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("border:1px solid ",ik/* .colorTokens.stroke.border */.I6.stroke.border,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";overflow:hidden;position:relative;&:hover{[data-overlay]{display:flex;}}"),overlay:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;height:100%;width:100%;display:flex;align-items:center;justify-content:center;background-color:#41454fb2;backdrop-filter:blur(2px);display:none;"),thumb:/*#__PURE__*/(0,c/* .css */.AH)("height:144px;width:100%;img{width:100%;height:100%;object-fit:cover;}"),content:/*#__PURE__*/(0,c/* .css */.AH)("background-color:",ik/* .colorTokens.background.white */.I6.background.white,";padding:",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["20"] */.YK["20"]," ",ik/* .spacing["20"] */.YK["20"],";"),time:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";margin-bottom:",ik/* .spacing["8"] */.YK["8"],";"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body("bold"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";margin-bottom:",ik/* .spacing["16"] */.YK["16"],";"),bottom:/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:2fr 1fr;align-items:center;> div{",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";display:flex;align-items:center;gap:",ik/* .spacing["2"] */.YK["2"],";}svg{color:",ik/* .colorTokens.text.hints */.I6.text.hints,";}"),footer:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["20"] */.YK["20"],";border-top:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";"),priceLabel:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.hints */.I6.text.hints,";"),price:/*#__PURE__*/(0,c/* .css */.AH)("font-weight:",ik/* .fontWeight.medium */.Wy.medium,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";"),discountPrice:/*#__PURE__*/(0,c/* .css */.AH)("text-decoration:line-through;color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),recurringInterval:/*#__PURE__*/(0,c/* .css */.AH)("text-transform:capitalize;")};// CONCATENATED MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js
/**
 * @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 True if the given value is a date
 *
 * @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 If(e){return e instanceof Date||typeof e==="object"&&Object.prototype.toString.call(e)==="[object Date]"}// Fallback for modularized imports:
/* export default */const Ip=/* unused pure expression or super */null&&If;// CONCATENATED MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js
/**
 * @module constants
 * @summary Useful constants
 * @description
 * Collection of useful date constants.
 *
 * The constants could be imported from `date-fns/constants`:
 *
 * ```ts
 * import { maxTime, minTime } from "./constants/date-fns/constants";
 *
 * function isAllowedTime(time) {
 *   return time <= maxTime && time >= minTime;
 * }
 * ```
 *//**
 * @constant
 * @name daysInWeek
 * @summary Days in 1 week.
 */const Ih=7;/**
 * @constant
 * @name daysInYear
 * @summary Days in 1 year.
 *
 * @description
 * How many days in a year.
 *
 * One years equals 365.2425 days according to the formula:
 *
 * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
 * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
 */const Iv=365.2425;/**
 * @constant
 * @name maxTime
 * @summary Maximum allowed time.
 *
 * @example
 * import { maxTime } from "./constants/date-fns/constants";
 *
 * const isValid = 8640000000000001 <= maxTime;
 * //=> false
 *
 * new Date(8640000000000001);
 * //=> Invalid Date
 */const Im=Math.pow(10,8)*24*60*60*1e3;/**
 * @constant
 * @name minTime
 * @summary Minimum allowed time.
 *
 * @example
 * import { minTime } from "./constants/date-fns/constants";
 *
 * const isValid = -8640000000000001 >= minTime;
 * //=> false
 *
 * new Date(-8640000000000001)
 * //=> Invalid Date
 */const Ig=/* unused pure expression or super */null&&-Im;/**
 * @constant
 * @name millisecondsInWeek
 * @summary Milliseconds in 1 week.
 */const Ib=6048e5;/**
 * @constant
 * @name millisecondsInDay
 * @summary Milliseconds in 1 day.
 */const I_=864e5;/**
 * @constant
 * @name millisecondsInMinute
 * @summary Milliseconds in 1 minute
 */const Iy=6e4;/**
 * @constant
 * @name millisecondsInHour
 * @summary Milliseconds in 1 hour
 */const Ix=36e5;/**
 * @constant
 * @name millisecondsInSecond
 * @summary Milliseconds in 1 second
 */const Iw=1e3;/**
 * @constant
 * @name minutesInYear
 * @summary Minutes in 1 year.
 */const IA=525600;/**
 * @constant
 * @name minutesInMonth
 * @summary Minutes in 1 month.
 */const IE=43200;/**
 * @constant
 * @name minutesInDay
 * @summary Minutes in 1 day.
 */const II=1440;/**
 * @constant
 * @name minutesInHour
 * @summary Minutes in 1 hour.
 */const Ik=60;/**
 * @constant
 * @name monthsInQuarter
 * @summary Months in 1 quarter.
 */const IS=3;/**
 * @constant
 * @name monthsInYear
 * @summary Months in 1 year.
 */const IO=12;/**
 * @constant
 * @name quartersInYear
 * @summary Quarters in 1 year
 */const IT=4;/**
 * @constant
 * @name secondsInHour
 * @summary Seconds in 1 hour.
 */const IC=3600;/**
 * @constant
 * @name secondsInMinute
 * @summary Seconds in 1 minute.
 */const IR=60;/**
 * @constant
 * @name secondsInDay
 * @summary Seconds in 1 day.
 */const ID=/* unused pure expression or super */null&&IC*24;/**
 * @constant
 * @name secondsInWeek
 * @summary Seconds in 1 week.
 */const IF=/* unused pure expression or super */null&&ID*7;/**
 * @constant
 * @name secondsInYear
 * @summary Seconds in 1 year.
 */const IY=/* unused pure expression or super */null&&ID*Iv;/**
 * @constant
 * @name secondsInMonth
 * @summary Seconds in 1 month
 */const IM=/* unused pure expression or super */null&&IY/12;/**
 * @constant
 * @name secondsInQuarter
 * @summary Seconds in 1 quarter.
 */const Ij=/* unused pure expression or super */null&&IM*3;/**
 * @constant
 * @name constructFromSymbol
 * @summary Symbol enabling Date extensions to inherit properties from the reference date.
 *
 * The symbol is used to enable the `constructFrom` function to construct a date
 * using a reference date and a value. It allows to transfer extra properties
 * from the reference date to the new date. It's useful for extensions like
 * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
 * a constructor argument.
 */const IP=Symbol.for("constructDateFrom");// CONCATENATED MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js
/**
 * @name constructFrom
 * @category Generic Helpers
 * @summary Constructs a date using the reference date and the value
 *
 * @description
 * The function constructs a new date using the constructor from the reference
 * date and the given value. It helps to build generic functions that accept
 * date extensions.
 *
 * It defaults to `Date` if the passed reference date is a number or a string.
 *
 * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
 * enabling to transfer extra properties from the reference date to the new date.
 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
 * that accept a time zone as a constructor argument.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 *
 * @param date - The reference date to take constructor from
 * @param value - The value to create the date
 *
 * @returns Date initialized using the given date and value
 *
 * @example
 * import { constructFrom } from "./constructFrom/date-fns";
 *
 * // A function that clones a date preserving the original type
 * function cloneDate<DateType extends Date>(date: DateType): DateType {
 *   return constructFrom(
 *     date, // Use constructor from the given date
 *     date.getTime() // Use the date value to create a new date
 *   );
 * }
 */function IL(e,t){if(typeof e==="function")return e(t);if(e&&typeof e==="object"&&IP in e)return e[IP](t);if(e instanceof Date)return new e.constructor(t);return new Date(t)}// Fallback for modularized imports:
/* export default */const IN=/* unused pure expression or super */null&&IL;// CONCATENATED MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js
/**
 * @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.
 *
 * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
 * enabling to transfer extra properties from the reference date to the new date.
 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
 * that accept a time zone as a constructor argument.
 *
 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
 *
 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
 *
 * @param argument - The value to convert
 *
 * @returns The parsed date in the local time zone
 *
 * @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 IH(e,t){// [TODO] Get rid of `toDate` or `constructFrom`?
return IL(t||e,e)}// Fallback for modularized imports:
/* export default */const IV=/* unused pure expression or super */null&&IH;// CONCATENATED MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js
/**
 * @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](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 The date is valid
 *
 * @example
 * // For the valid date:
 * const result = isValid(new Date(2014, 1, 31))
 * //=> true
 *
 * @example
 * // For the value, convertible into a date:
 * const result = isValid(1393804800000)
 * //=> true
 *
 * @example
 * // For the invalid date:
 * const result = isValid(new Date(''))
 * //=> false
 */function IU(e){return!(!If(e)&&typeof e!=="number"||isNaN(+IH(e)))}// Fallback for modularized imports:
/* export default */const IK=/* unused pure expression or super */null&&IU;// CONCATENATED MODULE: ./node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isBefore.js
/**
 * @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 - The date that should be before the other one to return true
 * @param dateToCompare - The date to compare with
 *
 * @returns The first date is before the second date
 *
 * @example
 * // Is 10 July 1989 before 11 February 1987?
 * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
 * //=> false
 */function IB(e,t){return+IH(e)<+IH(t)}// Fallback for modularized imports:
/* export default */const Iz=/* unused pure expression or super */null&&IB;// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/usePaginatedTable.ts
var Iq=function(){var{limit:e=ak/* .ITEMS_PER_PAGE */.re}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var[t,r]=(0,n.useState)({page:1,sortProperty:"",sortDirection:undefined,filter:{}});var i=t;var o=e*Math.max(0,i.page-1);var a=(0,n.useCallback)(e=>{r(t=>(0,ef._)({},t,e))},[r]);var s=e=>a({page:e});var l=(0,n.useCallback)(e=>a({page:1,filter:e}),[a]);var c=e=>{var t={};if(e!==i.sortProperty){t={sortDirection:"asc",sortProperty:e}}else{t={sortDirection:i.sortDirection==="asc"?"desc":"asc",sortProperty:e}}a(t)};return{pageInfo:i,onPageChange:s,onColumnSort:c,offset:o,itemsPerPage:e,onFilterItems:l}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/molecules/Paginator.tsx
var IW=e=>{var{currentPage:r,onPageChange:i,totalItems:o,itemsPerPage:a}=e;var s=Math.max(Math.ceil(o/a),1);var[l,c]=(0,n.useState)("");(0,n.useEffect)(()=>{c(r.toString())},[r]);var u=e=>{if(e<1||e>s){return}i(e)};return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:I$.wrapper,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:I$.pageStatus,children:[(0,lo.__)("Page","tutor-pro"),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:/*#__PURE__*/(0,t/* .jsx */.Y)("input",{type:"text",css:I$.paginationInput,value:l,onChange:e=>{var{value:t}=e.currentTarget;var r=t.replace(/[^0-9]/g,"");var n=Number(r);if(n>0&&n<=s){c(r);i(n)}else if(!r){c(r)}},autoComplete:"off"})}),(0,lo.__)("of","tutor-pro")," ",/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:s})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:I$.pageController,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("button",{type:"button",css:I$.paginationButton,onClick:()=>u(r-1),disabled:r===1,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:!ak/* .isRTL */.V8?"chevronLeft":"chevronRight",width:32,height:32})}),/*#__PURE__*/(0,t/* .jsx */.Y)("button",{type:"button",css:I$.paginationButton,onClick:()=>u(r+1),disabled:r===s,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:!ak/* .isRTL */.V8?"chevronRight":"chevronLeft",width:32,height:32})})]})]})};/* export default */const IG=IW;var I$={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;justify-content:end;align-items:center;flex-wrap:wrap;gap:",ik/* .spacing["8"] */.YK["8"],";height:36px;"),pageStatus:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),"    color:",ik/* .colorTokens.text.title */.I6.text.title,";min-width:100px;"),paginationInput:/*#__PURE__*/(0,c/* .css */.AH)("outline:0;border:1px solid ",ik/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";margin:0 ",ik/* .spacing["8"] */.YK["8"],";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";padding:8px 12px;width:72px;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:",ik/* .spacing["0"] */.YK["0"],";}&[type='number']{-moz-appearance:textfield;}"),pageController:/*#__PURE__*/(0,c/* .css */.AH)("gap:",ik/* .spacing["8"] */.YK["8"],";display:flex;justify-content:center;align-items:center;height:100%;"),paginationButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";background:",ik/* .colorTokens.background.white */.I6.background.white,";color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";height:32px;width:32px;display:grid;place-items:center;transition:background-color 0.2s ease-in-out,color 0.3s ease-in-out;svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:hover{background:",ik/* .colorTokens.background["default"] */.I6.background["default"],";& > svg{color:",ik/* .colorTokens.icon.brand */.I6.icon.brand,";}}&:disabled{background:",ik/* .colorTokens.background.white */.I6.background.white,";& > svg{color:",ik/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/molecules/Table.tsx
function IQ(){var e=(0,eh._)(["\n      border: 1px solid ",";\n      border-radius: ",";\n    "]);IQ=function t(){return e};return e}function IX(){var e=(0,eh._)(["\n      border-bottom: 1px solid ",";\n    "]);IX=function t(){return e};return e}function IJ(){var e=(0,eh._)(["\n      &:nth-of-type(even) {\n        background-color: ",";\n      }\n    "]);IJ=function t(){return e};return e}function IZ(){var e=(0,eh._)(["\n        background-color: ",";\n      "]);IZ=function t(){return e};return e}function I0(){var e=(0,eh._)(["\n        background-color: ",";\n      "]);I0=function t(){return e};return e}function I1(){var e=(0,eh._)(["\n        :last-of-type {\n          border-bottom: none;\n        }\n      "]);I1=function t(){return e};return e}var I2={bodyRowSelected:ik/* .colorTokens.background.active */.I6.background.active,bodyRowHover:ik/* .colorTokens.background.hover */.I6.background.hover};var I6=e=>{var{columns:r,data:n,entireHeader:i=null,headerHeight:o=60,noHeader:a=false,isStriped:s=false,isRounded:l=false,stripedBySelectedIndex:u=[],colors:d={},isBordered:f=true,loading:p=false,itemsPerPage:h=1,querySortProperties:v,querySortDirections:m={},onSortClick:g,renderInLastRow:b,rowStyle:_,sortIcons:y={asc:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"sortAsc",height:16,width:16}),desc:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"sortDesc",height:16,width:16})}}=e;var x=(e,n)=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("tr",{css:[I5.tableRow({isBordered:f,isStriped:s}),I5.bodyTr({colors:d,isSelected:u.includes(e),isRounded:l}),_],children:r.map((e,r)=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("td",{css:[I5.td,{width:e.width}],children:n(e)},r)})},e)};var w=e=>{var r=null;var n=e.sortProperty;if(!n){return e.Header}if(v===null||v===void 0?void 0:v.includes(n)){if((m===null||m===void 0?void 0:m[n])==="asc"){r=y.asc}else{r=y.desc}}return/*#__PURE__*/(0,t/* .jsxs */.FD)("button",{type:"button",css:I5.headerWithIcon,onClick:()=>g===null||g===void 0?void 0:g(n),children:[e.Header,r&&r]})};var A=()=>{if(i){return/*#__PURE__*/(0,t/* .jsx */.Y)("th",{css:I5.th,colSpan:r.length,children:i})}return r.map((e,r)=>{if(e.Header!==null){return/*#__PURE__*/(0,t/* .jsx */.Y)("th",{css:[I5.th,e.css,{width:e.width}],colSpan:e.headerColSpan,children:w(e)},r)}})};var E=()=>{if(p){return(0,iV/* .range */.y1)(h).map(e=>x(e,()=>/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{animation:true,height:20,width:"".concat((0,iV/* .getRandom */.G0)(40,80),"%")})))}if(!n.length){return/*#__PURE__*/(0,t/* .jsx */.Y)("tr",{css:I5.tableRow({isBordered:false,isStriped:false}),children:/*#__PURE__*/(0,t/* .jsx */.Y)("td",{colSpan:r.length,css:[I5.td,/*#__PURE__*/(0,c/* .css */.AH)("text-align:center;")],children:"No Data!"})})}var e=n.map((e,t)=>{return x(t,r=>{return"Cell"in r?r.Cell(e,t):r.accessor(e,t)})});if(b){b=/*#__PURE__*/(0,t/* .jsx */.Y)("tr",{children:/*#__PURE__*/(0,t/* .jsx */.Y)("td",{css:I5.td,children:b})},e.length);e.push(b)}return e};return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:I5.tableContainer({isRounded:l}),children:/*#__PURE__*/(0,t/* .jsxs */.FD)("table",{css:I5.table,children:[!a&&/*#__PURE__*/(0,t/* .jsx */.Y)("thead",{children:/*#__PURE__*/(0,t/* .jsx */.Y)("tr",{css:[I5.tableRow({isBordered:f,isStriped:s}),{height:o}],children:A()})}),/*#__PURE__*/(0,t/* .jsx */.Y)("tbody",{children:E()})]})})};/* export default */const I4=I6;var I5={tableContainer:e=>{var{isRounded:t}=e;return/*#__PURE__*/(0,c/* .css */.AH)("display:block;width:100%;overflow-x:auto;",t&&(0,c/* .css */.AH)(IQ(),ik/* .colorTokens.stroke.divider */.I6.stroke.divider,ik/* .borderRadius["6"] */.Vq["6"]))},headerWithIcon:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";",iS/* .typography.body */.I.body(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";display:flex;gap:",ik/* .spacing["8"] */.YK["8"],";align-items:center;svg{color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}"),table:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;border-collapse:collapse;border:none;"),tableRow:e=>{var{isBordered:t,isStriped:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)(t&&(0,c/* .css */.AH)(IX(),ik/* .colorTokens.stroke.divider */.I6.stroke.divider)," ",r&&(0,c/* .css */.AH)(IJ(),ik/* .colorTokens.background.active */.I6.background.active))},th:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";padding:0 ",ik/* .spacing["16"] */.YK["16"],";border:none;"),bodyTr:e=>{var{colors:t,isSelected:r,isRounded:n}=e;var{bodyRowDefault:i,bodyRowSelectedHover:o,bodyRowHover:a=I2.bodyRowHover,bodyRowSelected:s=I2.bodyRowSelected}=t;return/*#__PURE__*/(0,c/* .css */.AH)(i&&(0,c/* .css */.AH)(IZ(),i),"      &:hover{background-color:",r&&o?o:a,";}",r&&(0,c/* .css */.AH)(I0(),s)," ",n&&(0,c/* .css */.AH)(I1()))},td:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),";padding:",ik/* .spacing["16"] */.YK["16"],";border:none;")};// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_async_to_generator.js
function I3(e,t,r,n,i,o,a){try{var s=e[o](a);var l=s.value}catch(e){r(e);return}if(s.done)t(l);else Promise.resolve(l).then(n,i)}function I8(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){I3(o,n,i,a,s,"next",e)}function s(e){I3(o,n,i,a,s,"throw",e)}a(undefined)})}};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/services/enrollment.ts
var I9=e=>{return xX.post(xZ.CREATE_ENROLLMENT,e)};var I7=()=>{return b1({mutationFn:I9})};var ke=e=>{return xX.get(xZ.GET_COURSE_BUNDLE_LIST,{params:e})};var kt=e=>{return Ep({queryKey:["CurseList",e],placeholderData:T,queryFn:()=>ke(e).then(e=>e.data)})};var kr=e=>{return xX.get(xZ.GET_UNENROLLED_USERS,{params:e})};var kn=e=>{return Ep({queryKey:["StudentList",e],placeholderData:T,queryFn:()=>kr(e).then(e=>e.data)})};var ki={onUpload:e=>I8(function*(){try{var t=yield ki.readFile(e);return ki.parseCSV(t)}catch(e){var r=(0,lo.__)("CSV processing failed.","tutor-pro")+(e instanceof Error?" ".concat(e.message):"");throw new Error(r)}})(),readFile:e=>{return new Promise((t,r)=>{var n=new FileReader;n.onload=e=>{var r;return t((r=e.target)===null||r===void 0?void 0:r.result)};n.onerror=e=>r(e);n.readAsText(e)})},parseCSV:e=>{var t=e.split("\n");var r=false;var n=-1;var i=-1;var o=-1;var a=[];for(var s of t){var l=s.trim();if(!l)continue;if(!r){var c=l.split(",").map(e=>e.trim());n=c.indexOf("first_name");i=c.indexOf("last_name");o=c.indexOf("email");if(n===-1||i===-1||o===-1){throw new Error((0,lo.__)("CSV file is missing required headers.","tutor-pro"))}r=true;continue}var u=l.split(",");if(Math.max(n,i,o)>=u.length){continue}var d=u[n].trim();var f=u[i].trim();var p=u[o].trim();if(d&&f&&p){a.push({first_name:d,last_name:f,email:p})}}if(a.length===0){throw new Error((0,lo.__)("No valid student data found in the CSV file.","tutor-pro"))}return a}};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/course-placeholder.png
const ko=r.p+"images/course-placeholder-3ae4bdaf.png";// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/hooks/useDebounce.ts
var ka=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:300;var[r,i]=(0,n.useState)(e);(0,n.useEffect)(()=>{var r=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(r)}},[e,t]);return r};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/CourseListModal/SearchField.tsx
var ks=e=>{var{onFilterItems:r}=e;var i=ln({defaultValues:{search:""}});var o=ka(i.watch("search"));(0,n.useEffect)(()=>{r(aF({},o.length>0&&{search:o}))},[r,o]);return/*#__PURE__*/(0,t/* .jsx */.Y)(so,{control:i.control,name:"search",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(At,aM(aF({},e),{content:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"search",width:24,height:24}),placeholder:(0,lo.__)("Search...","tutor-pro"),showVerticalBar:false}))})};/* export default */const kl=ks;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/CourseListModal/CourseListTable.tsx
var kc=e=>{var{onSelectClick:r}=e;var n;var{pageInfo:i,onPageChange:o,itemsPerPage:a,offset:s,onFilterItems:l}=Iq();var c=kt({offset:s,limit:a,filter:i.filter,context:"manual_enrollment"});var u=e=>{var r=e.pause_enrollment==="yes";var n=e.course_enrollment_period==="yes"&&e.enrollment_ends_at&&IU(new Date(e.enrollment_ends_at))&&IB((0,iV/* .convertGMTtoLocalDate */.g1)(e.enrollment_ends_at),new Date);if(n){return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.subscriptionBadge,children:(0,lo.__)("Enrollment Period Expired","tutor-pro")})}if(r){return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.subscriptionBadge,children:(0,lo.__)("Enrollment Paused","tutor-pro")})}return null};var d=[{Header:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.tableLabel,children:(0,lo.__)("Name","tutor-pro")}),Cell:e=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kd.courseItemWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("img",{src:e.image||ko,css:kd.thumbnail,alt:(0,lo.__)("Course item","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[(0,iH/* .isDefined */.O9)(e.total_course)&&/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.bundleBadge,children:(0,lo.sprintf)((0,lo.__)("%d Course Bundle","tutor-pro"),Number(e.total_course))}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:e.selling_option==="subscription"&&e.plan_start_price,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kd.subscriptionBadge,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"dollarRecurring",width:16,height:16}),(0,lo.__)("Subscription","tutor-pro")]})}),u(e),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.title,children:e.title})]})]})}},{Header:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.tablePriceLabel,children:(0,lo.__)("Price","tutor-pro")}),Cell:e=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kd.priceWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{"data-button":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"select-course",size:"small",onClick:()=>r(e),children:(0,lo.__)("Select","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.price,"data-price":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:e.is_purchasable,fallback:(0,lo.__)("Free","tutor-pro"),children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:e.selling_option==="subscription"&&e.plan_start_price,fallback:/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:e.sale_price?e.sale_price:e.regular_price}),e.sale_price&&/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:kd.discountPrice,children:e.regular_price})]}),children:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:kd.startingFrom,children:(0,lo.sprintf)((0,lo.__)("Starting from %s","tutor-pro"),e.plan_start_price)})})})})]})}}];if(c.isLoading){return/*#__PURE__*/(0,t/* .jsx */.Y)(lJ,{})}if(!c.data){return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.errorMessage,children:(0,lo.__)("Something went wrong","tutor-pro")})}var f=c.data.results;// If from woocommerce convert the monetization data to appropriate format.
if(f&&((n=bA/* .tutorConfig.settings */.P.settings)===null||n===void 0?void 0:n.monetize_by)==="wc"){f.map(e=>{var t;// Remove the span html tags returned by woocommerce.
var r=e.regular_price.replace(/<\/?[^>]+(>|$)/g,"");var n;var i=(n=(t=e.sale_price)===null||t===void 0?void 0:t.replace(/<\/?[^>]+(>|$)/g,""))!==null&&n!==void 0?n:null;// Get the html encoded currency string and decode it.
e.regular_price=(0,iV/* .decodeHtmlEntities */.jT)(r);e.sale_price=i?(0,iV/* .decodeHtmlEntities */.jT)(i):"";return e})}return/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.tableActions,children:/*#__PURE__*/(0,t/* .jsx */.Y)(kl,{onFilterItems:l})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.tableWrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(I4,{columns:d,data:f!==null&&f!==void 0?f:[],itemsPerPage:a,loading:c.isFetching||c.isRefetching})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kd.paginatorWrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(IG,{currentPage:i.page,onPageChange:o,totalItems:c.data.total_items,itemsPerPage:a})})]})};/* export default */const ku=kc;var kd={tableLabel:/*#__PURE__*/(0,c/* .css */.AH)("text-align:left;"),tablePriceLabel:/*#__PURE__*/(0,c/* .css */.AH)("text-align:right;"),tableActions:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["20"] */.YK["20"],";"),tableWrapper:/*#__PURE__*/(0,c/* .css */.AH)("max-height:calc(100vh - 350px);overflow:auto;tr{&:hover{[data-button]{display:block;}[data-price]{display:none;}}}"),paginatorWrapper:/*#__PURE__*/(0,c/* .css */.AH)("margin:",ik/* .spacing["20"] */.YK["20"]," ",ik/* .spacing["16"] */.YK["16"],";"),courseItemWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["16"] */.YK["16"],";"),bundleBadge:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.tiny */.I.tiny(),";display:inline-block;padding:0px ",ik/* .spacing["8"] */.YK["8"],";background-color:#9342e7;color:",ik/* .colorTokens.text.white */.I6.text.white,";border-radius:",ik/* .borderRadius["40"] */.Vq["40"],";"),subscriptionBadge:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.tiny */.I.tiny(),";display:flex;align-items:center;width:fit-content;padding:0px ",ik/* .spacing["6"] */.YK["6"]," 0px ",ik/* .spacing["4"] */.YK["4"],";background-color:",ik/* .colorTokens.color.warning["90"] */.I6.color.warning["90"],";color:",ik/* .colorTokens.text.white */.I6.text.white,";border-radius:",ik/* .borderRadius["40"] */.Vq["40"],";"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";"),thumbnail:/*#__PURE__*/(0,c/* .css */.AH)("width:48px;height:48px;border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";object-fit:cover;object-position:center;"),priceWrapper:/*#__PURE__*/(0,c/* .css */.AH)("text-align:right;[data-button]{display:none;}"),price:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";display:flex;gap:",ik/* .spacing["4"] */.YK["4"],";justify-content:end;"),startingFrom:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.hints */.I6.text.hints,";"),discountPrice:/*#__PURE__*/(0,c/* .css */.AH)("text-decoration:line-through;color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),errorMessage:/*#__PURE__*/(0,c/* .css */.AH)("height:100px;display:flex;align-items:center;justify-content:center;")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/CourseListModal/index.tsx
function kf(e){var{title:r,closeModal:n,actions:i,form:o}=e;function a(e){o.setValue("course",e,{shouldValidate:true});o.setValue("students",[]);o.setValue("subscription","");n({action:"CONFIRM"})}return/*#__PURE__*/(0,t/* .jsx */.Y)(mI,{onClose:()=>n({action:"CLOSE"}),title:r,actions:i,maxWidth:720,children:/*#__PURE__*/(0,t/* .jsx */.Y)(ku,{onSelectClick:a})})}/* export default */const kp=kf;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/FormSelectCourse.tsx
function kh(e){var{field:r,fieldState:n,disabled:i}=e;var o=a4();var{showModal:a}=i7();var s=o.watch("course");var l=!!n.error;return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{field:r,fieldState:n,disabled:i,children:()=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:s?/*#__PURE__*/(0,t/* .jsx */.Y)(Iu,{course:s,isSubscriptionCourse:s.selling_option==="subscription",handleReplaceClick:()=>{a({component:kp,props:{title:(0,lo.__)("Replace course","tutor-pro"),form:o},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})}}):/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"select-course-plan",variant:l?"danger":"primary",icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"course",width:24,height:24}),buttonCss:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["24"] */.YK["24"]," ",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["20"] */.YK["20"],";"),disabled:i,onClick:()=>{a({component:kp,props:{title:(0,lo.__)("Select course","tutor-pro"),form:o},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})},children:(0,lo.__)("Select Course","tutor-pro")})})}})}/* export default */const kv=kh;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/EnrollmentConfirmationModal.tsx
var km=e=>{var{closeModal:r,maximumStudents:n,totalEnrolled:i,totalStudents:o}=e;var a=i>Number(n);var s=o+i-Number(n);var l=a?o:s;return/*#__PURE__*/(0,t/* .jsxs */.FD)(mI,{onClose:()=>r({action:"CLOSE"}),title:(0,lo.__)("Student Enrollment Limit Exceeded","tutor-pro"),maxWidth:588,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kb.content,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kb.alertWrapper,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kb.alert,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"warning",width:40,height:40}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kb.alertContent,children:[(0,lo.sprintf)((0,lo._n)("This course has reached its maximum enrollment limit of %d student.","This course has reached its maximum enrollment limit of %d students.",n,"tutor-pro"),n)," ",(0,lo.sprintf)((0,lo._n)("You're attempting to enroll %d more students, which exceeds the limit.","You're attempting to enroll %d more students, which exceeds the limit.",l,"tutor-pro"),l)]})]})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kb.enrollmentStats,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("p",{children:(0,lo.__)("Enrollment Limit","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("p",{children:n})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("p",{children:(0,lo.__)("Currently Enrolled","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("p",{"data-success":true,children:i})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("p",{children:(0,lo._n)("Exceeding Student","Exceeding Students",l,"tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("p",{"data-error":true,children:l})]})]})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kb.footerWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",onClick:()=>r({action:"CLOSE"}),size:"small",children:(0,lo.__)("Cancel","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{size:"small",onClick:()=>{r({action:"CONFIRM"})},children:(0,lo.__)("Enroll Anyway","tutor-pro")})]})]})};/* export default */const kg=km;var kb={content:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["16"] */.YK["16"],";padding:",ik/* .spacing["20"] */.YK["20"],";"),alertWrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";padding:",ik/* .spacing["20"] */.YK["20"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",ik/* .colorTokens.text.warning */.I6.text.warning,";background-color:",ik/* .colorTokens.background.status.warning */.I6.background.status.warning,";"),alert:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";gap:",ik/* .spacing["8"] */.YK["8"],";svg{flex-shrink:0;color:",ik/* .colorTokens.icon.warning */.I6.icon.warning,";align-self:center;}"),alertContent:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.warning */.I6.text.warning,";"),enrollmentStats:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";div{flex:1;padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["16"] */.YK["16"],";&:not(:first-of-type):not(:last-of-type){border-left:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";border-right:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";}p{",iS/* .typography.caption */.I.caption(),";&:last-of-type{margin-top:",ik/* .spacing["4"] */.YK["4"],";font-weight:",ik/* .fontWeight.medium */.Wy.medium,";&[data-success]{color:",ik/* .colorTokens.text.success */.I6.text.success,";}&[data-error]{color:",ik/* .colorTokens.text.error */.I6.text.error,";}}}}"),footerWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;justify-content:end;gap:",ik/* .spacing["8"] */.YK["8"],";padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";box-shadow:0px -1px 0px 0px ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";")};// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_tagged_template_literal.js
function k_(e,t){if(!t)t=e.slice(0);return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/atoms/VirtualList.tsx
var ky=40;var kx=8;var kw=e=>{var{items:r,height:o,itemHeight:a=ky,renderItem:s}=e;var l=(0,n.useRef)(null);var[c,u]=(0,n.useState)(0);var d=(0,n.useRef)();(0,n.useEffect)(()=>{if(l.current){u(l.current.scrollTop)}return()=>{if(d.current){cancelAnimationFrame(d.current)}}},[]);var f=(0,n.useCallback)(e=>{var t=e.target;if(!t)return;if(d.current){cancelAnimationFrame(d.current)}d.current=requestAnimationFrame(()=>{u(t.scrollTop)})},[]);var{visibleItems:p,startIndex:h,totalHeight:v}=(0,n.useMemo)(()=>{var e=kx;var t=Math.max(0,Math.floor(c/a)-e);var n=Math.ceil(o/a)+e*2;var i=Math.min(t+n,r.length);return{visibleItems:r.slice(t,i),startIndex:t,totalHeight:r.length*a}},[r,c,o,a]);if(o<=0||a<=0){// eslint-disable-next-line no-console
console.warn("VirtualList: Invalid height or itemHeight provided");return null}if(!(r===null||r===void 0?void 0:r.length)){return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{ref:l,style:{height:o}})}return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{ref:l,css:kE.wrapper,style:{height:o,width:"100%",position:"relative"},onScroll:f,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{style:{height:v,position:"relative"},children:p.map((e,r)=>/*#__PURE__*/(0,t/* .jsx */.Y)(i().Fragment,{children:s(e,h+r,{position:"absolute",top:(h+r)*a,height:a,width:"100%"})},h+r))})})};/* export default */const kA=kw;var kE={wrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.overflowYAuto */.x.overflowYAuto,"    scrollbar-gutter:auto;")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/public/images/profile-photo.png
const kI=r.p+"images/profile-photo-92d02228.png";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/enrollment-completed.webp
const kk=r.p+"images/enrollment-completed-b527ce8e.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/enrollment-completed-2x.webp
const kS=r.p+"images/enrollment-completed-2x-334c595a.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/enrollment-failed.webp
const kO=r.p+"images/enrollment-failed-1301fade.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/enrollment-inprogress.webp
const kT=r.p+"images/enrollment-inprogress-15a6c170.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/enrollment-inprogress-2x.webp
const kC=r.p+"images/enrollment-inprogress-2x-8ea0fed9.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/EnrollmentStatusModal.tsx
function kR(){var e=k_(["\n      max-height: 400px;\n      padding: "," "," "," ",";\n    "]);kR=function t(){return e};return e}function kD(){var e=k_(["\n      gap: ",";\n\n      img {\n        flex-shrink: 0;\n        width: 120px;\n        height: 100px;\n      }\n    "]);kD=function t(){return e};return e}var kF=5;var kY=44;var kM=e=>{var{title:r,subtitle:i,onClose:o,totalEnrolledStudents:a=0,failedEnrollmentList:s=[],progress:l=100,totalStudents:c=0,hasError:u=false}=e;var[d,f]=(0,n.useState)(false);var p=()=>{if(u){return{src:kO,srcSet:"".concat(kO," 1x, ").concat(kO," 2x"),alt:(0,lo.__)("Enrollment Failed Illustrations.","tutor-pro")}}if(l<100){return{src:kT,srcSet:"".concat(kT," 1x, ").concat(kC," 2x"),alt:(0,lo.__)("Enrollment In Progress Illustrations.","tutor-pro")}}if(a===0){return{src:kO,srcSet:"".concat(kO," 1x, ").concat(kO," 2x"),alt:(0,lo.__)("Enrollment Failed Illustrations.","tutor-pro")}}return{src:kk,srcSet:"".concat(kk," 1x, ").concat(kS," 2x"),alt:(0,lo.__)("Enrollment Completed Illustrations.","tutor-pro")}};var h=()=>/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.progress,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.progressHeader,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:iS/* .typography.caption */.I.caption(),children:(0,lo.__)("Enrolling Students","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.progressCount,children:[l,"%"]})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kP.progressBar({progress:l})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kP.progressInfo,children:(0,lo.sprintf)((0,lo._n)("%1$d of %2$d student enrolled","%1$d of %2$d students enrolled",c,"tutor-pro"),a,c)})]});var v=()=>/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("h6",{css:kP.title,children:r}),/*#__PURE__*/(0,t/* .jsx */.Y)("p",{css:kP.subtitle,children:i})]});var{src:m,srcSet:g,alt:b}=p();return/*#__PURE__*/(0,t/* .jsx */.Y)(mI,{onClose:o,maxWidth:446,entireHeader:/*#__PURE__*/(0,t/* .jsx */.Y)(t/* .Fragment */.FK,{children:" "}),isCloseAble:l===100||u,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.wrapper({isCompleted:l===100||u}),children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.header({isCompleted:l===100||u}),children:[/*#__PURE__*/(0,t/* .jsx */.Y)("img",{src:m,srcSet:g,alt:b}),l===100||u?v():h()]}),/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:l===100||u,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.reportList,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!u,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kP.reportWrapper,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.report,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{"data-check-icon":true,name:"checkFilledWhite",width:24,height:24}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kP.reportInfo,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.reportLeft,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:(0,lo.__)("Successfully Enrolled","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:(0,lo.sprintf)((0,lo._n)("%d Student","%d Students",a,"tutor-pro"),a)})]})})]})})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:s.length>0&&!u,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("button",{css:[aR/* .styleUtils.resetButton */.x.resetButton,kP.reportWrapper],onClick:()=>f(!d),children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.report,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{"data-cross-icon":true,name:"crossCircle",width:28,height:28}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.reportInfo,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.reportLeft,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:(0,lo.__)("Failed to Enroll","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:(0,lo.sprintf)((0,lo._n)("%d Student","%d Students",s.length,"tutor-pro"),s.length)})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{"data-down-icon":true,name:"chevronDown",width:24,height:24})]})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:d,children:/*#__PURE__*/(0,t/* .jsx */.Y)(kA,{height:s.length>kF?kF*kY:s.length*kY,items:s,itemHeight:kY,renderItem:(e,r,n)=>/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kP.studentWrapper,style:n,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kP.student,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{"data-student-index":true,children:r+1}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{"data-student-info":true,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("img",{src:kI,alt:(0,lo.__)("Student Avatar","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:"".concat(e.first_name," ").concat(e.last_name)}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:e.email})]})]})]})})})})]})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kP.footer,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"primary",size:"small",onClick:o,children:(0,lo.__)("Okay","tutor-pro")})})]})]})})};/* export default */const kj=kM;var kP={wrapper:e=>{var{isCompleted:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["24"] */.YK["24"],";padding:",ik/* .spacing["32"] */.YK["32"]," ",ik/* .spacing["24"] */.YK["24"]," ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["24"] */.YK["24"],";max-height:800px;transition:max-height 0.3s ease-in-out;",!t&&(0,c/* .css */.AH)(kR(),ik/* .spacing["32"] */.YK["32"],ik/* .spacing["64"] */.YK["64"],ik/* .spacing["48"] */.YK["48"],ik/* .spacing["64"] */.YK["64"]))},header:e=>{var{isCompleted:t=false}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["8"] */.YK["8"],";align-items:center;img{width:228px;height:228px;object-fit:contain;object-position:center;}",!t&&(0,c/* .css */.AH)(kD(),ik/* .spacing["24"] */.YK["24"]))},title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.heading6 */.I.heading6("medium"),";text-align:center;"),subtitle:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";text-align:center;"),progress:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;",aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["4"] */.YK["4"],";"),progressHeader:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;"),progressCount:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.flexCenter */.x.flexCenter(),";",iS/* .typography.tiny */.I.tiny("bold"),";padding:",ik/* .spacing["2"] */.YK["2"]," ",ik/* .spacing["4"] */.YK["4"],";background-color:",ik/* .colorTokens.background.status.success */.I6.background.status.success,";color:",ik/* .colorTokens.text.success */.I6.text.success,";border-radius:",ik/* .borderRadius["12"] */.Vq["12"],";"),progressBar:e=>{var{progress:t=0}=e;return/*#__PURE__*/(0,c/* .css */.AH)("position:relative;width:100%;height:6px;background-color:",ik/* .colorTokens.color.black["10"] */.I6.color.black["10"],";border-radius:",ik/* .borderRadius["50"] */.Vq["50"],";overflow:hidden;&::after{content:'';position:absolute;top:0;left:0;width:",t,"%;height:100%;background-color:",ik/* .colorTokens.bg.success */.I6.bg.success,";border-radius:",ik/* .borderRadius["50"] */.Vq["50"],";transition:width 0.3s ease-in;}")},progressInfo:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),reportList:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["8"] */.YK["8"],";"),reportWrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["12"] */.YK["12"],";background-color:",ik/* .colorTokens.primary["30"] */.I6.primary["30"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["12"] */.YK["12"],";"),report:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["12"] */.YK["12"],";[data-check-icon]{color:",ik/* .colorTokens.icon.success */.I6.icon.success,";flex-shrink:0;}[data-cross-icon]{color:",ik/* .colorTokens.icon.error */.I6.icon.error,";flex-shrink:0;}[data-down-icon]{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";flex-shrink:0;}"),reportInfo:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;",aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;align-items:center;"),reportLeft:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";div:first-of-type{",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";}div:last-of-type{",iS/* .typography.small */.I.small("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}"),studentWrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.flexCenter */.x.flexCenter(),";"),student:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;background-color:",ik/* .colorTokens.background.white */.I6.background.white,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;padding:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["10"] */.YK["10"],";gap:",ik/* .spacing["8"] */.YK["8"],";[data-student-index]{max-width:24px;width:100%;",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";text-align:center;}[data-student-info]{",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";img{width:24px;height:24px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";object-fit:cover;object-position:center;}div{div:first-of-type{",iS/* .typography.tiny */.I.tiny("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";}div:last-of-type{",iS/* .typography.tiny */.I.tiny(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";}}}"),footer:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:end;")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/layout/Topbar.tsx
var kL;var kN=80;var kH=20;var kV=(kL=bA/* .tutorConfig.settings */.P.settings)===null||kL===void 0?void 0:kL.membership_only_mode;function kU(){var e=a4();var r=(0,iV/* .isAddonEnabled */.GR)("subscription");var i=bA/* .tutorConfig.settings.has_active_membership_plans */.P.settings.has_active_membership_plans;var o=I7();var{showModal:a,closeModal:s,updateModal:l}=i7();var c=e.watch("plan");var u=e.watch("course");var d=e.watch("subscription");var f;var p=(f=e.watch("students"))!==null&&f!==void 0?f:[];var h;var v=(h=e.watch("csv_students"))!==null&&h!==void 0?h:[];var{total_enrolled:m=0,maximum_students:g=0}=u!==null&&u!==void 0?u:{};var b=p.length+v.length;var _=(e,t)=>{if(e.course){return t?[Number(e.subscription)]:[e.course.id]}if(e.plan){return[e.plan.id]}return[]};var y=()=>{if(d||c){window.location.href=bA/* ["default"].TUTOR_SUBSCRIPTIONS_PAGE */.A.TUTOR_SUBSCRIPTIONS_PAGE}else{window.location.href=bA/* ["default"].TUTOR_ENROLLMENTS_PAGE */.A.TUTOR_ENROLLMENTS_PAGE}};var x=e=>I8(function*(){var t=!!e.subscription.length;a({component:kj,id:"enrollment-progress",props:{title:(0,lo.__)("Enrollment Completed","tutor-pro"),subtitle:(0,lo.__)("Enrollment has been completed successfully.","tutor-pro"),totalEnrolledStudents:0,failedEnrollmentList:[],onClose:()=>{s();y()},progress:0,totalStudents:b},depthIndex:ik/* .zIndex.highest */.fE.highest});try{var r=p.map(e=>e.ID);var n=v;var i=0;var c=0;var u=[];var d=0;while(i<r.length||c<n.length){var f;var h=r.slice(i,i+kH);var m=h.length;i+=m;var g=kH-m;var x=n.slice(c,c+g);c+=x.length;var w=yield o.mutateAsync(aF({student_ids:h,csv_students:x,object_ids:_(e,t),payment_status:e.payment_status,order_type:t||e.plan?"subscription":"single_order"},t&&{course_id:(f=e.course)===null||f===void 0?void 0:f.id}));if(w.status_code!==200){throw{response:w}}var{failed_enrollment_list:A=[],total_enrolled_students:E=0}=w.data||{};u=[...u,...A];d+=E;var I=Math.floor((i+c)/(r.length+n.length)*100);l("enrollment-progress",{title:d===0&&I===100?(0,lo.__)("Enrollment Failed","tutor-pro"):(0,lo.__)("Enrollment Completed","tutor-pro"),subtitle:u.length>0?(0,lo.__)("The enrollment process is complete. But, some students couldn't be enrolled. Check the list below:","tutor-pro"):(0,lo.__)("Enrollment has been completed successfully.","tutor-pro"),progress:I,totalEnrolledStudents:d,failedEnrollmentList:u})}}catch(e){l("enrollment-progress",{title:(0,lo.__)("Enrollment Failed","tutor-pro"),subtitle:(0,lo.sprintf)((0,lo.__)("Enrollment has been failed. Cause: %s","tutor-pro"),e instanceof Error?e.message:(0,lo.__)("Unknown","tutor-pro")),onClose:s,hasError:true})}})();(0,n.useEffect)(()=>{var t=t=>{if(o.isPending){t.preventDefault();return}e.reset()};window.addEventListener("beforeunload",t);return()=>{window.removeEventListener("beforeunload",t)};// eslint-disable-next-line react-hooks/exhaustive-deps
},[o.isPending]);return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kB.wrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kB.container,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kB.innerWrapper,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kB.left,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("button",{type:"button",css:aR/* .styleUtils.backButton */.x.backButton,onClick:()=>{if(r&&i&&(u||c)){e.reset()}else{window.location.href=bA/* ["default"].TUTOR_ENROLLMENTS_PAGE */.A.TUTOR_ENROLLMENTS_PAGE}},children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"arrowLeft",width:26,height:26})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kB.headerContent,children:/*#__PURE__*/(0,t/* .jsx */.Y)("h4",{css:iS/* .typography.heading5 */.I.heading5("medium"),children:kV?(0,lo.__)("Member Enrollment","tutor-pro"):(0,lo.__)("Enroll Students","tutor-pro")})})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kB.right,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"enroll-now",variant:"primary",disabled:!c&&!u||!p.length&&!v.length,onClick:Number(g)&&Number(m)+b>Number(g)?()=>{a({component:kg,props:{maximumStudents:Number(g),totalEnrolled:m,totalStudents:b},depthIndex:ik/* .zIndex.highest */.fE.highest}).then(t=>{if(t.action==="CONFIRM"){e.handleSubmit(x)()}})}:e.handleSubmit(x),loading:o.isPending,children:(0,lo.__)("Enroll Now","tutor-pro")})})]})})})}/* export default */const kK=kU;var kB={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("height:",kN,"px;background:",ik/* .colorTokens.surface.navbar */.I6.surface.navbar,";border-bottom:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";position:sticky;top:32px;z-index:",ik/* .zIndex.header */.fE.header,";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{padding-inline:",ik/* .spacing["8"] */.YK["8"],";height:auto;}"),container:/*#__PURE__*/(0,c/* .css */.AH)("max-width:1054px;margin:0 auto;height:100%;"),innerWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;height:100%;padding-inline:",ik/* .spacing["12"] */.YK["12"],";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{padding-block:",ik/* .spacing["12"] */.YK["12"],";flex-direction:column;gap:",ik/* .spacing["8"] */.YK["8"],";}"),headerContent:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["16"] */.YK["16"],";h4{margin:0;}"),left:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;gap:",ik/* .spacing["16"] */.YK["16"],";",ik/* .Breakpoint.smallMobile */.EA.smallMobile,"{width:100%;}"),right:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;gap:",ik/* .spacing["12"] */.YK["12"],";")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/empty-state.webp
const kz=r.p+"images/empty-state-2f9ee424.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/images/empty-state-2x.webp
const kq=r.p+"images/empty-state-2x-d498c58b.webp";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/MembershipPlanListModal/SearchField.tsx
var kW=e=>{var{onFilterItems:r}=e;var i=ln({defaultValues:{search:""}});var o=ka(i.watch("search"));(0,n.useEffect)(()=>{r(aF({},o.length>0&&{search:o}))},[r,o]);return/*#__PURE__*/(0,t/* .jsx */.Y)(so,{control:i.control,name:"search",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(At,aM(aF({},e),{content:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"search",width:24,height:24}),placeholder:(0,lo.__)("Search...","tutor-pro"),showVerticalBar:false}))})};/* export default */const kG=kW;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/MembershipPlanListModal/MembershipPlanListTable.tsx
var k$=e=>{var{onSelectClick:r,selectedPlanId:i}=e;var o=EC();var[a,s]=(0,n.useState)("");var l=(0,n.useMemo)(()=>{if(!o.data)return[];var e=o.data.filter(e=>e.is_enabled==="1");if(!a){return e}return e.filter(e=>e.plan_name.toLowerCase().includes(a.toLowerCase()))},[o.data,a]);var c=(0,n.useCallback)(e=>{s(e.search||"")},[]);var u=[{Header:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kX.tableLabel,children:(0,lo.__)("Plan Name","tutor-pro")}),Cell:e=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kX.title,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"crownOutlined",width:32,height:32}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[e.plan_name,/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:e.is_featured==="1",children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"starFill",width:16,height:16})})]})]})}},{Header:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kX.tablePriceLabel,children:(0,lo.__)("Price","tutor-pro")}),Cell:e=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kX.priceWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{"data-button":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"select-plan",size:"small",onClick:()=>r(e),disabled:i===e.id,children:(0,lo.__)("Select","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:kX.price,"data-price":true,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:Io(Number(e.sale_price)||Number(e.regular_price))}),Number(e.sale_price)>0&&/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:kX.discountPrice,children:Io(Number(e.regular_price))}),"/",/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:kX.recurringInterval,children:(0,iV/* .formatSubscriptionRepeatUnit */.u5)({unit:e.recurring_interval,value:Number(e.recurring_value)})})]})]})}}];if(o.isLoading){return/*#__PURE__*/(0,t/* .jsx */.Y)(lJ,{})}if(!o.data){return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kX.errorMessage,children:(0,lo.__)("Something went wrong","tutor-pro")})}return/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kX.tableActions,children:/*#__PURE__*/(0,t/* .jsx */.Y)(kG,{onFilterItems:c})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:kX.tableWrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(I4,{columns:u,data:l,loading:o.isFetching})})]})};/* export default */const kQ=k$;var kX={tableLabel:/*#__PURE__*/(0,c/* .css */.AH)("text-align:left;"),tablePriceLabel:/*#__PURE__*/(0,c/* .css */.AH)("text-align:right;"),tableActions:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["20"] */.YK["20"],";"),tableWrapper:/*#__PURE__*/(0,c/* .css */.AH)("max-height:calc(100vh - 350px);overflow:auto;tr{&:hover{[data-button]{display:block;}[data-price]{display:none;}}}"),title:/*#__PURE__*/(0,c/* .css */.AH)("height:48px;",iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";svg{flex-shrink:0;color:",ik/* .colorTokens.icon.hints */.I6.icon.hints,";}div{",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";svg{color:",ik/* .colorTokens.icon.brand */.I6.icon.brand,";}}"),priceWrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;justify-content:flex-end;height:48px;text-align:right;[data-button]{display:none;}"),price:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";display:flex;gap:",ik/* .spacing["2"] */.YK["2"],";justify-content:end;"),discountPrice:/*#__PURE__*/(0,c/* .css */.AH)("text-decoration:line-through;color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),recurringInterval:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.hints */.I6.text.hints,";"),errorMessage:/*#__PURE__*/(0,c/* .css */.AH)("height:100px;display:flex;align-items:center;justify-content:center;")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/MembershipPlanListModal/index.tsx
var kJ=e=>{var{title:r,closeModal:n,actions:i,onSelectClick:o,selectedPlanId:a}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)(mI,{onClose:()=>n({action:"CLOSE"}),title:r,actions:i,maxWidth:546,children:/*#__PURE__*/(0,t/* .jsx */.Y)(kQ,{onSelectClick:e=>{o(e);n({action:"CONFIRM"})},selectedPlanId:a})})};/* export default */const kZ=kJ;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/MembershipPlanCard.tsx
var k0=2;var k1=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(e.length<=k0){return e.map(e=>e.title).join(", ")}var t=e.slice(0,k0);var r=e.length-k0;return"".concat(t.map(e=>e.title).join(", ")," ").concat((0,lo.sprintf)((0,lo.__)("+ %d More","tutor-pro"),r))};var k2=e=>{var{plan:r,onReplace:n}=e;var i={full_site:(0,lo.__)("Full Site","tutor-pro"),category:k1((r===null||r===void 0?void 0:r.categories)||[])};return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.wrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k4.overlay,"data-overlay":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"secondary",icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"refresh",width:24,height:24}),onClick:()=>n(),children:(0,lo.__)("Replace","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.header,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.planName,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"crownOutlined",width:24,height:24}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:r.plan_name}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:r.is_featured==="1",children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"starFill",width:16,height:16})})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.priceWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:k4.price,children:Io(Number(r.sale_price)||Number(r.regular_price))}),Number(r.sale_price)>0&&/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:k4.discountPrice,children:Io(Number(r.regular_price))}),/*#__PURE__*/(0,t/* .jsxs */.FD)("span",{css:k4.priceLabel,children:["/",(0,iV/* .formatSubscriptionRepeatUnit */.u5)({unit:r.recurring_interval,value:Number(r.recurring_value),capitalize:false})]})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:Number(r.enrollment_fee)>0,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k4.infoCardWrapper({isSuccess:false}),children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.infoCard,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k4.infoCardLeft,children:/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:(0,lo.__)("One Time Enrollment Fee:","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:k4.infoCardRight,children:Io(Number(r.enrollment_fee))})]})})})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.footer,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k4.footerTitle,children:(0,lo.__)("Plan Details","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.footerInfo,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:(0,lo.__)("Access:","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:i[r.plan_type]})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.footerInfo,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:(0,lo.__)("Billing Interval:","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:(0,iV/* .formatSubscriptionRepeatUnit */.u5)({unit:r.recurring_interval,value:Number(r.recurring_value),useLySuffix:true})})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.footerInfo,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:(0,lo.__)("Auto Renewal:","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:Number(r.recurring_limit)>0?(0,lo.sprintf)((0,lo.__)("%s Times","tutor-pro"),r.recurring_limit):(0,lo.__)("Until Cancelled","tutor-pro")})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k4.footerInfo,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:(0,lo.__)("Certificate:","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{children:r.provide_certificate==="1"?(0,lo.__)("Available","tutor-pro"):(0,lo.__)("Not Available","tutor-pro")})]})]})]})};/* export default */const k6=k2;var k4={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("border:1px solid ",ik/* .colorTokens.stroke.border */.I6.stroke.border,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";overflow:hidden;position:relative;background-color:",ik/* .colorTokens.background.white */.I6.background.white,";&:hover{[data-overlay]{display:flex;}}"),overlay:/*#__PURE__*/(0,c/* .css */.AH)("position:absolute;height:100%;width:100%;display:flex;align-items:center;justify-content:center;background-color:#41454fb2;backdrop-filter:blur(2px);display:none;"),header:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["16"] */.YK["16"],";",aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["8"] */.YK["8"],";border-bottom:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";"),planName:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";",iS/* .typography.body */.I.body("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";svg{color:",ik/* .colorTokens.brand.blue */.I6.brand.blue,";flex-shrink:0;}"),priceWrapper:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";flex-wrap:wrap;align-items:flex-end;gap:",ik/* .spacing["8"] */.YK["8"],";",iS/* .typography.body */.I.body(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),price:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.heading5 */.I.heading5("bold"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";"),priceLabel:/*#__PURE__*/(0,c/* .css */.AH)("text-transform:lowercase;"),discountPrice:/*#__PURE__*/(0,c/* .css */.AH)("text-decoration:line-through;"),infoCardWrapper:e=>{var{isSuccess:t=true}=e;return/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["4"] */.YK["4"]," ",ik/* .spacing["8"] */.YK["8"],";background-color:",t?ik/* .colorTokens.color.success["40"] */.I6.color.success["40"]:ik/* .colorTokens.primary["40"] */.I6.primary["40"],";border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";svg{flex-shrink:0;align-self:center;color:",t?ik/* .colorTokens.icon.success */.I6.icon.success:"none",";}")},infoCard:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;justify-content:space-between;",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";"),infoCardLeft:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";"),infoCardRight:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.primary */.I6.text.primary,";"),footer:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["16"] */.YK["16"],";",aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["8"] */.YK["8"],";",iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";"),footerTitle:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small("medium"),";"),footerInfo:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;align-items:flex-start;span:last-of-type{text-transform:capitalize;color:",ik/* .colorTokens.text.primary */.I6.text.primary,";text-align:right;}")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/FormSelectPlan.tsx
var k5=e=>{var{field:r,fieldState:n,disabled:i,onChange:o}=e;var a=bA/* .tutorConfig.settings.membership_only_mode */.P.settings.membership_only_mode;var{showModal:s}=i7();var l=!!n.error;var c=r.value;var u=()=>{s({component:kZ,props:{title:(0,lo.__)("Select a Plan","tutor-pro"),onSelectClick:e=>{r.onChange(e);o===null||o===void 0?void 0:o()},selectedPlanId:c===null||c===void 0?void 0:c.id},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})};return/*#__PURE__*/(0,t/* .jsx */.Y)(fH,{field:r,fieldState:n,disabled:i,children:()=>{return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:c,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:l?"danger":a?"primary":"secondary",icon:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"dollarRecurring",width:24,height:24}),disabled:i,onClick:u,"data-cy":"select-course-plan",children:(0,lo.__)("Select Plan","tutor-pro")}),children:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(k6,{plan:e,onReplace:u})})})}})};/* export default */const k3=k5;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/EmptyState.tsx
var k8=()=>{var e=a4();var r=(0,iV/* .isAddonEnabled */.GR)("subscription");var n=bA/* .tutorConfig.settings.has_active_membership_plans */.P.settings.has_active_membership_plans;var i=bA/* .tutorConfig.settings.membership_only_mode */.P.settings.membership_only_mode;return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k7.container,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k7.wrapper,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:k7.emptyState,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("img",{css:k7.emptyStateImage,src:kz,srcSet:"".concat(kz," 1x, ").concat(kq," 2x"),alt:(0,lo.__)("Empty State","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("h6",{css:k7.title,children:i?(0,lo.__)("Select a membership plan to enroll students","tutor-pro"):r?(0,lo.__)("Select a course or a membership plan to enroll students","tutor-pro"):(0,lo.__)("Select a course to enroll students","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:k7.buttonWrapper,children:/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:!i,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"plan",control:e.control,render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(k3,aF({},e))}),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:r&&n,children:/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"plan",control:e.control,render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(k3,aF({},e))})}),/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"course",control:e.control,render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(kv,aF({},e))})]})})]})})})};/* export default */const k9=k8;var k7={container:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:center;min-height:calc(100vh - ",kN,"px);"),wrapper:/*#__PURE__*/(0,c/* .css */.AH)("max-width:687px;width:100%;"),emptyState:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;margin-top:",ik/* .spacing["40"] */.YK["40"],";padding:",ik/* .spacing["40"] */.YK["40"]," ",ik/* .spacing["32"] */.YK["32"]," ",ik/* .spacing["48"] */.YK["48"]," ",ik/* .spacing["32"] */.YK["32"],";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";"),emptyStateImage:/*#__PURE__*/(0,c/* .css */.AH)("height:104px;width:104px;"),title:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";text-align:center;max-width:270px;margin-bottom:",ik/* .spacing["32"] */.YK["32"],";"),buttonWrapper:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;",aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;justify-content:center;gap:",ik/* .spacing["12"] */.YK["12"],";> div{width:auto;}")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/StudentListModal/SearchField.tsx
var Se=e=>{var{onFilterItems:r}=e;var i=ln({defaultValues:{search:""}});var o=ka(i.watch("search"));(0,n.useEffect)(()=>{r(aF({},o.length>0&&{search:o}))},[r,o]);return/*#__PURE__*/(0,t/* .jsx */.Y)(so,{control:i.control,name:"search",render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(At,aM(aF({},e),{content:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"search",width:24,height:24}),placeholder:(0,lo.__)("Search...","tutor-pro"),showVerticalBar:false}))})};/* export default */const St=Se;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/StudentListModal/StudentListTable.tsx
function Sr(){var e=k_(["\n      color: ",";\n    "]);Sr=function t(){return e};return e}function Sn(){var e=k_(["\n      color: ",";\n    "]);Sn=function t(){return e};return e}var Si=e=>{var{form:r}=e;var n;var i=r.watch("course");var o=r.watch("plan");var a=r.watch("subscription");var s=r.watch("students")||[];var{pageInfo:l,onPageChange:c,itemsPerPage:u,offset:d,onFilterItems:f}=Iq();var p=kn(aF({offset:d,limit:u,filter:l.filter,object_id:a?Number(a):o?o===null||o===void 0?void 0:o.id:i===null||i===void 0?void 0:i.id,order_type:a||o?"subscription":"single_order"},a&&{course_id:i===null||i===void 0?void 0:i.id}));var h;var v=(h=(n=p.data)===null||n===void 0?void 0:n.results)!==null&&h!==void 0?h:[];var m=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;var t=s.map(e=>e.ID);var n=v.map(e=>e.ID);if(e){var i=v.filter(e=>!t.includes(e.ID)&&e.is_enrolled!==1);r.setValue("students",[...s,...i]);return}var o=s.filter(e=>!n.includes(e.ID));r.setValue("students",o)};var g=e=>{if(e.is_enrolled===1){return}var t=s.map(e=>e.ID).includes(e.ID);if(t){var n=s.filter(t=>t.ID!==e.ID);r.setValue("students",n)}else{r.setValue("students",[...s,e])}};var b=()=>{return v.every(e=>s.map(e=>e.ID).includes(e.ID)||e.is_enrolled===1)};var _=[{Header:v.length?/*#__PURE__*/(0,t/* .jsx */.Y)(mK,{onChange:m,checked:p.isLoading||p.isRefetching?false:b(),label:(0,lo.__)("Name","tutor-pro"),labelCss:Sa.checkboxLabel,isIndeterminate:s.length>0&&!b()}):"#",Cell:e=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sa.checkboxWrapper,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(mK,{onChange:()=>g(e),checked:s.map(e=>e.ID).includes(e.ID),disabled:e.is_enrolled===1}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sa.studentInfo,role:"button",onClick:()=>g(e),children:[/*#__PURE__*/(0,t/* .jsx */.Y)("img",{src:e.avatar_url,css:Sa.thumbnail,alt:(0,lo.__)("Student item","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sa.title(e.is_enrolled===1),children:[e.display_name,/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:e.is_enrolled===1,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sa.alreadyEnrolled,children:[(0,lo.__)("Enrollment Status","tutor-pro")," (",e.enrollment_status,")"]})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("p",{css:Sa.subTitle(e.is_enrolled===1),children:e.user_email})]})]})]})}}];if(p.isLoading){return/*#__PURE__*/(0,t/* .jsx */.Y)(lJ,{})}if(!p.data){return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sa.errorMessage,children:(0,lo.__)("Something went wrong","tutor-pro")})}var y;return/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sa.tableActions,children:/*#__PURE__*/(0,t/* .jsx */.Y)(St,{onFilterItems:f})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sa.tableWrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(I4,{columns:_,data:(y=p.data.results)!==null&&y!==void 0?y:[],itemsPerPage:u,loading:p.isFetching||p.isRefetching})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sa.paginatorWrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(IG,{currentPage:l.page,onPageChange:c,totalItems:p.data.total_items,itemsPerPage:u})})]})};/* export default */const So=Si;var Sa={tableActions:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["20"] */.YK["20"],";"),tableWrapper:/*#__PURE__*/(0,c/* .css */.AH)("max-height:calc(100vh - 350px);",aR/* .styleUtils.overflowYAuto */.x.overflowYAuto,";"),paginatorWrapper:/*#__PURE__*/(0,c/* .css */.AH)("margin:",ik/* .spacing["20"] */.YK["20"]," ",ik/* .spacing["16"] */.YK["16"],";"),checkboxWrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["12"] */.YK["12"],";"),studentInfo:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";cursor:pointer;"),thumbnail:/*#__PURE__*/(0,c/* .css */.AH)("width:34px;height:34px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";object-fit:cover;object-position:center;"),title:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";",iS/* .typography.body */.I.body("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";",e&&(0,c/* .css */.AH)(Sr(),ik/* .colorTokens.text.disable */.I6.text.disable)),subTitle:e=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";margin:0px;",e&&(0,c/* .css */.AH)(Sn(),ik/* .colorTokens.text.disable */.I6.text.disable)),alreadyEnrolled:/*#__PURE__*/(0,c/* .css */.AH)("font-size:",ik/* .fontSize["12"] */.J["12"],";line-height:",ik/* .lineHeight["16"] */.K_["16"],";padding:",ik/* .spacing["2"] */.YK["2"]," ",ik/* .spacing["4"] */.YK["4"],";border-radius:",ik/* .borderRadius["2"] */.Vq["2"],";background-color:",ik/* .colorTokens.background.disable */.I6.background.disable,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";text-transform:capitalize;"),checkboxLabel:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.body */.I.body(),";color:",ik/* .colorTokens.text.title */.I6.text.title,";"),errorMessage:/*#__PURE__*/(0,c/* .css */.AH)("height:100px;display:flex;align-items:center;justify-content:center;")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/StudentListModal/index.tsx
function Ss(e){var{title:r,closeModal:n,actions:i,form:o,onAddStudents:a}=e;var s=ln({defaultValues:o.getValues()});var l=s.watch("students")||[];var c=()=>{o.setValue("students",l,{shouldValidate:true});a===null||a===void 0?void 0:a(l);n({action:"CONFIRM"})};return/*#__PURE__*/(0,t/* .jsxs */.FD)(mI,{onClose:()=>n({action:"CLOSE"}),title:l.length?(0,lo.sprintf)((0,lo.__)("%d Selected","tutor-pro"),l.length):r,actions:i,maxWidth:480,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(So,{form:s}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sc.footer,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{size:"small",variant:"text",onClick:()=>n({action:"CLOSE"}),children:(0,lo.__)("Cancel","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"add-students",type:"submit",size:"small",variant:"primary",disabled:l.length===0,onClick:c,children:(0,lo.__)("Add","tutor-pro")})]})]})}/* export default */const Sl=Ss;var Sc={footer:/*#__PURE__*/(0,c/* .css */.AH)("box-shadow:0px 1px 0px 0px #e4e5e7 inset;height:56px;display:flex;align-items:center;justify-content:end;gap:",ik/* .spacing["16"] */.YK["16"],";padding-inline:",ik/* .spacing["16"] */.YK["16"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/molecules/FileUploader.tsx
var Su=e=>{var{acceptedTypes:t,onUpload:r,onError:i,maxFileSize:o=Number((bA/* .tutorConfig */.P===null||bA/* .tutorConfig */.P===void 0?void 0:bA/* .tutorConfig.max_upload_size */.P.max_upload_size)||"")||ak/* .MAX_FILE_SIZE */.w3}=e;var a=(0,n.useRef)(null);var s=e=>{var{files:n}=e.target;if(!n||n.length===0){i([(0,lo.__)("No files selected","tutor-pro")]);return}var a=[];var s=[];for(var l of[...n]){if(!t.includes((0,iV/* .getFileExtensionFromName */.dS)(l.name))){a.push((0,lo.__)("Invalid file type","tutor-pro"))}else if(l.size>o){a.push((0,lo.__)("Maximum upload size exceeded","tutor-pro"))}else{s.push(l)}}if(s.length){r(s)}if(a.length){i(a)}e.target.value=""};return{fileInputRef:a,handleChange:s}};var Sd=e=>{var{onUpload:t,onError:r,acceptedTypes:n,label:i,multiple:o=false,disabled:a=false,maxFileSize:s=formatReadAbleBytesToBytes((tutorConfig===null||tutorConfig===void 0?void 0:tutorConfig.max_upload_size)||"")||MAX_FILE_SIZE}=e;var{fileInputRef:l,handleChange:c}=Su({acceptedTypes:n,onUpload:t,onError:r,maxFileSize:s});return /*#__PURE__*/_jsxs("button",{type:"button",css:Sf.uploadButton,onClick:()=>{var e;return(e=l.current)===null||e===void 0?void 0:e.click()},disabled:a,children:[/*#__PURE__*/_jsx("input",{ref:l,type:"file",css:Sf.fileInput,accept:n.join(","),onChange:c,multiple:o,disabled:a}),/*#__PURE__*/_jsx(SVGIcon,{name:"storeImage",width:26,height:20}),/*#__PURE__*/_jsx("span",{css:Sf.text,children:i})]})};var Sf={uploadButton:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,"    background:",ik/* .colorTokens.background["default"] */.I6.background["default"],";border:1px dashed ",ik/* .colorTokens.stroke.border */.I6.stroke.border,";border-radius:",ik/* .borderRadius["8"] */.Vq["8"],";display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1;gap:",ik/* .spacing["12"] */.YK["12"],";"),fileInput:/*#__PURE__*/(0,c/* .css */.AH)("display:none;"),text:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";",iS/* .typography.body */.I.body())};var Sp=e=>{var{onUpload:r,onError:n,acceptedTypes:i,multiple:o=false,disabled:a=false,children:s,maxFileSize:l=Number((bA/* .tutorConfig */.P===null||bA/* .tutorConfig */.P===void 0?void 0:bA/* .tutorConfig.max_upload_size */.P.max_upload_size)||"")||ak/* .MAX_FILE_SIZE */.w3}=e,c=(0,iO._)(e,["onUpload","onError","acceptedTypes","multiple","disabled","children","maxFileSize"]);var{fileInputRef:u,handleChange:d}=Su({acceptedTypes:i,onUpload:r,onError:n,maxFileSize:l});return/*#__PURE__*/(0,t/* .jsxs */.FD)(iU/* ["default"] */.A,(0,ep._)((0,ef._)({},c),{onClick:()=>{var e;return(e=u.current)===null||e===void 0?void 0:e.click()},disabled:a,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("input",{ref:u,type:"file",css:Sf.fileInput,accept:i.join(","),onChange:d,multiple:o,disabled:a}),s]}))};/* export default */const Sh=/* unused pure expression or super */null&&Sd;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/assets/resources/tutor_bulk_enrollment_sample.csv
const Sv=r.p+"data/tutor_bulk_enrollment_sample-f8232a20.csv";// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/modals/UploadCSVModal.tsx
// @ts-ignore
var Sm=e=>{var{title:r=(0,lo.__)("Import students by CSV","tutor-pro"),onClose:i,onImport:o}=e;var[a,s]=(0,n.useState)(null);var[l,c]=(0,n.useState)(false);var{showToast:u}=i2();var d=[".csv"];var f=e=>I8(function*(){if(e.length){s(e[0])}})();var p=e=>{u({message:(0,iV/* .convertToErrorMessage */.EL)(e),type:"danger"})};var h=()=>I8(function*(){if(a){try{c(true);var e=yield ki.onUpload(a);if(e&&e.length>0){o(e);i();u({message:(0,lo.sprintf)((0,lo._n)("%d student imported successfully","%d students imported successfully",e.length,"tutor-pro"),e.length),type:"success"})}}catch(e){var t=e instanceof Error?e.message:(0,lo.__)("CSV import failed","tutor-pro");u({message:t,type:"danger"})}finally{c(false)}}})();return/*#__PURE__*/(0,t/* .jsxs */.FD)(mI,{title:r,onClose:i,maxWidth:500,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:a,fallback:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.emptySate,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"uploadFile",width:32,height:32}),/*#__PURE__*/(0,t/* .jsx */.Y)(Sp,{"data-cy":"select-file",variant:"secondary",size:"small",onUpload:f,onError:p,acceptedTypes:d,children:(0,lo.__)("Select File","tutor-pro")})]}),children:e=>/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.selectedInfo,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.fileInfo,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:iS/* .typography.small */.I.small(),children:(0,lo.__)("Selected","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.file,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sb.fileIcon,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"attachmentLine",width:24,height:24})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.fileRight,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.fileDetails,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sb.fileName,children:e.name}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sb.fileSize,children:(0,iV/* .formatBytes */.z3)(e.size)})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,t/* .jsx */.Y)(Sp,{"data-cy":"replace-file",variant:"tertiary",size:"small",onUpload:f,onError:p,acceptedTypes:d,children:(0,lo.__)("Replace","tutor-pro")})})]})]})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.alert,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"infoFill",width:40,height:40}),/*#__PURE__*/(0,t/* .jsx */.Y)("p",{children:(0,lo.__)("If an email from the imported list doesn’t match an existing user, a new account will be created, and the user will be enrolled automatically.","tutor-pro")})]})]})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.footer,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>{var e=document.createElement("a");e.href=Sv;e.download="tutor_bulk_enrollment_sample.csv";e.click()},children:(0,lo.__)("Download sample CSV","tutor-pro")}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sb.actionButtons,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",size:"small",onClick:i,children:(0,lo.__)("Cancel","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"import-csv",disabled:!a,variant:"primary",size:"small",loading:l,onClick:h,children:(0,lo.__)("Import","tutor-pro")})]})]})]})};/* export default */const Sg=Sm;var Sb={emptySate:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.flexCenter */.x.flexCenter(),";flex-direction:column;gap:",ik/* .spacing["8"] */.YK["8"],";height:134px;border:1px dashed ",ik/* .colorTokens.stroke.border */.I6.stroke.border,";border-radius:",ik/* .borderRadius.card */.Vq.card,";margin:",ik/* .spacing["20"] */.YK["20"]," ",ik/* .spacing["16"] */.YK["16"],";svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),selectedInfo:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["20"] */.YK["20"],";padding:",ik/* .spacing["20"] */.YK["20"]," ",ik/* .spacing["16"] */.YK["16"],";border-bottom:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";"),fileInfo:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["10"] */.YK["10"],";"),file:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";height:64px;border:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";overflow:hidden;border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";width:100%;"),fileIcon:/*#__PURE__*/(0,c/* .css */.AH)("background-color:#f7f7f7;",aR/* .styleUtils.flexCenter */.x.flexCenter(),";width:64px;height:100%;border-right:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";flex-shrink:0;svg{color:",ik/* .colorTokens.icon.disable.background */.I6.icon.disable.background,";}"),fileRight:/*#__PURE__*/(0,c/* .css */.AH)("flex-grow:1;",aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;align-items:center;padding:",ik/* .spacing["10"] */.YK["10"]," ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["10"] */.YK["10"]," ",ik/* .spacing["20"] */.YK["20"],";"),fileDetails:/*#__PURE__*/(0,c/* .css */.AH)("flex-grow:1;",aR/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",ik/* .spacing["4"] */.YK["4"],";"),fileName:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small("medium"),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";",aR/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),";"),fileSize:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.tiny */.I.tiny(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";"),alert:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:flex-start;gap:",ik/* .spacing["8"] */.YK["8"],";padding:",ik/* .spacing["20"] */.YK["20"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",ik/* .colorTokens.brand.blue */.I6.brand.blue,";svg{color:",ik/* .colorTokens.icon.brand */.I6.icon.brand,";flex-shrink:0;}p{",iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";}"),footer:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;justify-content:space-between;padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";box-shadow:",ik/* .shadow.dividerTop */.r7.dividerTop,";"),actionButtons:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";")};// CONCATENATED MODULE: ../tutor/assets/src/js/v3/shared/molecules/Tabs.tsx
function S_(){var e=(0,eh._)(["\n      flex-direction: column;\n      align-items: start;\n      box-shadow: none;\n    "]);S_=function t(){return e};return e}function Sy(){var e=(0,eh._)(["\n      width: 3px;\n      height: ","px;\n      top: ","px;\n      bottom: auto;\n      border-radius: 0 "," "," 0;\n    "]);Sy=function t(){return e};return e}function Sx(){var e=(0,eh._)(["\n      width: 100%;\n      border-bottom: 1px solid ",";\n      justify-content: flex-start;\n\n      &:hover,\n      &:focus,\n      &:active {\n        border-bottom: 1px solid ",";\n      }\n    "]);Sx=function t(){return e};return e}function Sw(){var e=(0,eh._)(["\n      &,\n      &:hover,\n      &:focus,\n      &:active {\n        background-color: ",";\n        color: ",";\n      }\n\n      & > span {\n        color: ",";\n      }\n\n      & > svg {\n        color: ",";\n      }\n    "]);Sw=function t(){return e};return e}var SA=e=>{var{activeTab:r,onChange:i,tabList:o,orientation:a="horizontal",disabled:s=false,wrapperCss:l}=e;var c=(0,n.useRef)(o.map(()=>/*#__PURE__*/(0,n.createRef)()));var[u,d]=(0,n.useState)();(0,n.useEffect)(()=>{var e=o.reduce((e,t,r)=>{var n,i,o,a;var s=c.current[r];var l={width:((n=s.current)===null||n===void 0?void 0:n.offsetWidth)||0,height:((i=s.current)===null||i===void 0?void 0:i.offsetHeight)||0,left:((o=s.current)===null||o===void 0?void 0:o.offsetLeft)||0,top:((a=s.current)===null||a===void 0?void 0:a.offsetTop)||0};e[t.value]=l;return e},{});d(e)},[o]);return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:SI.container,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:[SI.wrapper(a),l],role:"tablist",children:o.map((e,n)=>{return/*#__PURE__*/(0,t/* .jsxs */.FD)("button",{onClick:()=>{i(e.value)},css:SI.tabButton({isActive:r===e.value,orientation:a}),disabled:s||e.disabled,type:"button",role:"tab","aria-selected":r===e.value?"true":"false",ref:c.current[n],children:[e.icon,e.label,e.count!==undefined&&/*#__PURE__*/(0,t/* .jsxs */.FD)("span",{children:[" (",e.count<10&&e.count>0?"0".concat(e.count):e.count,")"]}),e.activeBadge&&/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:SI.activeBadge})]},n)})}),/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:SI.indicator((u===null||u===void 0?void 0:u[r])||{width:0,height:0,left:0,top:0},a)})]})};/* export default */const SE=SA;var SI={container:/*#__PURE__*/(0,c/* .css */.AH)("position:relative;width:100%;"),wrapper:e=>/*#__PURE__*/(0,c/* .css */.AH)("width:100%;display:flex;justify-items:left;align-items:center;flex-wrap:wrap;box-shadow:",ik/* .shadow.tabs */.r7.tabs,";",e==="vertical"&&(0,c/* .css */.AH)(S_())),indicator:(e,t)=>/*#__PURE__*/(0,c/* .css */.AH)("width:",e.width,"px;height:3px;position:absolute;left:",e.left,"px;bottom:0;background:",ik/* .colorTokens.brand.blue */.I6.brand.blue,";border-radius:",ik/* .borderRadius["4"] */.Vq["4"]," ",ik/* .borderRadius["4"] */.Vq["4"]," 0 0;transition:all 0.3s cubic-bezier(0.4,0,0.2,1) 0ms;:dir(rtl){left:auto;right:",e.left,"px;}",t==="vertical"&&(0,c/* .css */.AH)(Sy(),e.height,e.top,ik/* .borderRadius["4"] */.Vq["4"],ik/* .borderRadius["4"] */.Vq["4"])),tabButton:e=>{var{isActive:t,orientation:r}=e;return/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.resetButton */.x.resetButton,";font-size:",ik/* .fontSize["15"] */.J["15"],";line-height:",ik/* .lineHeight["20"] */.K_["20"],";display:flex;justify-content:center;align-items:center;gap:",ik/* .spacing["6"] */.YK["6"],";padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["20"] */.YK["20"],";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";min-width:130px;position:relative;transition:color 0.3s ease-in-out;border-radius:0px;&:hover,&:focus,&:active{background-color:transparent;color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";box-shadow:none;}& > svg{color:",ik/* .colorTokens.icon["default"] */.I6.icon["default"],";}",r==="vertical"&&(0,c/* .css */.AH)(Sx(),ik/* .colorTokens.stroke.border */.I6.stroke.border,ik/* .colorTokens.stroke.border */.I6.stroke.border)," ",t&&(0,c/* .css */.AH)(Sw(),ik/* .colorTokens.background.white */.I6.background.white,ik/* .colorTokens.text.primary */.I6.text.primary,ik/* .colorTokens.text.subdued */.I6.text.subdued,ik/* .colorTokens.icon.brand */.I6.icon.brand),"    &:disabled{color:",ik/* .colorTokens.text.disable */.I6.text.disable,";&::before{background:",ik/* .colorTokens.text.disable */.I6.text.disable,";}}&:focus-visible{outline:2px solid ",ik/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:-2px;border-radius:",ik/* .borderRadius["4"] */.Vq["4"],";}")},activeBadge:/*#__PURE__*/(0,c/* .css */.AH)("display:inline-block;height:8px;width:8px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";background-color:",ik/* .colorTokens.color.success["80"] */.I6.color.success["80"],";")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/StudentCard.tsx
function Sk(){var e=k_(["\n      cursor: pointer;\n    "]);Sk=function t(){return e};return e}function SS(){var e=k_(["\n      [data-student-index] {\n        display: none;\n      }\n\n      [data-student-select] {\n        display: block;\n      }\n    "]);SS=function t(){return e};return e}function SO(){var e=k_(["\n      border-left: 1px solid transparent;\n      border-right: 1px solid transparent;\n    "]);SO=function t(){return e};return e}function ST(){var e=k_(["\n        background-color: ",";\n      "]);ST=function t(){return e};return e}function SC(){var e=k_(["\n        border: 1px solid ",";\n        border-top: 1px solid transparent;\n\n        &:last-of-type {\n          border-bottom: 1px solid transparent;\n        }\n      "]);SC=function t(){return e};return e}function SR(){var e=k_(["\n      color: ",";\n    "]);SR=function t(){return e};return e}function SD(){var e=k_(["\n      color: ",";\n    "]);SD=function t(){return e};return e}var SF=/*#__PURE__*/i().memo(e=>{var{index:r,name:n,email:i,avatar:o,isEnrolled:a=false,enrollmentStatus:s,hasSideBorders:l=false,isSelected:c=false,onItemSelect:u,onRemoveClick:d,style:f}=e;return/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{"data-cy":"student-card",role:"button",style:f,css:SM.studentItem(l,!!u,c,a),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:u,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{"data-student-select":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(mK,{checked:c,onChange:u})})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{"data-student-index":true,css:SM.studentIndex,children:r+1}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:SM.studentThumb,children:/*#__PURE__*/(0,t/* .jsx */.Y)("img",{src:o||kI,css:SM.thumbnail,alt:"avatar"})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:SM.studentContent,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:SM.studentTitle(a),children:[n,/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:a,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:SM.alreadyEnrolled,children:[(0,lo.__)("Enrollment Status","tutor-pro")," (",s,")"]})})]}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:SM.studentSubTitle(a),children:i})]}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:d,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{"data-student-item-cross":true,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{variant:"text",onClick:d,children:/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"cross",width:24,height:24})})})})]})});/* export default */const SY=SF;var SM={studentItem:(e,t,r,n)=>/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";display:flex;align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";transition:background-color 0.25s ease-in;border-top:1px solid transparent;border-bottom:1px solid ",ik/* .colorTokens.stroke.disable */.I6.stroke.disable,";position:relative;",t&&!n&&(0,c/* .css */.AH)(Sk()),"    [data-student-item-cross]{display:none;}[data-student-select]{max-width:24px;width:100%;flex-shrink:0;margin-right:",ik/* .spacing["12"] */.YK["12"],";display:none;}",r&&(0,c/* .css */.AH)(SS())," ",e&&(0,c/* .css */.AH)(SO()),"      \n\n    &:hover{",!n&&(0,c/* .css */.AH)(ST(),ik/* .colorTokens.background.hover */.I6.background.hover)," ",e&&(0,c/* .css */.AH)(SC(),ik/* .colorTokens.stroke.disable */.I6.stroke.disable),"      [data-student-item-cross],[data-student-select]{display:block;}[data-student-index]{display:none;}}&:last-of-type:is(:only-of-type){border-bottom:1px solid transparent;}"),studentIndex:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";max-width:24px;width:100%;flex-shrink:0;text-align:center;margin-right:",ik/* .spacing["12"] */.YK["12"],";"),studentThumb:/*#__PURE__*/(0,c/* .css */.AH)("height:34px;"),thumbnail:/*#__PURE__*/(0,c/* .css */.AH)("width:34px;height:34px;border-radius:",ik/* .borderRadius.circle */.Vq.circle,";"),studentContent:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;"),studentTitle:e=>/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";",iS/* .typography.body */.I.body("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";",e&&(0,c/* .css */.AH)(SR(),ik/* .colorTokens.text.disable */.I6.text.disable)),studentSubTitle:e=>/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.small */.I.small(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";",e&&(0,c/* .css */.AH)(SD(),ik/* .colorTokens.text.disable */.I6.text.disable)),alreadyEnrolled:/*#__PURE__*/(0,c/* .css */.AH)("font-size:",ik/* .fontSize["12"] */.J["12"],";line-height:",ik/* .lineHeight["16"] */.K_["16"],";padding:",ik/* .spacing["2"] */.YK["2"]," ",ik/* .spacing["4"] */.YK["4"],";border-radius:",ik/* .borderRadius["2"] */.Vq["2"],";background-color:",ik/* .colorTokens.background.disable */.I6.background.disable,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";text-transform:capitalize;")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/StudentCardSkeleton.tsx
var Sj=e=>{var{items:r=5}=e;return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:SL.wrapper,children:Array.from({length:r},(e,t)=>t).map(e=>/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:SL.itemStyles,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{width:24,height:30,animation:true,animationDuration:.4}),/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{width:44,height:44,isRound:true,animation:true,animationDuration:.4}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:SL.contentStyles,children:/*#__PURE__*/(0,t/* .jsx */.Y)(bz,{height:44,animation:true,animationDuration:.4})})]},e))})};/* export default */const SP=Sj;var SL={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;padding-inline:",ik/* .spacing["16"] */.YK["16"],";"),itemStyles:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:1rem;padding-block:1rem;"),contentStyles:/*#__PURE__*/(0,c/* .css */.AH)("flex:1;min-width:0;")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/SelectedStudents.tsx
function SN(){var e=k_(["\n      padding: "," "," "," ",";\n    "]);SN=function t(){return e};return e}function SH(){var e=k_(["\n      margin-top: ",";\n      border: 1px solid ",";\n      border-radius: ",";\n      overflow: hidden;\n    "]);SH=function t(){return e};return e}var SV=68;var SU=600;var SK=10;var SB=e=>{var{form:r,isStudentListLoading:i,setIsStudentListLoading:o}=e;var a;var{showModal:s,closeModal:l}=i7();var[c,u]=(0,n.useState)({students:[],csvStudents:[]});var[d,f]=(0,n.useState)(((a=r.watch("students"))===null||a===void 0?void 0:a.length)>0?"manual":"csv");var p;var h=(p=r.watch("students"))!==null&&p!==void 0?p:[];var v;var m=(v=r.watch("csv_students"))!==null&&v!==void 0?v:[];var g;var b=Number((g=r.watch("course.maximum_students"))!==null&&g!==void 0?g:0);var _;var y=Number((_=r.watch("course.total_enrolled"))!==null&&_!==void 0?_:0);var x=h.length>0&&m.length>0;var w=[...h,...m].length;var A=[...c.students,...c.csvStudents].length;var E=[{label:(0,lo.__)("Manually Added","tutor-pro"),value:"manual"},{label:(0,lo.__)("Added from CSV","tutor-pro"),value:"csv"}];var I=e=>{var{data:t,isSelected:r,isCSV:n}=e;u(e=>{if(n){return aM(aF({},e),{csvStudents:r?[...e.csvStudents,t]:e.csvStudents.filter(e=>e!==t)})}return aM(aF({},e),{students:r?[...e.students,t]:e.students.filter(e=>e!==t)})})};var k=(e,t)=>{var n=t?"csv_students":"students";var i=t?m:h;r.setValue(n,Array.isArray(e)?t?i.filter(t=>!e.includes(t.email)):i.filter(t=>!e.includes(t.ID)):t?i.filter(t=>t.email!==e):i.filter(t=>t.ID!==e));var o=Array.isArray(e)?e.length===i.length:i.length===1;f(e=>o?t?"manual":"csv":e)};var S=e=>{if(e){u({students:h.map(e=>e.ID),csvStudents:m.map(e=>e.email)})}else{u({students:[],csvStudents:[]})}};return/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:b&&w+y>b,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sq.alertWrapper,children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sq.alert,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iK/* ["default"] */.A,{name:"infoFill",width:40,height:40}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sq.alertContent,children:[(0,lo.sprintf)((0,lo._n)("This course has a maximum enrollment limit of %d student.","This course has a maximum enrollment limit of %d students.",b,"tutor-pro"),b)," ",(0,lo.sprintf)((0,lo._n)("Enrolling the following %d student will exceed this limit.","Enrolling the following %d students will exceed this limit.",w,"tutor-pro"),w)]})]})})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sq.selectedWrapper,children:[/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sq.header,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("span",{css:Sq.selectedCount,children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:A>0,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(t/* .Fragment */.FK,{children:(0,lo.sprintf)((0,lo._n)("%d Student selected","%d Students selected",w,"tutor-pro"),w)}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(mK,{checked:A===w,onChange:S,label:(0,lo.sprintf)((0,lo.__)("%d Selected","tutor-pro"),A),isIndeterminate:A>0&&A<w})})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sq.actionButtons,children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:A>0,fallback:/*#__PURE__*/(0,t/* .jsxs */.FD)(t/* .Fragment */.FK,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"upload-csv",variant:"text",size:"small",onClick:()=>{s({component:Sg,props:{title:(0,lo.__)("Import students by CSV","tutor-pro"),onClose:l,onImport:e=>{o(true);r.setValue("csv_students",e);f("csv");var t=setTimeout(()=>{o(false)},1e3);return()=>{clearTimeout(t)}}},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})},children:(0,lo.__)("Upload from CSV","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"add-students",variant:"tertiary",size:"small",onClick:()=>{s({component:Sl,props:{title:(0,lo.__)("Add students","tutor-pro"),form:r,onAddStudents:()=>{f("manual")}},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})},children:(0,lo.__)("Add Students","tutor-pro")})]}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"remove-students",variant:"danger",size:"small",onClick:()=>{k(c.students);k(c.csvStudents,true);u({students:[],csvStudents:[]})},children:(0,lo.__)("Remove","tutor-pro")})})})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sq.studentListWrapper(x),children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:x,children:/*#__PURE__*/(0,t/* .jsx */.Y)(SE,{activeTab:d,onChange:f,tabList:E})}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:Sq.studentList(x),children:[/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:h.length>0&&d==="manual",children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!x,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sq.label,children:(0,lo.__)("Manually Added","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsx */.Y)(kA,{items:h,height:h.length>SK?SU:h.length*SV,itemHeight:SV,renderItem:(e,r,n)=>/*#__PURE__*/(0,t/* .jsx */.Y)(SY,{style:n,index:r,name:e.display_name,email:e.user_email,avatar:e.avatar_url,hasSideBorders:!x,isSelected:c.students.includes(e.ID),onRemoveClick:()=>k(e.ID,false),onItemSelect:t=>I({data:e.ID,isCSV:false,isSelected:t})},e.ID)})]}),/*#__PURE__*/(0,t/* .jsxs */.FD)(la/* ["default"] */.A,{when:m.length>0&&d==="csv",children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!x,children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:Sq.label,children:(0,lo.__)("Added from CSV","tutor-pro")})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!i,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(SP,{items:m.length>SK?SK:m.length}),children:/*#__PURE__*/(0,t/* .jsx */.Y)(kA,{items:m,height:m.length>SK?SU:m.length*SV,itemHeight:SV,renderItem:(e,r,n)=>/*#__PURE__*/(0,t/* .jsx */.Y)(SY,{index:r,style:n,name:"".concat(e.first_name," ").concat(e.last_name),email:e.email,hasSideBorders:!x,isSelected:c.csvStudents.includes(e.email),onRemoveClick:()=>k(e.email,true),onItemSelect:t=>I({data:e.email,isCSV:true,isSelected:t})},e.email)})})]})]})]})]})]})};/* export default */const Sz=SB;var Sq={alertWrapper:/*#__PURE__*/(0,c/* .css */.AH)("margin:0 -",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["12"] */.YK["12"]," -",ik/* .spacing["16"] */.YK["16"],";border:1px solid ",ik/* .colorTokens.brand.blue */.I6.brand.blue,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";"),alert:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";gap:",ik/* .spacing["8"] */.YK["8"],";padding:",ik/* .spacing["20"] */.YK["20"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";svg{align-self:center;flex-shrink:0;color:",ik/* .colorTokens.icon.brand */.I6.icon.brand,";}"),alertContent:/*#__PURE__*/(0,c/* .css */.AH)(iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),selectedWrapper:/*#__PURE__*/(0,c/* .css */.AH)("margin-left:-",ik/* .spacing["16"] */.YK["16"],";margin-right:-",ik/* .spacing["16"] */.YK["16"],";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";padding-bottom:",ik/* .spacing["4"] */.YK["4"],";overflow:hidden;"),header:/*#__PURE__*/(0,c/* .css */.AH)("height:54px;",aR/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;background-color:",ik/* .colorTokens.background.white */.I6.background.white,";border-bottom:1px solid ",ik/* .colorTokens.stroke.disable */.I6.stroke.disable,";padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";z-index:",ik/* .zIndex.positive */.fE.positive,";"),selectedCount:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;",iS/* .typography.body */.I.body("medium"),";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";"),actionButtons:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex(),";gap:",ik/* .spacing["12"] */.YK["12"],";button{&:first-of-type:not(:only-of-type){color:",ik/* .colorTokens.text.brand */.I6.text.brand,";}}"),studentListWrapper:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;return/*#__PURE__*/(0,c/* .css */.AH)(e&&(0,c/* .css */.AH)(SN(),ik/* .spacing["12"] */.YK["12"],ik/* .spacing["20"] */.YK["20"],ik/* .spacing["24"] */.YK["24"],ik/* .spacing["20"] */.YK["20"]))},studentList:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;return/*#__PURE__*/(0,c/* .css */.AH)(e&&(0,c/* .css */.AH)(SH(),ik/* .spacing["12"] */.YK["12"],ik/* .colorTokens.stroke.divider */.I6.stroke.divider,ik/* .borderRadius["6"] */.Vq["6"]))},label:/*#__PURE__*/(0,c/* .css */.AH)("padding:",ik/* .spacing["12"] */.YK["12"]," ",ik/* .spacing["16"] */.YK["16"],";",iS/* .typography.caption */.I.caption(),";color:",ik/* .colorTokens.text.hints */.I6.text.hints,";border-bottom:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/layout/Main.tsx
function SW(){var e,r;var i=ln({defaultValues:{course:null,students:[],csv_students:[],payment_status:"paid",subscription:""}});var{showModal:o,closeModal:a}=i7();var[s,l]=(0,n.useState)(false);var c=i.watch("course");var u=i.watch("plan");var d=i.watch("subscription");var f;var p=(f=i.watch("students"))!==null&&f!==void 0?f:[];var h;var v=(h=i.watch("csv_students"))!==null&&h!==void 0?h:[];var m=!!(c===null||c===void 0?void 0:(e=c.plans)===null||e===void 0?void 0:e.length)&&(c===null||c===void 0?void 0:c.selling_option)!=="one_time";var g=[{label:(0,lo.__)("Paid","tutor-pro"),value:"paid"},{label:(0,lo.__)("Unpaid","tutor-pro"),value:"unpaid"}];var b=[{label:(c===null||c===void 0?void 0:c.selling_option)==="subscription"?(0,lo.__)("Select a Plan","tutor-pro"):(0,lo.__)("One-time Purchase","tutor-pro"),value:""}];for(var _ of(c===null||c===void 0?void 0:c.plans)||[]){b.push({label:_.plan_name,labelContent:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:S$.planDropdownItem,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:S$.planDropdownItemPlan,children:_.plan_name}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:S$.planDropdownPrice,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:S$.price,children:Number(_.sale_price)>0?Io(Number(_.sale_price)):Io(Number(_.regular_price))}),Number(_.sale_price)>0&&/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:S$.discountPrice,children:Io(Number(_.regular_price))}),/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:S$.recurringInterval,children:["/ ",Number(_.recurring_value)>1?_.recurring_value.toString().padStart(2,"0"):""," ",E1(_.recurring_interval,Number(_.recurring_value))]})]})]}),value:_.id})}return/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,t/* .jsxs */.FD)(a5,aM(aF({},i),{children:[/*#__PURE__*/(0,t/* .jsx */.Y)(kK,{}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:S$.container,children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:u||c,fallback:/*#__PURE__*/(0,t/* .jsx */.Y)(k9,{}),children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:S$.content,children:[/*#__PURE__*/(0,t/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:S$.left,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:c,children:/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"course",control:i.control,rules:wk(),render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(kv,aF({},e))})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:u,children:/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"plan",control:i.control,rules:wk(),render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(k3,aM(aF({},e),{onChange:()=>{i.setValue("students",[])}}))})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:m,children:/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"subscription",control:i.control,rules:(c===null||c===void 0?void 0:c.selling_option)==="subscription"?wk():{},render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(f5,aM(aF({},e),{label:(0,lo.__)("Pricing","tutor-pro"),options:b,placeholder:(0,lo.__)("Select subscription","tutor-pro"),onChange:()=>{i.setValue("students",[])},optionItemCss:S$.sellingOptionCss}))})}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!!u||((r=bA/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.monetize_by)==="tutor"&&(c===null||c===void 0?void 0:c.is_purchasable),children:/*#__PURE__*/(0,t/* .jsx */.Y)(so,{name:"payment_status",control:i.control,rules:wk(),render:e=>/*#__PURE__*/(0,t/* .jsx */.Y)(f5,aM(aF({},e),{label:(0,lo.__)("Payment Status","tutor-pro"),options:g,placeholder:(0,lo.__)("Select payment status","tutor-pro")}))})})]})}),/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:S$.right,children:/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:p.length>0||v.length>0,fallback:/*#__PURE__*/(0,t/* .jsxs */.FD)("div",{css:S$.noStudents,children:[/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"add-students",variant:"secondary",disabled:!!c&&c.selling_option==="subscription"&&!d,onClick:()=>{o({component:Sl,props:{title:(0,lo.__)("Add students","tutor-pro"),form:i},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})},children:(0,lo.__)("Add Students","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(iU/* ["default"] */.A,{"data-cy":"upload-csv",variant:"text",disabled:!!c&&c.selling_option==="subscription"&&!d,onClick:()=>{o({component:Sg,props:{title:(0,lo.__)("Import students by CSV","tutor-pro"),onClose:a,onImport:e=>{l(true);i.setValue("csv_students",e);var t=setTimeout(()=>{l(false)},1e3);return()=>{clearTimeout(t)}}},closeOnOutsideClick:true,depthIndex:ik/* .zIndex.highest */.fE.highest})},children:(0,lo.__)("Upload from CSV","tutor-pro")}),/*#__PURE__*/(0,t/* .jsx */.Y)(la/* ["default"] */.A,{when:!!c&&c.selling_option==="subscription"&&!d,children:/*#__PURE__*/(0,t/* .jsx */.Y)(lc,{type:"warning",icon:"warning",children:(0,lo.__)("You need to select a subscription plan before proceeding. After choosing a plan, you’ll be able to select the students for enrollment.","tutor-pro")})})]}),children:/*#__PURE__*/(0,t/* .jsx */.Y)("div",{css:S$.studentsWrapper,children:/*#__PURE__*/(0,t/* .jsx */.Y)(Sz,{form:i,isStudentListLoading:s,setIsStudentListLoading:l})})})})]})})})]}))})}/* export default */const SG=SW;var S$={container:/*#__PURE__*/(0,c/* .css */.AH)("max-width:1054px;margin:0 auto;height:100%;"),content:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;height:100%;display:grid;grid-template-columns:255px 1fr;gap:",ik/* .spacing["24"] */.YK["24"],";padding-inline:",ik/* .spacing["12"] */.YK["12"],";min-height:calc(100vh - ",kN,"px);",ik/* .Breakpoint.mobile */.EA.mobile,"{display:block;}"),left:/*#__PURE__*/(0,c/* .css */.AH)("position:sticky;top:",kN+32,"px;display:flex;flex-direction:column;gap:",ik/* .spacing["12"] */.YK["12"],";padding-top:",ik/* .spacing["32"] */.YK["32"],";"),sellingOptionCss:/*#__PURE__*/(0,c/* .css */.AH)("&:not(:first-of-type):not(:last-of-type){border-bottom:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";}> button{padding:",ik/* .spacing["8"] */.YK["8"]," ",ik/* .spacing["4"] */.YK["4"],";}"),planDropdownItem:/*#__PURE__*/(0,c/* .css */.AH)("width:100%;text-transform:capitalize;"),planDropdownItemPlan:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),planDropdownPrice:/*#__PURE__*/(0,c/* .css */.AH)("display:flex;align-items:center;gap:",ik/* .spacing["4"] */.YK["4"],";white-space:nowrap;"),price:/*#__PURE__*/(0,c/* .css */.AH)("font-weight:",ik/* .fontWeight.medium */.Wy.medium,";color:",ik/* .colorTokens.text.primary */.I6.text.primary,";"),discountPrice:/*#__PURE__*/(0,c/* .css */.AH)("text-decoration:line-through;color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";"),recurringInterval:/*#__PURE__*/(0,c/* .css */.AH)("color:",ik/* .colorTokens.text.subdued */.I6.text.subdued,";text-transform:capitalize;"),right:/*#__PURE__*/(0,c/* .css */.AH)("border-left:1px solid ",ik/* .colorTokens.stroke.divider */.I6.stroke.divider,";padding-left:",ik/* .spacing["24"] */.YK["24"],";padding-top:",ik/* .spacing["32"] */.YK["32"],";",ik/* .Breakpoint.mobile */.EA.mobile,"{border-left:none;padding-left:0;}"),noStudents:/*#__PURE__*/(0,c/* .css */.AH)(aR/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;gap:",ik/* .spacing["8"] */.YK["8"],";padding:",ik/* .spacing["56"] */.YK["56"]," ",ik/* .spacing["32"] */.YK["32"]," ",ik/* .spacing["48"] */.YK["48"]," ",ik/* .spacing["32"] */.YK["32"],";border-radius:",ik/* .borderRadius["6"] */.Vq["6"],";background-color:",ik/* .colorTokens.background.white */.I6.background.white,";button{&:last-of-type:not(:disabled){color:",ik/* .colorTokens.text.brand */.I6.text.brand,";}}"),studentsWrapper:/*#__PURE__*/(0,c/* .css */.AH)("padding:0 ",ik/* .spacing["16"] */.YK["16"]," ",ik/* .spacing["12"] */.YK["12"],";")};// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment/components/App.tsx
function SQ(){var[e]=(0,n.useState)(()=>new es({defaultOptions:{queries:{retry:false,refetchOnWindowFocus:false,networkMode:"always"},mutations:{retry:false,networkMode:"always"}}}));return/*#__PURE__*/(0,t/* .jsx */.Y)(aT,{children:/*#__PURE__*/(0,t/* .jsx */.Y)(ed,{client:e,children:/*#__PURE__*/(0,t/* .jsx */.Y)(aC/* .SVGIconConfigProvider */.j,{children:/*#__PURE__*/(0,t/* .jsx */.Y)(i4,{position:"bottom-center",children:/*#__PURE__*/(0,t/* .jsxs */.FD)(oe,{children:[/*#__PURE__*/(0,t/* .jsx */.Y)(c/* .Global */.mL,{styles:[(0,aR/* .createGlobalCss */.v)()]}),/*#__PURE__*/(0,t/* .jsx */.Y)(SG,{})]})})})})})}/* export default */const SX=SQ;// CONCATENATED MODULE: ./addons/enrollments/assets/src/js/create-enrollment.tsx
var SJ=o.createRoot(document.getElementById("tutor-new-enrollment-root"));SJ.render(/*#__PURE__*/(0,t/* .jsx */.Y)(i().StrictMode,{children:/*#__PURE__*/(0,t/* .jsx */.Y)(l,{children:/*#__PURE__*/(0,t/* .jsx */.Y)(SX,{})})}))})()})();