@pie-element/multiple-choice 12.2.0-next.8 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/print.js CHANGED
@@ -1 +1 @@
1
- import{_dll_react_dom as e,_dll_prop_types as t,_dll_react as o,_dll_mui__material_styles as n,_dll_mui__material as r,_dll_debug as i,_dll_mui__material_collapse as s,_dll_classnames as a}from"../../../@pie-lib/shared-module@^4.1.0/module/index.js";import{_dll_pie_lib__math_rendering as l}from"../../../@pie-lib/math-rendering-module@^4.1.0/module/index.js";import{green as c,orange as p,red as u,indigo as d,pink as h}from"@mui/material/colors";var g,f=e;g=f.createRoot,f.hydrateRoot;var m="object"==typeof global&&global&&global.Object===Object&&global,y="object"==typeof self&&self&&self.Object===Object&&self,b=m||y||Function("return this")(),v=b.Symbol,x=Object.prototype,E=x.hasOwnProperty,C=x.toString,S=v?v.toStringTag:void 0;var k=Object.prototype.toString;var w=v?v.toStringTag:void 0;function _(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?function(e){var t=E.call(e,S),o=e[S];try{e[S]=void 0;var n=!0}catch(e){}var r=C.call(e);return n&&(t?e[S]=o:delete e[S]),r}(e):function(e){return k.call(e)}(e)}function A(e){return null!=e&&"object"==typeof e}var O=Array.isArray,R=/\s/;var j=/^\s+/;function N(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&R.test(e.charAt(t)););return t}(e)+1).replace(j,""):e}function L(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var T=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,M=/^0o[0-7]+$/i,F=parseInt;function I(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||A(e)&&"[object Symbol]"==_(e)}(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=N(e);var o=P.test(e);return o||M.test(e)?F(e.slice(2),o?2:8):T.test(e)?NaN:+e}function $(e){if(!L(e))return!1;var t=_(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var D,B=b["__core-js_shared__"],z=(D=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"";var U=Function.prototype.toString;function V(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var H=/^\[object .+?Constructor\]$/,q=Function.prototype,K=Object.prototype,W=q.toString,Y=K.hasOwnProperty,G=RegExp("^"+W.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function J(e){return!(!L(e)||(t=e,z&&z in t))&&($(e)?G:H).test(V(e));var t}function Q(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return J(o)?o:void 0}var X=Q(b,"WeakMap"),Z=Object.create,ee=function(){function e(){}return function(t){if(!L(t))return{};if(Z)return Z(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();var te=function(){try{var e=Q(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var oe=/^(?:0|[1-9]\d*)$/;function ne(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&oe.test(e))&&e>-1&&e%1==0&&e<t}function re(e,t,o){"__proto__"==t&&te?te(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function ie(e,t){return e===t||e!=e&&t!=t}var se=Object.prototype.hasOwnProperty;function ae(e,t,o){var n=e[t];se.call(e,t)&&ie(n,o)&&(void 0!==o||t in e)||re(e,t,o)}function le(e,t,o,n){var r=!o;o||(o={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=n?n(o[a],e[a],a,o,e):void 0;void 0===l&&(l=e[a]),r?re(o,a,l):ae(o,a,l)}return o}function ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function pe(e){return null!=e&&ce(e.length)&&!$(e)}var ue=Object.prototype;function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ue)}function he(e){return A(e)&&"[object Arguments]"==_(e)}var ge=Object.prototype,fe=ge.hasOwnProperty,me=ge.propertyIsEnumerable,ye=he(function(){return arguments}())?he:function(e){return A(e)&&fe.call(e,"callee")&&!me.call(e,"callee")};var be="object"==typeof exports&&exports&&!exports.nodeType&&exports,ve=be&&"object"==typeof module&&module&&!module.nodeType&&module,xe=ve&&ve.exports===be?b.Buffer:void 0,Ee=(xe?xe.isBuffer:void 0)||function(){return!1},Ce={};function Se(e){return function(t){return e(t)}}Ce["[object Float32Array]"]=Ce["[object Float64Array]"]=Ce["[object Int8Array]"]=Ce["[object Int16Array]"]=Ce["[object Int32Array]"]=Ce["[object Uint8Array]"]=Ce["[object Uint8ClampedArray]"]=Ce["[object Uint16Array]"]=Ce["[object Uint32Array]"]=!0,Ce["[object Arguments]"]=Ce["[object Array]"]=Ce["[object ArrayBuffer]"]=Ce["[object Boolean]"]=Ce["[object DataView]"]=Ce["[object Date]"]=Ce["[object Error]"]=Ce["[object Function]"]=Ce["[object Map]"]=Ce["[object Number]"]=Ce["[object Object]"]=Ce["[object RegExp]"]=Ce["[object Set]"]=Ce["[object String]"]=Ce["[object WeakMap]"]=!1;var ke="object"==typeof exports&&exports&&!exports.nodeType&&exports,we=ke&&"object"==typeof module&&module&&!module.nodeType&&module,_e=we&&we.exports===ke&&m.process,Ae=function(){try{var e=we&&we.require&&we.require("util").types;return e||_e&&_e.binding&&_e.binding("util")}catch(e){}}(),Oe=Ae&&Ae.isTypedArray,Re=Oe?Se(Oe):function(e){return A(e)&&ce(e.length)&&!!Ce[_(e)]},je=Object.prototype.hasOwnProperty;function Ne(e,t){var o=O(e),n=!o&&ye(e),r=!o&&!n&&Ee(e),i=!o&&!n&&!r&&Re(e),s=o||n||r||i,a=s?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],l=a.length;for(var c in e)!t&&!je.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ne(c,l))||a.push(c);return a}function Le(e,t){return function(o){return e(t(o))}}var Te=Le(Object.keys,Object),Pe=Object.prototype.hasOwnProperty;function Me(e){return pe(e)?Ne(e):function(e){if(!de(e))return Te(e);var t=[];for(var o in Object(e))Pe.call(e,o)&&"constructor"!=o&&t.push(o);return t}(e)}var Fe=Object.prototype.hasOwnProperty;function Ie(e){if(!L(e))return function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}(e);var t=de(e),o=[];for(var n in e)("constructor"!=n||!t&&Fe.call(e,n))&&o.push(n);return o}function $e(e){return pe(e)?Ne(e,!0):Ie(e)}var De=Q(Object,"create");var Be=Object.prototype.hasOwnProperty;var ze=Object.prototype.hasOwnProperty;function Ue(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Ve(e,t){for(var o=e.length;o--;)if(ie(e[o][0],t))return o;return-1}Ue.prototype.clear=function(){this.__data__=De?De(null):{},this.size=0},Ue.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ue.prototype.get=function(e){var t=this.__data__;if(De){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return Be.call(t,e)?t[e]:void 0},Ue.prototype.has=function(e){var t=this.__data__;return De?void 0!==t[e]:ze.call(t,e)},Ue.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=De&&void 0===t?"__lodash_hash_undefined__":t,this};var He=Array.prototype.splice;function qe(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}qe.prototype.clear=function(){this.__data__=[],this.size=0},qe.prototype.delete=function(e){var t=this.__data__,o=Ve(t,e);return!(o<0)&&(o==t.length-1?t.pop():He.call(t,o,1),--this.size,!0)},qe.prototype.get=function(e){var t=this.__data__,o=Ve(t,e);return o<0?void 0:t[o][1]},qe.prototype.has=function(e){return Ve(this.__data__,e)>-1},qe.prototype.set=function(e,t){var o=this.__data__,n=Ve(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};var Ke=Q(b,"Map");function We(e,t){var o,n,r=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?r["string"==typeof t?"string":"hash"]:r.map}function Ye(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Ge(e,t){for(var o=-1,n=t.length,r=e.length;++o<n;)e[r+o]=t[o];return e}Ye.prototype.clear=function(){this.size=0,this.__data__={hash:new Ue,map:new(Ke||qe),string:new Ue}},Ye.prototype.delete=function(e){var t=We(this,e).delete(e);return this.size-=t?1:0,t},Ye.prototype.get=function(e){return We(this,e).get(e)},Ye.prototype.has=function(e){return We(this,e).has(e)},Ye.prototype.set=function(e,t){var o=We(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this};var Je=Le(Object.getPrototypeOf,Object);function Qe(e){var t=this.__data__=new qe(e);this.size=t.size}Qe.prototype.clear=function(){this.__data__=new qe,this.size=0},Qe.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},Qe.prototype.get=function(e){return this.__data__.get(e)},Qe.prototype.has=function(e){return this.__data__.has(e)},Qe.prototype.set=function(e,t){var o=this.__data__;if(o instanceof qe){var n=o.__data__;if(!Ke||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new Ye(n)}return o.set(e,t),this.size=o.size,this};var Xe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ze=Xe&&"object"==typeof module&&module&&!module.nodeType&&module,et=Ze&&Ze.exports===Xe?b.Buffer:void 0,tt=et?et.allocUnsafe:void 0;function ot(){return[]}var nt=Object.prototype.propertyIsEnumerable,rt=Object.getOwnPropertySymbols,it=rt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var o=-1,n=null==e?0:e.length,r=0,i=[];++o<n;){var s=e[o];t(s,o,e)&&(i[r++]=s)}return i}(rt(e),function(t){return nt.call(e,t)}))}:ot;var st=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ge(t,it(e)),e=Je(e);return t}:ot;function at(e,t,o){var n=t(e);return O(e)?n:Ge(n,o(e))}function lt(e){return at(e,Me,it)}function ct(e){return at(e,$e,st)}var pt=Q(b,"DataView"),ut=Q(b,"Promise"),dt=Q(b,"Set"),ht="[object Map]",gt="[object Promise]",ft="[object Set]",mt="[object WeakMap]",yt="[object DataView]",bt=V(pt),vt=V(Ke),xt=V(ut),Et=V(dt),Ct=V(X),St=_;(pt&&St(new pt(new ArrayBuffer(1)))!=yt||Ke&&St(new Ke)!=ht||ut&&St(ut.resolve())!=gt||dt&&St(new dt)!=ft||X&&St(new X)!=mt)&&(St=function(e){var t=_(e),o="[object Object]"==t?e.constructor:void 0,n=o?V(o):"";if(n)switch(n){case bt:return yt;case vt:return ht;case xt:return gt;case Et:return ft;case Ct:return mt}return t});var kt=St,wt=Object.prototype.hasOwnProperty;var _t=b.Uint8Array;function At(e){var t=new e.constructor(e.byteLength);return new _t(t).set(new _t(e)),t}var Ot=/\w*$/;var Rt=v?v.prototype:void 0,jt=Rt?Rt.valueOf:void 0;function Nt(e,t,o){var n,r,i,s=e.constructor;switch(t){case"[object ArrayBuffer]":return At(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var o=t?At(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}(e,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var o=t?At(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}(e,o);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(i=new(r=e).constructor(r.source,Ot.exec(r))).lastIndex=r.lastIndex,i;case"[object Symbol]":return n=e,jt?Object(jt.call(n)):{}}}var Lt=Ae&&Ae.isMap,Tt=Lt?Se(Lt):function(e){return A(e)&&"[object Map]"==kt(e)};var Pt=Ae&&Ae.isSet,Mt=Pt?Se(Pt):function(e){return A(e)&&"[object Set]"==kt(e)},Ft="[object Arguments]",It="[object Function]",$t="[object Object]",Dt={};function Bt(e,t,o,n,r,i){var s,a=1&t,l=2&t,c=4&t;if(o&&(s=r?o(e,n,r,i):o(e)),void 0!==s)return s;if(!L(e))return e;var p=O(e);if(p){if(s=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&wt.call(e,"index")&&(o.index=e.index,o.input=e.input),o}(e),!a)return function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o<n;)t[o]=e[o];return t}(e,s)}else{var u=kt(e),d=u==It||"[object GeneratorFunction]"==u;if(Ee(e))return function(e,t){if(t)return e.slice();var o=e.length,n=tt?tt(o):new e.constructor(o);return e.copy(n),n}(e,a);if(u==$t||u==Ft||d&&!r){if(s=l||d?{}:function(e){return"function"!=typeof e.constructor||de(e)?{}:ee(Je(e))}(e),!a)return l?function(e,t){return le(e,st(e),t)}(e,function(e,t){return e&&le(t,$e(t),e)}(s,e)):function(e,t){return le(e,it(e),t)}(e,function(e,t){return e&&le(t,Me(t),e)}(s,e))}else{if(!Dt[u])return r?e:{};s=Nt(e,u,a)}}i||(i=new Qe);var h=i.get(e);if(h)return h;i.set(e,s),Mt(e)?e.forEach(function(n){s.add(Bt(n,t,o,n,e,i))}):Tt(e)&&e.forEach(function(n,r){s.set(r,Bt(n,t,o,r,e,i))});var g=p?void 0:(c?l?ct:lt:l?$e:Me)(e);return function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!1!==t(e[o],o,e););}(g||e,function(n,r){g&&(n=e[r=n]),ae(s,r,Bt(n,t,o,r,e,i))}),s}Dt[Ft]=Dt["[object Array]"]=Dt["[object ArrayBuffer]"]=Dt["[object DataView]"]=Dt["[object Boolean]"]=Dt["[object Date]"]=Dt["[object Float32Array]"]=Dt["[object Float64Array]"]=Dt["[object Int8Array]"]=Dt["[object Int16Array]"]=Dt["[object Int32Array]"]=Dt["[object Map]"]=Dt["[object Number]"]=Dt[$t]=Dt["[object RegExp]"]=Dt["[object Set]"]=Dt["[object String]"]=Dt["[object Symbol]"]=Dt["[object Uint8Array]"]=Dt["[object Uint8ClampedArray]"]=Dt["[object Uint16Array]"]=Dt["[object Uint32Array]"]=!0,Dt["[object Error]"]=Dt[It]=Dt["[object WeakMap]"]=!1;var zt=function(){return b.Date.now()},Ut=Math.max,Vt=Math.min;function Ht(e,t,o){var n,r,i,s,a,l,c=0,p=!1,u=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var o=n,i=r;return n=r=void 0,c=t,s=e.apply(i,o)}function g(e){var o=e-l;return void 0===l||o>=t||o<0||u&&e-c>=i}function f(){var e=zt();if(g(e))return m(e);a=setTimeout(f,function(e){var o=t-(e-l);return u?Vt(o,i-(e-c)):o}(e))}function m(e){return a=void 0,d&&n?h(e):(n=r=void 0,s)}function y(){var e=zt(),o=g(e);if(n=arguments,r=this,l=e,o){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),p?h(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(f,t),h(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=I(t)||0,L(o)&&(p=!!o.leading,i=(u="maxWait"in o)?Ut(I(o.maxWait)||0,t):i,d="trailing"in o?!!o.trailing:d),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},y.flush=function(){return void 0===a?s:m(zt())},y}const qt=o,Kt=t,Wt=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:"30px",Yt=({size:e,children:t})=>{const o={height:e=Wt(e),width:e,display:"inline-block",position:"relative"};return qt.createElement("div",{style:o},t)};Yt.propTypes={size:Kt.number,children:Kt.oneOfType([Kt.arrayOf(Kt.node),Kt.node]).isRequired};const Gt=o,Jt=t,Qt=({size:e,children:t,sx:o})=>Gt.createElement(Yt,{size:e},Gt.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40",...o}},t));Qt.propTypes={size:Jt.oneOfType([Jt.string,Jt.number]),children:Jt.oneOfType([Jt.arrayOf(Jt.node),Jt.node]).isRequired,sx:Jt.object},Jt.string.isRequired;const Xt=({fill:e})=>Gt.createElement("polygon",{transform:"translate(2, 0)",points:"34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",fill:e});Xt.propTypes={fill:Jt.string.isRequired};const Zt=({fill:e})=>Gt.createElement("path",{transform:"translate(1, 0)",d:"M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z",fill:e});Zt.propTypes={fill:Jt.string.isRequired};const eo=({fill:e})=>Gt.createElement("circle",{transform:"translate(-3,0)",cx:"23",cy:"20.4",r:"16",fill:e});eo.propTypes={fill:Jt.string.isRequired};const to=({fill:e})=>Gt.createElement("rect",{x:"3.6",y:"4.1",width:"32",height:"32",fill:e});to.propTypes={fill:Jt.string.isRequired};const oo=t,no=o;var ro=(e,t)=>{class o extends no.Component{static __initStatic(){this.propTypes={iconSet:oo.oneOf(["emoji","check"]),shape:oo.oneOf(["round","square"]),category:oo.oneOf(["feedback",void 0]),open:oo.bool,size:oo.oneOfType([oo.number,oo.string]),fg:oo.string,bg:oo.string}}static __initStatic2(){this.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,size:30,fg:"#4aaf46",bg:"#f8ffe2"}}render(){const{iconSet:o,shape:n,category:r,open:i,size:s,fg:a,bg:l}=this.props,c="check"===o?no.createElement(e,{fill:a}):no.createElement(t,{fill:a}),p="check"===o?no.createElement(e,{fill:l}):no.createElement(t,{fill:l});return i?no.createElement(Qt,{size:s},p):no.createElement(Qt,{size:s},"feedback"===r?"round"===n?no.createElement(Zt,{fill:l}):no.createElement(Xt,{fill:l}):"round"===n?no.createElement(eo,{fill:l}):no.createElement(to,{fill:l}),c)}}return o.__initStatic(),o.__initStatic2(),o};const io=t,so=o,ao=({fill:e})=>so.createElement("g",{transform:"translate(1, 0)"},so.createElement("path",{d:"M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",fill:e}),so.createElement("rect",{x:"21.1",y:"13.1",width:"3.7",height:"4.7",fill:e}),so.createElement("rect",{x:"12.7",y:"13.1",width:"3.7",height:"4.7",fill:e}));ao.propTypes={fill:io.string.isRequired};const lo=({fill:e,x:t=0,y:o=0})=>so.createElement("polygon",{transform:`translate(${t}, ${o})`,points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4",fill:e});lo.propTypes={fill:io.string.isRequired,x:io.number,y:io.number};const co=ro(lo,ao);co.propTypes={iconSet:io.oneOf(["emoji","check"]),shape:io.oneOf(["round","square"]),category:io.oneOf(["feedback",void 0]),open:io.bool,fg:io.string,bg:io.string,size:io.oneOfType([io.string,io.number])},co.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#f8ffe2",size:30};const po=t,uo=o,{styled:ho}=n,go=({bgFill:e,fgFill:t})=>uo.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-283 359 34 35",style:{enableBackground:"new -283 359 34 35"}},uo.createElement("circle",{cx:"-266",cy:"375.9",r:"14",fill:e}),uo.createElement("path",{d:"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",fill:e}),uo.createElement("polygon",{points:"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",fill:t}));go.propTypes={bgFill:po.string.isRequired,fgFill:po.string.isRequired};const fo=({bgFill:e,fgFill:t,borderFill:o})=>uo.createElement("svg",{preserveAspectRatio:"xMinYMin meet",version:"1.1",viewBox:"-129.5 127 34 35",style:{enableBackground:"new -129.5 127 34 35"}},uo.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"}),uo.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"}),uo.createElement("circle",{cx:"-114.2",cy:"143.5",r:"14",fill:e}),uo.createElement("path",{d:"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",fill:o}),uo.createElement("polygon",{points:"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",fill:t}));fo.propTypes={bgFill:po.string.isRequired,fgFill:po.string.isRequired,borderFill:po.string.isRequired};const mo=ho("div")(({size:e})=>({width:e||"25px",height:e||"25px"})),yo=({open:e,size:t})=>uo.createElement(mo,{size:t},e?uo.createElement(go,{bgFill:"#bce2ff",fgFill:"#1a9cff"}):uo.createElement(fo,{bgFill:"white",fgFill:"#1a9cff",borderFill:"#bce2ff"}));yo.propTypes={open:po.bool,size:po.string},yo.defaultProps={open:!1};const bo=t,vo=o,xo=({fill:e})=>vo.createElement("g",{transform:"translate(0.5, 0.5)"},vo.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",width:"16.6",height:"3.7",fill:e}),vo.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",width:"3.7",height:"16.6",fill:e}));xo.propTypes={fill:bo.string.isRequired};const Eo=({fill:e})=>vo.createElement("g",{transform:"translate(1,0)"},vo.createElement("rect",{x:"21",y:"12.9",width:"3.7",height:"4.7",fill:e}),vo.createElement("rect",{x:"12.7",y:"12.9",width:"3.7",height:"4.7",fill:e}),vo.createElement("rect",{x:"12.2",y:"22.5",width:"13",height:"3.3",fill:e}));Eo.propTypes={fill:bo.string.isRequired};const Co=ro(xo,Eo);Co.propTypes={iconSet:bo.oneOf(["emoji","check"]),shape:bo.oneOf(["round","square"]),category:bo.oneOf(["feedback",void 0]),open:bo.bool,fg:bo.string,bg:bo.string,size:bo.oneOfType([bo.string,bo.number])},Co.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#fcb733",bg:"#fbf2e3",size:30};const So=t,ko=o,wo=()=>{const e={fill:"none",stroke:"#BCE2FF",strokeWidth:2,strokeMiterlimit:10};return ko.createElement("g",null,ko.createElement("line",{style:e,x1:"-98",y1:"142",x2:"-114.6",y2:"142"}),ko.createElement("line",{style:e,x1:"-98",y1:"146.3",x2:"-114.6",y2:"146.3"}),ko.createElement("line",{style:e,x1:"-104",y1:"150.7",x2:"-114.6",y2:"150.7"}))},_o=({children:e,size:t})=>ko.createElement(Yt,{size:t},ko.createElement("svg",{version:"1.1",viewBox:"-128 129 31 31",style:{enableBackground:"new -128 129 31 31"}},e));_o.propTypes={children:So.oneOfType([So.arrayOf(So.node),So.node]).isRequired,size:So.number};const Ao=()=>ko.createElement("g",null,ko.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),ko.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),ko.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),ko.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),ko.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#7FABC6"},width:"4.1",height:"4.1"}),ko.createElement("polygon",{style:{fill:"#7FABC6"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "})),Oo=()=>ko.createElement("g",null,ko.createElement("rect",{x:"-123.9",y:"135.3",style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),ko.createElement("polygon",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeLinejoin:"round",strokeMiterlimit:10},points:"-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 "}),ko.createElement("rect",{x:"-124.7",y:"134.7",style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},width:"4.1",height:"4.1"}),ko.createElement("polygon",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:"-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 "}),ko.createElement("rect",{x:"-125.5",y:"134",style:{fill:"#1A9CFF"},width:"4.1",height:"4.1"}),ko.createElement("polygon",{style:{fill:"#1A9CFF"},points:"-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 "}));class Ro extends ko.Component{constructor(e){super(e)}render(){return!0===this.props.open?ko.createElement(_o,null,ko.createElement(Ao,null),ko.createElement(wo,null)):ko.createElement(_o,null,ko.createElement(Oo,null),ko.createElement(wo,null))}}Ro.propTypes={open:So.bool},Ro.defaultProps={open:!1};const jo=t,No=o,Lo=({fill:e})=>No.createElement("path",{fill:e,d:"M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z"});Lo.propTypes={fill:jo.string};class To extends No.Component{static __initStatic(){this.propTypes={classes:jo.object.isRequired,size:jo.number}}render(){const{size:e}=this.props;return!0===this.props.open?No.createElement(Yt,{size:e},No.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 32"},No.createElement("path",{fill:"#BCE2FF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),No.createElement("path",{fill:"#BCE2FF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),No.createElement(Lo,{fill:"#1A9CFF"}))):No.createElement(Yt,{size:e},No.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-135 129 16 31"},No.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z"}),No.createElement("path",{fill:"#D0CAC5",stroke:"#E6E3E0",className:"st0",d:"M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z"}),No.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z"}),",",No.createElement("path",{fill:"#B3ABA4",stroke:"#CDC7C2",className:"st1",d:"M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z"}),No.createElement("path",{fill:"#1A9CFF",d:"M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z"}),No.createElement("path",{fill:"#1A9CFF",d:"M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z"}),No.createElement(Lo,{fill:"1A9CFF"})))}}To.__initStatic(),To.propTypes={open:jo.bool},To.defaultProps={open:!1};const Po=t,Mo=o,Fo=({fill:e})=>Mo.createElement("g",null,Mo.createElement("rect",{x:"19.3",y:"10.3",width:"4.5",height:"12.7",fill:e}),Mo.createElement("rect",{x:"19.3",y:"26.2",width:"4.5",height:"4.5",fill:e}));Fo.propTypes={fill:Po.string.isRequired};const Io=({fill:e})=>Mo.createElement("polygon",{points:"14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",fill:e});Io.propTypes={fill:Po.string.isRequired};const $o=({fill:e})=>Mo.createElement("g",null,Mo.createElement("rect",{x:"23.8",y:"15",width:"3.5",height:"4.4",fill:e}),Mo.createElement("rect",{x:"16",y:"15",width:"3.5",height:"4.4",fill:e}),Mo.createElement("path",{d:"M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",fill:e}));$o.propTypes={fill:Po.string.isRequired};class Do extends Mo.Component{constructor(e){super(e);const{fg:t="#464146",bg:o="white"}=this.props;this.icons={check:Mo.createElement(Qt,null,Mo.createElement(Io,{fill:o}),Mo.createElement(Fo,{fill:t})),emoji:Mo.createElement(Qt,null,Mo.createElement(Io,{fill:o}),Mo.createElement($o,{fill:t})),feedback:{check:Mo.createElement(Qt,null,Mo.createElement(Io,{fill:o}),Mo.createElement($o,{fill:t})),emoji:Mo.createElement(Qt,null,Mo.createElement(Io,{fill:o}),Mo.createElement($o,{fill:t})),square:{check:Mo.createElement(Qt,null,Mo.createElement(Io,{fill:o}),Mo.createElement(Fo,{fill:t})),emoji:Mo.createElement(Qt,null,Mo.createElement(Io,{fill:o}),Mo.createElement($o,{fill:t})),open:{check:Mo.createElement(Qt,null,Mo.createElement(Fo,{fill:o})),emoji:Mo.createElement(Qt,null,Mo.createElement($o,{fill:o}))}}}}}render(){const{iconSet:e,category:t,shape:o,open:n}=this.props;return void 0===t?this.icons[e]:void 0===o?this.icons.feedback[e]:!0===n?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}}Do.propTypes={iconSet:Po.oneOf(["emoji","check",void 0]),shape:Po.oneOf(["square",void 0]),category:Po.oneOf(["feedback",void 0]),open:Po.bool,fg:Po.string,bg:Po.string},Do.defaultProps={iconSet:"check",shape:void 0,category:void 0,open:!1,fg:"#464146",bg:"white"};const Bo=t,zo=o,Uo=({fill:e})=>zo.createElement("g",{transform:"translate(0, 0)"},zo.createElement("polygon",{points:"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",fill:e}),zo.createElement("polygon",{points:"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",fill:e}));Uo.propTypes={fill:Bo.string.isRequired};const Vo=({fill:e})=>zo.createElement("g",{transform:"translate(2, 0)"},zo.createElement("rect",{x:"20.6",y:"11.8",width:"4",height:"5",fill:e}),zo.createElement("rect",{x:"11.5",y:"11.8",width:"4",height:"5",fill:e}),zo.createElement("rect",{x:"10.9",y:"22.9",transform:"matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",width:"14.3",height:"3.7",fill:e}));Vo.propTypes={fill:Bo.string.isRequired};const Ho=ro(Uo,Vo);Ho.propTypes={iconSet:Bo.oneOf(["emoji","check"]),shape:Bo.oneOf(["round","square"]),category:Bo.oneOf(["feedback",void 0]),open:Bo.bool,fg:Bo.string,bg:Bo.string,size:Bo.oneOfType([Bo.string,Bo.number])},Ho.defaultProps={iconSet:"check",shape:"round",category:void 0,open:!1,fg:"#4aaf46",bg:"#c1e1ac",size:30};const qo=t,Ko=o,Wo=({fill:e})=>Ko.createElement("g",null,Ko.createElement("rect",{x:"-115",y:"136.7",width:"3",height:"3",fill:e}),Ko.createElement("polygon",{points:"-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",fill:e}));Wo.propTypes={fill:qo.string.isRequired};const Yo=({fill:e})=>Ko.createElement("path",{d:"M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5z M-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",fill:e});Yo.propTypes={fill:qo.string.isRequired};const Go=({fill:e="#FFFFFF"})=>Ko.createElement("g",null,Ko.createElement("path",{style:{fill:"#D0CAC5",stroke:"#E6E3E0",strokeWidth:.75,strokeMiterlimit:10},d:"M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z"}),Ko.createElement("path",{style:{fill:"#B3ABA4",stroke:"#CDC7C2",strokeWidth:.5,strokeMiterlimit:10},d:"M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z"}),Ko.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:e}));Go.propTypes={fill:qo.string};const Jo=({children:e,size:t})=>{const o=Wt(t),n={height:o,width:o,display:"inline-block",position:"relative"};return Ko.createElement("div",{style:n},Ko.createElement("svg",{preserveAspectRatio:"xMinYMin meet",viewBox:"-129 128 34 34"},e))};Jo.propTypes={children:qo.oneOfType([qo.arrayOf(qo.node),qo.node]).isRequired,size:qo.oneOfType([qo.string,qo.number])};class Qo extends Ko.Component{render(){const{iconSet:e,open:t,fg:o="#1a9cff",bg:n="#bce2ff",border:r="#bbe3fd"}=this.props,i=Ko.createElement(Wo,{fill:o}),s={check:Ko.createElement(Jo,{size:this.props.size},Ko.createElement(Go,null),i,Ko.createElement(Yo,{fill:r})),emoji:Ko.createElement(Jo,{size:this.props.size},Ko.createElement(Go,null),i,Ko.createElement(Yo,{fill:r})),open:{check:Ko.createElement(Jo,{size:this.props.size},Ko.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Ko.createElement(Wo,{fill:n}),Ko.createElement(Yo,{fill:"#FFFFFF"})),emoji:Ko.createElement(Jo,{size:this.props.size},Ko.createElement("circle",{cx:"-113",cy:"144",r:"14",fill:"#FFFFFF"}),Ko.createElement(Wo,{fill:n}),Ko.createElement(Yo,{fill:r}))}};return!0===t?s.open[e]:s[e]}}function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Xo.apply(null,arguments)}function Zo(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}function en(e,t){return en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},en(e,t)}function tn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,en(e,t)}function on(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}Qo.propTypes={iconSet:qo.oneOf(["emoji","check"]),open:qo.bool,fg:qo.string,bg:qo.string,border:qo.string,size:qo.oneOfType([qo.string,qo.number])},Qo.defaultProps={iconSet:"check",open:!1,fg:"#1a9cff",bg:"#bce2ff",border:"#bbe3fd",size:30};var nn=!1;var rn=o.createContext(null),sn=function(e){return e.scrollTop};const an=o,ln=e;var cn="unmounted",pn="exited",un="entering",dn="entered",hn="exiting",gn=function(e){function t(t,o){var n;n=e.call(this,t,o)||this;var r,i=o&&!o.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?i?(r=pn,n.appearStatus=un):r=dn:r=t.unmountOnExit||t.mountOnEnter?cn:pn,n.state={status:r},n.nextCallback=null,n}tn(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===cn?{status:pn}:null};var o=t.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==un&&o!==dn&&(t=un):o!==un&&o!==dn||(t=hn)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,o,n=this.props.timeout;return e=t=o=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,o=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:o}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===un){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);o&&sn(o)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pn&&this.setState({status:cn})},o.performEnter=function(e){var t=this,o=this.props.enter,n=this.context?this.context.isMounting:e,r=this.props.nodeRef?[n]:[ln.findDOMNode(this),n],i=r[0],s=r[1],a=this.getTimeouts(),l=n?a.appear:a.enter;!e&&!o||nn?this.safeSetState({status:dn},function(){t.props.onEntered(i)}):(this.props.onEnter(i,s),this.safeSetState({status:un},function(){t.props.onEntering(i,s),t.onTransitionEnd(l,function(){t.safeSetState({status:dn},function(){t.props.onEntered(i,s)})})}))},o.performExit=function(){var e=this,t=this.props.exit,o=this.getTimeouts(),n=this.props.nodeRef?void 0:ln.findDOMNode(this);t&&!nn?(this.props.onExit(n),this.safeSetState({status:hn},function(){e.props.onExiting(n),e.onTransitionEnd(o.exit,function(){e.safeSetState({status:pn},function(){e.props.onExited(n)})})})):this.safeSetState({status:pn},function(){e.props.onExited(n)})},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,o=!0;return this.nextCallback=function(n){o&&(o=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var o=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(o&&!n){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],i=r[0],s=r[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===cn)return null;var t=this.props,o=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var n=Zo(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return an.createElement(rn.Provider,{value:null},"function"==typeof o?o(e,n):an.cloneElement(an.Children.only(o),n))},t}(an.Component);function fn(){}gn.contextType=rn,gn.propTypes={},gn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fn,onEntering:fn,onEntered:fn,onExit:fn,onExiting:fn,onExited:fn},gn.UNMOUNTED=cn,gn.EXITED=pn,gn.ENTERING=un,gn.ENTERED=dn,gn.EXITING=hn;var mn=gn;const yn=o;var bn=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return n=t,void((o=e).classList?o.classList.add(n):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(o,n)||("string"==typeof o.className?o.className=o.className+" "+n:o.setAttribute("class",(o.className&&o.className.baseVal||"")+" "+n)));var o,n})},vn=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return n=t,void((o=e).classList?o.classList.remove(n):"string"==typeof o.className?o.className=on(o.className,n):o.setAttribute("class",on(o.className&&o.className.baseVal||"",n)));var o,n})},xn=function(e){function t(){for(var t,o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,o){var n=t.resolveArguments(e,o),r=n[0],i=n[1];t.removeClasses(r,"exit"),t.addClass(r,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,o)},t.onEntering=function(e,o){var n=t.resolveArguments(e,o),r=n[0],i=n[1]?"appear":"enter";t.addClass(r,i,"active"),t.props.onEntering&&t.props.onEntering(e,o)},t.onEntered=function(e,o){var n=t.resolveArguments(e,o),r=n[0],i=n[1]?"appear":"enter";t.removeClasses(r,i),t.addClass(r,i,"done"),t.props.onEntered&&t.props.onEntered(e,o)},t.onExit=function(e){var o=t.resolveArguments(e)[0];t.removeClasses(o,"appear"),t.removeClasses(o,"enter"),t.addClass(o,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var o=t.resolveArguments(e)[0];t.addClass(o,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var o=t.resolveArguments(e)[0];t.removeClasses(o,"exit"),t.addClass(o,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,o){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,o]},t.getClassNames=function(e){var o=t.props.classNames,n="string"==typeof o,r=n?""+(n&&o?o+"-":"")+e:o[e];return{baseClassName:r,activeClassName:n?r+"-active":o[e+"Active"],doneClassName:n?r+"-done":o[e+"Done"]}},t}tn(t,e);var o=t.prototype;return o.addClass=function(e,t,o){var n=this.getClassNames(t)[o+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===o&&r&&(n+=" "+r),"active"===o&&e&&sn(e),n&&(this.appliedClasses[t][o]=n,bn(e,n))},o.removeClasses=function(e,t){var o=this.appliedClasses[t],n=o.base,r=o.active,i=o.done;this.appliedClasses[t]={},n&&vn(e,n),r&&vn(e,r),i&&vn(e,i)},o.render=function(){var e=this.props;e.classNames;var t=Zo(e,["classNames"]);return yn.createElement(mn,Xo({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(yn.Component);xn.defaultProps={classNames:""},xn.propTypes={};var En=xn;const{Children:Cn}=o,{cloneElement:Sn}=o,{isValidElement:kn}=o;function wn(e,t){var o=Object.create(null);return e&&Cn.map(e,function(e){return e}).forEach(function(e){o[e.key]=function(e){return t&&kn(e)?t(e):e}(e)}),o}function _n(e,t,o){return null!=o[t]?o[t]:e.props[t]}function An(e,t,o){var n=wn(e.children),r=function(e,t){function o(o){return o in t?t[o]:e[o]}e=e||{},t=t||{};var n,r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(r[l])for(n=0;n<r[l].length;n++){var c=r[l][n];a[r[l][n]]=o(c)}a[l]=o(l)}for(n=0;n<i.length;n++)a[i[n]]=o(i[n]);return a}(t,n);return Object.keys(r).forEach(function(i){var s=r[i];if(kn(s)){var a=i in t,l=i in n,c=t[i],p=kn(c)&&!c.props.in;!l||a&&!p?l||!a||p?l&&a&&kn(c)&&(r[i]=Sn(s,{onExited:o.bind(null,s),in:c.props.in,exit:_n(s,"exit",e),enter:_n(s,"enter",e)})):r[i]=Sn(s,{in:!1}):r[i]=Sn(s,{onExited:o.bind(null,s),in:!0,exit:_n(s,"exit",e),enter:_n(s,"enter",e)})}}),r}const On=o;var Rn=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},jn=function(e){function t(t,o){var n,r=(n=e.call(this,t,o)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n));return n.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},n}tn(t,e);var o=t.prototype;return o.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},o.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var o,n,r=t.children,i=t.handleExited;return{children:t.firstRender?(o=e,n=i,wn(o.children,function(e){return Sn(e,{onExited:n.bind(null,e),in:!0,appear:_n(e,"appear",o),enter:_n(e,"enter",o),exit:_n(e,"exit",o)})})):An(e,r,i),firstRender:!1}},o.handleExited=function(e,t){var o=wn(this.props.children);e.key in o||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var o=Xo({},t.children);return delete o[e.key],{children:o}}))},o.render=function(){var e=this.props,t=e.component,o=e.childFactory,n=Zo(e,["component","childFactory"]),r=this.state.contextValue,i=Rn(this.state.children).map(o);return delete n.appear,delete n.enter,delete n.exit,null===t?On.createElement(rn.Provider,{value:r},i):On.createElement(rn.Provider,{value:r},On.createElement(t,n,i))},t}(On.Component);jn.propTypes={},jn.defaultProps={component:"div",childFactory:function(e){return e}};var Nn=jn;const Ln={TEXT:"black",DISABLED:"grey",DISABLED_SECONDARY:"#ABABAB",CORRECT:c[500],CORRECT_SECONDARY:c[50],CORRECT_TERTIARY:"#0EA449",CORRECT_WITH_ICON:"#087D38",INCORRECT:p[500],INCORRECT_SECONDARY:u[50],INCORRECT_WITH_ICON:"#BF0D00",MISSING:u[700],MISSING_WITH_ICON:"#6A78A1",PRIMARY:d[500],PRIMARY_LIGHT:d[200],PRIMARY_DARK:d[800],SECONDARY:h.A400,SECONDARY_LIGHT:h[200],SECONDARY_DARK:h[900],TERTIARY:"#146EB3",TERTIARY_LIGHT:"#D0E2F0",BACKGROUND:"rgba(255,255,255,0)",BACKGROUND_DARK:"#ECEDF1",DROPDOWN_BACKGROUND:"#E0E1E6",SECONDARY_BACKGROUND:"rgba(241,241,241,1)",BORDER:"#9A9A9A",BORDER_LIGHT:"#D1D1D1",BORDER_DARK:"#646464",BORDER_GRAY:"#7E8494",BLACK:"#000000",WHITE:"#ffffff",TRANSPARENT:"transparent",FOCUS_CHECKED:"#BBDEFB",FOCUS_CHECKED_BORDER:"#1565C0",FOCUS_UNCHECKED:"#E0E0E0",FOCUS_UNCHECKED_BORDER:"#757575",BLUE_GREY100:"#F3F5F7",BLUE_GREY300:"#C0C3CF",BLUE_GREY600:"#7E8494",BLUE_GREY900:"#152452",FADED_PRIMARY:"#DCDAFB",KEYPAD_BUTTON:"rgb(188, 194, 229)",KEYPAD_BUTTON_OPERATOR:"rgb(255, 159, 192)",KEYPAD_EMPTY_PLACEHOLDER:"rgba(245, 0, 87, 0.4)",KEYPAD_BUTTON_HOVER:"rgb(214, 218, 239)",KEYPAD_BUTTON_OPERATOR_HOVER:"rgb(255, 197, 217)",BUTTON_BORDER:"rgba(0, 0, 0, 0.23)",BUTTON_HOVER_BG:"rgba(0, 0, 0, 0.08)"};Object.freeze(Ln);const Tn=(Pn="pie",(...e)=>{const t=e.pop();return e.reduceRight((e,t)=>`var(--${Pn}-${t}, ${e})`,t)});var Pn;const Mn=()=>Tn("text",Ln.TEXT),Fn=()=>Tn("disabled",Ln.DISABLED),In=()=>Tn("correct",Ln.CORRECT),$n=()=>Tn("incorrect",Ln.INCORRECT),Dn=()=>Tn("background",Ln.BACKGROUND),Bn=o,zn=t,{styled:Un}=n,Vn=Un("div")({transformOrigin:"0% 0px 0px",width:"100%",display:"block",overflow:"hidden","&.incorrect":{color:"#946202"}}),Hn=Un("div")({WebkitFontSmoothing:"antialiased",backgroundColor:`var(--feedback-bg-color, ${Fn()})`,borderRadius:"4px",lineHeight:"25px",margin:"0px",padding:"10px",verticalAlign:"middle",color:"var(--feedback-color, white)","&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${In()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$n()})`}}),qn=Un("div")({"&.feedback-enter":{height:"1px"},"&.feedback-enter-active":{height:"45px",transition:"height 500ms"},"&.feedback-exit":{height:"45px"},"&.feedback-exit-active":{height:"1px",transition:"height 200ms"}});class Kn extends Bn.Component{constructor(...e){super(...e),Kn.prototype.__init.call(this)}static __initStatic(){this.propTypes={correctness:zn.string,feedback:zn.string}}__init(){this.nodeRef=Bn.createRef()}renderFeedback(){const{correctness:e,feedback:t}=this.props;return e&&t?Bn.createElement(En,{key:"hasFeedback",nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:"feedback"},Bn.createElement(qn,{ref:this.nodeRef},Bn.createElement(Vn,null,Bn.createElement(Hn,{className:e,dangerouslySetInnerHTML:{__html:t}})))):null}render(){return Bn.createElement("div",null,Bn.createElement(Nn,null,this.renderFeedback()))}}Kn.__initStatic();const Wn=o,Yn=t,{Popover:Gn}=r,{styled:Jn}=n,Qn=i("pie-libs:render-ui:response-indicators"),Xn=Jn("div")(({hasFeedback:e})=>({cursor:e?"pointer":"default"})),Zn=Jn(Gn)({cursor:"pointer"}),er=Jn("div")({padding:"0",borderRadius:"4px"}),tr=(e,t)=>{class o extends Wn.Component{constructor(e){super(e),o.prototype.__init.call(this),o.prototype.__init2.call(this),this.state={}}__init(){this.handlePopoverOpen=e=>{Qn("[handlePopoverOpen]",e.target),this.setState({anchorEl:e.target})}}__init2(){this.handlePopoverClose=()=>{this.setState({anchorEl:null})}}render(){const{feedback:o}=this.props,{anchorEl:n}=this.state;return Wn.createElement(Xn,{hasFeedback:!!o},Wn.createElement("span",{ref:e=>this.icon=e,onClick:this.handlePopoverOpen},Wn.createElement(e,null)),o&&Wn.createElement(Zn,{PaperComponent:er,open:!!n,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:this.handlePopoverClose},Wn.createElement(Kn,{feedback:o,correctness:t})))}}return o.propTypes={feedback:Yn.string},o};tr(co,"correct"),tr(Co,"incorrect"),tr(Ho,"partially-correct"),tr(Do,"nothing-submitted");const or=o,{styled:nr}=n,rr=s,ir=t,{renderMath:sr}=l,ar=nr("span")(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:"pointer"})),lr=nr(rr)(({theme:e})=>({paddingTop:e.spacing(2)}));class cr extends or.Component{constructor(...e){super(...e),cr.prototype.__init.call(this),cr.prototype.__init2.call(this)}static __initStatic(){this.propTypes={className:ir.string,children:ir.object,labels:ir.shape({visible:ir.string,hidden:ir.string})}}static __initStatic2(){this.defaultProps={labels:{}}}__init(){this.state={expanded:!1}}__init2(){this.toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))}}componentDidMount(){sr(this.root)}componentDidUpdate(){sr(this.root)}render(){const{labels:e,children:t,className:o}=this.props,n=this.state.expanded?e.visible||"Hide":e.hidden||"Show";return or.createElement("div",{className:o,ref:e=>this.root=e},or.createElement("div",{onClick:this.toggleExpanded},or.createElement(ar,null,n)),or.createElement(lr,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0},t))}}cr.__initStatic(),cr.__initStatic2();const{Button:pr}=r,{styled:ur}=n;ur("div")({display:"flex",flexDirection:"column"}),ur("div")({display:"flex",alignItems:"center",justifyContent:"center"}),ur("div")(({theme:e})=>({width:"24px",height:"24px",color:"gray",marginRight:e.spacing(1),display:"flex",alignItems:"center"})),ur(pr)(({theme:e})=>({display:"flex",alignItems:"center",marginLeft:e.spacing(3),marginRight:e.spacing(3)}));const dr=o,{createTheme:hr}=n,{styled:gr}=n,{StyledEngineProvider:fr}=n,{ThemeProvider:mr}=n,yr=t;const br=hr({typography:{fontFamily:"inherit"},palette:{action:{disabled:"rgba(0, 0, 0, 0.54);"}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"inherit"}}},MuiButton:{styleOverrides:{contained:{backgroundColor:"#e0e0e0",color:"#000000","&:hover":{backgroundColor:"#bdbdbd"}}}}}}),vr=gr("div")({"& table, th, td":{fontSize:"inherit"}});class xr extends dr.Component{static __initStatic(){this.propTypes={className:yr.string,children:yr.array,extraCSSRules:yr.shape({names:yr.arrayOf(yr.string),rules:yr.string}),fontSizeFactor:yr.number}}static __initStatic2(){this.defaultProps={extraCSSRules:{},fontSizeFactor:1}}constructor(e){super(e),this.classesSheet=document.createElement("style")}computeStyle(e){const t=e=>parseFloat(getComputedStyle(e).fontSize),o=t(document.documentElement),n=t(document.body),r=Math.max(o,n),i=null!=e&&"number"==typeof e?e:1;return 1!==i?{fontSize:r*i+"px"}:null}render(){const{children:e,className:t,fontSizeFactor:o,...n}=this.props,{extraCSSRules:r,...i}=n,s=this.computeStyle(o);return dr.createElement(fr,{injectFirst:!0},dr.createElement(mr,{theme:br},function(e){let t,o=e[0],n=1;for(;n<e.length;){const r=e[n],i=e[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==o)return;"access"===r||"optionalAccess"===r?(t=o,o=i(o)):"call"!==r&&"optionalCall"!==r||(o=i((...e)=>o.call(t,...e)),t=void 0)}return o}([r,"optionalAccess",e=>e.rules])?dr.createElement("style",{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${r.rules} }`}}):null,dr.createElement(vr,{className:`${t} extraCSSRules`,...i,...s&&{style:s}},e)))}}xr.__initStatic(),xr.__initStatic2();const Er=o,{styled:Cr}=n,Sr=t,kr=Cr(xr)({display:"flex",flexDirection:"column",position:"relative"});class wr extends Er.Component{static __initStatic(){this.propTypes={ariaLabel:Sr.string,children:Sr.oneOfType([Sr.arrayOf(Sr.node),Sr.node]).isRequired,role:Sr.string,extraCSSRules:Sr.shape({names:Sr.arrayOf(Sr.string),rules:Sr.string}),fontSizeFactor:Sr.number}}render(){const{children:e,ariaLabel:t,role:o,extraCSSRules:n,fontSizeFactor:r,classes:i}=this.props,s=t?{"aria-label":t,role:o}:{};return Er.createElement(kr,{...s,extraCSSRules:n,fontSizeFactor:r,classes:i},e)}}wr.__initStatic();const _r=o,Ar=t;class Or extends _r.Component{static __initStatic(){this.propTypes={tag:Ar.string,className:Ar.string,html:Ar.string}}static __initStatic2(){this.defaultProps={tag:"div",html:""}}render(){const{tag:e,className:t,html:o}=this.props,n=e||"div";return _r.createElement(n,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:o}})}}Or.__initStatic(),Or.__initStatic2();const{InputLabel:Rr}=r,{FormControl:jr}=r,Nr=t,{styled:Lr}=n;Lr(jr)(({theme:e})=>({margin:0,padding:0,flex:"1 0 auto",minWidth:e.spacing(4)})),Lr(Rr)(()=>({fontSize:"inherit",whiteSpace:"nowrap",margin:0,padding:0,alignSelf:"flex-start",position:"absolute",top:0,left:0,transformOrigin:"top left",pointerEvents:"none","&.MuiInputLabel-shrink":{transform:"scale(0.75) translate(0, -0.75em)"},"&:not(.MuiInputLabel-shrink)":{transform:"translate(0, 0)"}})),Nr.oneOfType([Nr.string,Nr.object]).isRequired,Nr.string,Nr.oneOfType([Nr.arrayOf(Nr.node),Nr.node]).isRequired;const Tr=o,{Component:Pr}=o,{styled:Mr}=n,Fr=t,{renderMath:Ir}=l,$r=Mr("div")(({theme:e,tagName:t})=>({"&:not(.MathJax) > table":{borderCollapse:"collapse"},"&:not(.MathJax) > table:has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)":{backgroundColor:"#f6f8fa",color:e.palette.common.black},"&:not(.MathJax) > table:has(tbody tr > td:first-child) tbody tr:nth-child(even) td":{backgroundColor:"#f6f8fa",color:e.palette.common.black},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:".6em 1em",textAlign:"left"},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:"initial"},"&.prompt":{verticalAlign:"middle",color:Mn()},"&.legend":{width:"100%",fontSize:"inherit !important"},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Mn()} !important`,display:"flex",flexDirection:"column",verticalAlign:"middle",cursor:"pointer","& > p":{margin:"0 0 0 0 !important"}}})),Dr=/\\embed\{newLine\}\[\]/g;class Br extends Pr{constructor(...e){super(...e),Br.prototype.__init.call(this)}static __initStatic(){this.propTypes={prompt:Fr.string,tagName:Fr.string,className:Fr.string,onClick:Fr.func,defaultClassName:Fr.string,autoplayAudioEnabled:Fr.bool,customAudioButton:{playImage:Fr.string,pauseImage:Fr.string}}}static __initStatic2(){this.defaultProps={onClick:()=>{}}}__init(){this.parsedText=e=>{const{customAudioButton:t}=this.props,o=document.createElement("div");o.innerHTML=e;const n=o.querySelector("audio");if(n){const e=document.createElement("source");if(e.setAttribute("type","audio/mp3"),e.setAttribute("src",n.getAttribute("src")),n.removeAttribute("src"),n.setAttribute("id","pie-prompt-audio-player"),n.appendChild(e),t){n.style.display="none";const e=document.createElement("div");e.id="play-audio-button",Object.assign(e.style,{cursor:"pointer",display:"block",width:"128px",height:"128px",backgroundImage:`url(${t.pauseImage})`,backgroundSize:"cover",borderRadius:"50%",border:"1px solid #326295"}),n.parentNode.insertBefore(e,n)}}return o.innerHTML}}addCustomAudioButtonControls(){const{autoplayAudioEnabled:e,customAudioButton:t}=this.props,o=document.getElementById("play-audio-button"),n=document.getElementById("pie-prompt-audio-player");if(e&&n&&n.play().then(()=>{o&&t&&n.addEventListener("ended",i)}).catch(e=>{console.error("Error playing audio",e)}),!o||!n||!t)return;const r=()=>{n.paused&&(o.style.backgroundImage.includes(t.pauseImage)||n.play())},i=()=>{o.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(o.style,{backgroundImage:`url(${t.pauseImage})`,border:"1px solid #ccc"})},a=()=>{Object.assign(o.style,{backgroundImage:`url(${t.playImage})`,border:"1px solid #326295"})};o.addEventListener("click",r),n.addEventListener("play",s),n.addEventListener("pause",a),n.addEventListener("ended",i),this._handlePlayClick=r,this._handleAudioPlay=s,this._handleAudioPause=a,this._handleAudioEnded=i}removeCustomAudioButtonListeners(){const e=document.getElementById("play-audio-button"),t=document.querySelector("audio");e&&t&&(e.removeEventListener("click",this._handlePlayClick),t.removeEventListener("play",this._handleAudioPlay),t.removeEventListener("pause",this._handleAudioPause),t.removeEventListener("ended",this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){const e=document.getElementById("preview-prompt");e&&"function"==typeof Ir&&Ir(e)}alignImages(){document.querySelectorAll("#preview-prompt").forEach(e=>{const t=e.getElementsByTagName("img");if(t&&t.length)for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){const t=e.attributes.alignment.value,o="center"===t?"center":"right"===t?"flex-end":"flex-start",n=e.parentElement;if("DIV"===n.tagName&&"flex"===n.style.display&&"100%"===n.style.width)n.style.justifyContent=o;else{const t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent=o;const r=e.cloneNode(!0);t.appendChild(r),n.replaceChild(t,e)}}})}render(){const{prompt:e,tagName:t,className:o,onClick:n,defaultClassName:r}=this.props,i=`${o||""} ${r||""} ${"legend"===t?"legend":""}`.trim();return Tr.createElement($r,{as:t||"div",id:"preview-prompt",onClick:n,className:i,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||"").replace(Dr,"\\newline ")}})}}Br.__initStatic(),Br.__initStatic2();const zr=t,Ur=o,Vr=e=>Ur.createElement(Ur.Fragment,null,Ur.Children.map(e.children,t=>Ur.cloneElement(t,{"data-pie-readable":void 0===e.false})));Vr.propTypes={children:zr.node,false:zr.bool};const Hr=t;Hr.node,Hr.string,"undefined"!=typeof window&&new DOMParser,"undefined"!=typeof window&&new DOMParser;const qr=o,{useRef:Kr}=o,Wr=t,{styled:Yr}=n,Gr="height ease-in 300ms, opacity ease-in 300ms",Jr=Yr("div")(()=>({position:"relative",height:0,overflow:"hidden",display:"flex",visibility:"hidden",width:0,"&.enter":{transition:Gr,opacity:1,height:"auto",width:"auto",visibility:"visible",minHeight:"25px"},"&.enter-done":{height:"auto",visibility:"visible",width:"auto",minHeight:"25px"},"&.exit":{transition:Gr,opacity:0,height:0,visibility:"visible",width:0},"&.exit-done":{opacity:0,visibility:"hidden",height:0,width:0}})),Qr=e=>{const{show:t,children:o,className:n}=e,r=Kr(null);return qr.createElement(En,{nodeRef:r,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:"enter",enterDone:"enter-done",exit:"exit",exitDone:"exit-done"}},qr.createElement(Jr,{ref:r,className:n},o))};function Xr(e,t){return null!=e?e:t()}function Zr(e){let t,o=e[0],n=1;for(;n<e.length;){const r=e[n],i=e[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==o)return;"access"===r||"optionalAccess"===r?(t=o,o=i(o)):"call"!==r&&"optionalCall"!==r||(o=i((...e)=>o.call(t,...e)),t=void 0)}return o}Qr.propTypes={show:Wr.bool.isRequired,className:Wr.string,children:Wr.oneOfType([Wr.arrayOf(Wr.node),Wr.node]).isRequired};const ei=e=>"string"==typeof e,ti=()=>{let e,t;const o=new Promise((o,n)=>{e=o,t=n});return o.resolve=e,o.reject=t,o},oi=e=>null==e?"":""+e,ni=/###/g,ri=e=>e&&e.indexOf("###")>-1?e.replace(ni,"."):e,ii=e=>!e||ei(e),si=(e,t,o)=>{const n=ei(t)?t.split("."):t;let r=0;for(;r<n.length-1;){if(ii(e))return{};const t=ri(n[r]);!e[t]&&o&&(e[t]=new o),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return ii(e)?{}:{obj:e,k:ri(n[r])}},ai=(e,t,o)=>{const{obj:n,k:r}=si(e,t,Object);if(void 0!==n||1===t.length)return void(n[r]=o);let i=t[t.length-1],s=t.slice(0,t.length-1),a=si(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=si(e,s,Object),Zr([a,"optionalAccess",e=>e.obj])&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=o},li=(e,t)=>{const{obj:o,k:n}=si(e,t);if(o&&Object.prototype.hasOwnProperty.call(o,n))return o[n]},ci=(e,t,o)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?ei(e[n])||e[n]instanceof String||ei(t[n])||t[n]instanceof String?o&&(e[n]=t[n]):ci(e[n],t[n],o):e[n]=t[n]);return e},pi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ui={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const di=e=>ei(e)?e.replace(/[&<>"'\/]/g,e=>ui[e]):e;const hi=[" ",",","?","!",";"],gi=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const o=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,o),this.regExpQueue.push(e),o}}(20),fi=(e,t,o=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const n=t.split(o);let r=e;for(let e=0;e<n.length;){if(!r||"object"!=typeof r)return;let t,i="";for(let s=e;s<n.length;++s)if(s!==e&&(i+=o),i+=n[s],t=r[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<n.length-1)continue;e+=s-e+1;break}r=t}return r},mi=e=>Zr([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),yi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){Zr([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class bi{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||yi,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,o,n){return n&&!this.debug?null:(ei(e[0])&&(e[0]=`${o}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new bi(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new bi(this.logger,e)}}var vi=new bi;class xi{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const o=this.observers[e].get(t)||0;this.observers[e].set(t,o+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,o])=>{for(let n=0;n<o;n++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([o,n])=>{for(let r=0;r<n;r++)o.apply(o,[e,...t])})}}}class Ei extends xi{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,o,n={}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],o&&(Array.isArray(o)?s.push(...o):ei(o)&&r?s.push(...o.split(r)):s.push(o)));const a=li(this.data,s);return!a&&!t&&!o&&e.indexOf(".")>-1&&(e=s[0],t=s[1],o=s.slice(2).join(".")),!a&&i&&ei(o)?fi(Zr([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),o,r):a}addResource(e,t,o,n,r={silent:!1}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[e,t];o&&(s=s.concat(i?o.split(i):o)),e.indexOf(".")>-1&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),ai(this.data,s,n),r.silent||this.emit("added",e,t,o,n)}addResources(e,t,o,n={silent:!1}){for(const n in o)(ei(o[n])||Array.isArray(o[n]))&&this.addResource(e,t,n,o[n],{silent:!0});n.silent||this.emit("added",e,t,o)}addResourceBundle(e,t,o,n,r,i={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),n=o,o=t,t=s[1]),this.addNamespaces(t);let a=li(this.data,s)||{};i.skipCopy||(o=JSON.parse(JSON.stringify(o))),n?ci(a,o,r):a={...a,...o},ai(this.data,s,a),i.silent||this.emit("added",e,t,o)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Ci={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,o,n,r){return e.forEach(e=>{t=Xr(Zr([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,o,n,r)]),()=>t)}),t}};const Si=Symbol("i18next/PATH_KEY");function ki(e,t){const{[Si]:o}=e(function(){const e=[],t=Object.create(null);let o;return t.get=(n,r)=>(Zr([o,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),r===Si?e:(e.push(r),o=Proxy.revocable(n,t),o.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return o.join(Xr(Zr([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const wi={},_i=e=>!ei(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Ai extends xi{constructor(e,t={}){var o,n;super(),o=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{o[e]&&(n[e]=o[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=vi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const o={...t};if(null==e)return!1;const n=this.resolve(e,o);if(void 0===Zr([n,"optionalAccess",e=>e.res]))return!1;const r=_i(n.res);return!1!==o.returnObjects||!r}extractFromKey(e,t){let o=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===o&&(o=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const i=o&&e.indexOf(o)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,o)=>{t=t||"",o=o||"";const n=hi.filter(e=>t.indexOf(e)<0&&o.indexOf(e)<0);if(0===n.length)return!0;const r=gi.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!r.test(e);if(!i){const t=e.indexOf(o);t>0&&!r.test(e.substring(0,t))&&(i=!0)}return i})(e,o,n));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ei(r)?[r]:r};const i=e.split(o);(o!==n||o===n&&this.options.ns.indexOf(i[0])>-1)&&(r=i.shift()),e=i.join(n)}return{key:e,namespaces:ei(r)?[r]:r}}translate(e,t,o){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=ki(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);const r=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],n),l=a[a.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const p=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===Zr([p,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return u?r?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${s}`:r?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s;const d=this.resolve(e,n);let h=Zr([d,"optionalAccess",e=>e.res]);const g=Zr([d,"optionalAccess",e=>e.usedKey])||s,f=Zr([d,"optionalAccess",e=>e.exactUsedKey])||s,m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!ei(n.count),v=Ai.hasDefaultValue(n),x=b?this.pluralResolver.getSuffix(p,n.count,n):"",E=n.ordinal&&b?this.pluralResolver.getSuffix(p,n.count,{ordinal:!1}):"",C=b&&!n.ordinal&&0===n.count,S=C&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${x}`]||n[`defaultValue${E}`]||n.defaultValue;let k=h;y&&!h&&v&&(k=S);const w=_i(k),_=Object.prototype.toString.apply(k);if(!(y&&k&&w&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||ei(m)&&Array.isArray(k))if(y&&ei(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,n,o));else{let t=!1,r=!1;!this.isValidLookup(h)&&v&&(t=!0,h=S),this.isValidLookup(h)||(r=!0,h=s);const a=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:h,u=v&&S!==h&&this.options.updateMissing;if(r||t||u){if(this.logger.log(u?"updateKey":"missingKey",p,l,s,u?S:h),i){const e=this.resolve(s,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let o=0;o<t.length;o++)e.push(t[o]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const o=(e,t,o)=>{const r=v&&o!==h?o:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,u,n):Zr([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,r,u,n),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);C&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{o([e],s+t,n[`defaultValue${t}`]||S)})}):o(e,s,S))}h=this.extendTranslation(h,e,n,d,o),r&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${s}`),(r||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?h:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,k,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(d.res=e,d.usedParams=this.getUsedParamsDetails(n),d):e}if(i){const e=Array.isArray(k),t=e?[]:{},o=e?f:g;for(const e in k)if(Object.prototype.hasOwnProperty.call(k,e)){const r=`${o}${i}${e}`;t[e]=v&&!h?this.translate(r,{...n,defaultValue:_i(S)?S[e]:void 0,joinArrays:!1,ns:a}):this.translate(r,{...n,joinArrays:!1,ns:a}),t[e]===r&&(t[e]=k[e])}h=t}}return r?(d.res=h,d.usedParams=this.getUsedParamsDetails(n),d):h}extendTranslation(e,t,o,n,r){if(Zr([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const i=ei(e)&&(void 0!==Zr([o,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(i){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=o.replace&&!ei(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,o.lng||this.language||n.usedLng,o),i){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(o.nest=!1)}!o.lng&&n&&n.res&&(o.lng=this.language||n.usedLng),!1!==o.nest&&(e=this.interpolator.nest(e,(...e)=>Zr([r,"optionalAccess",e=>e[0]])!==e[0]||o.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),o)),o.interpolation&&this.interpolator.reset()}const i=o.postProcess||this.options.postProcess,s=ei(i)?[i]:i;return null!=e&&Zr([s,"optionalAccess",e=>e.length])&&!1!==o.applyPostProcessor&&(e=Ci.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),e}resolve(e,t={}){let o,n,r,i,s;return ei(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(o))return;const a=this.extractFromKey(e,t),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=void 0!==t.count&&!ei(t.count),u=p&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(ei(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(o)||(s=e,wi[`${h[0]}-${e}`]||!Zr([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||Zr([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(s)])||(wi[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(n=>{if(this.isValidLookup(o))return;i=n;const s=[l];if(Zr([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(s,l,n,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(n,t.count,t));const o=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(r)&&s.push(l+e.replace(r,this.options.pluralSeparator)),s.push(l+e),u&&s.push(l+o)),d){const n=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(n),p&&(t.ordinal&&0===e.indexOf(r)&&s.push(n+e.replace(r,this.options.pluralSeparator)),s.push(n+e),u&&s.push(n+o))}}let a;for(;a=s.pop();)this.isValidLookup(o)||(r=a,o=this.getResource(n,e,a,t))}))})}),{res:o,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,o,n={}){return Zr([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,o,n):this.resourceStore.getResource(e,t,o,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=e.replace&&!ei(e.replace);let n=o?e.replace:e;if(o&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!o){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t===o.substring(0,12)&&void 0!==e[o])return!0;return!1}}class Oi{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vi.create("languageUtils")}getScriptPartFromCode(e){if(!(e=mi(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=mi(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ei(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const o=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(o)||(t=o)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const o=this.getScriptPartFromCode(e);if(this.isSupportedCode(o))return t=o;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),ei(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let o=e[t];return o||(o=e[this.getScriptPartFromCode(t)]),o||(o=e[this.formatLanguageCode(t)]),o||(o=e[this.getLanguagePartFromCode(t)]),o||(o=e.default),o||[]}toResolveHierarchy(e,t){const o=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],r=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ei(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):ei(e)&&r(this.formatLanguageCode(e)),o.forEach(e=>{n.indexOf(e)<0&&r(this.formatLanguageCode(e))}),n}}const Ri={zero:0,one:1,two:2,few:3,many:4,other:5},ji={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ni{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=vi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const o=mi("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:o,type:n});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let i;try{i=new Intl.PluralRules(o,{type:n})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ji;if(!e.match(/-|_/))return ji;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[r]=i,i}needsPlural(e,t={}){let o=this.getRule(e,t);return o||(o=this.getRule("dev",t)),Zr([o,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.length])>1}getPluralFormsOfKey(e,t,o={}){return this.getSuffixes(e,o).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let o=this.getRule(e,t);return o||(o=this.getRule("dev",t)),o?o.resolvedOptions().pluralCategories.sort((e,t)=>Ri[e]-Ri[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,o={}){const n=this.getRule(e,o);return n?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,o))}}const Li=(e,t,o,n=".",r=!0)=>{let i=((e,t,o)=>{const n=li(e,o);return void 0!==n?n:li(t,o)})(e,t,o);return!i&&r&&ei(o)&&(i=fi(e,o,n),void 0===i&&(i=fi(t,o,n))),i},Ti=e=>e.replace(/\$/g,"$$$$");class Pi{constructor(e={}){this.logger=vi.create("interpolator"),this.options=e,this.format=Zr([e,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.format])||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:o,useRawValueToEscape:n,prefix:r,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:u,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:di,this.escapeValue=void 0===o||o,this.useRawValueToEscape=void 0!==n&&n,this.prefix=r?pi(r):i||"{{",this.suffix=s?pi(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?pi(u):d||pi("$t("),this.nestingSuffix=h?pi(h):g||pi(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>Zr([e,"optionalAccess",e=>e.source])===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,o,n){let r,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const r=Li(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,o,{...n,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),i=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(Li(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,o,{...n,...t,interpolationkey:i})};this.resetRegExp();const c=Zr([n,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,p=void 0!==Zr([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Ti(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ti(this.escape(e)):Ti(e)}].forEach(t=>{for(s=0;r=t.regex.exec(e);){const o=r[1].trim();if(i=l(o),void 0===i)if("function"==typeof c){const t=c(e,r,n);i=ei(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,o))i="";else{if(p){i=r[0];continue}this.logger.warn(`missed to pass in variable ${o} for interpolating ${e}`),i=""}else ei(i)||this.useRawValueToEscape||(i=oi(i));const a=t.safeValue(i);if(e=e.replace(r[0],a),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,o={}){let n,r,i;const s=(e,t)=>{const o=this.nestingOptionsSeparator;if(e.indexOf(o)<0)return e;const n=e.split(new RegExp(`${o}[ ]*{`));let r=`{${n[1]}`;e=n[0],r=this.interpolate(r,i);const s=r.match(/'/g),a=r.match(/"/g);(Xr(Zr([s,"optionalAccess",e=>e.length]),()=>0)%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{i=JSON.parse(r),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${o}${r}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];i={...o},i=i.replace&&!ei(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(a=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),r=t(s.call(this,n[1].trim(),i),i),r&&n[0]===e&&!ei(r))return r;ei(r)||(r=oi(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),a.length&&(r=a.reduce((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Mi=e=>{const t={};return(o,n,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const s=n+JSON.stringify(i);let a=t[s];return a||(a=e(mi(n),r),t[s]=a),a(o)}},Fi=e=>(t,o,n)=>e(mi(o),n)(t);class Ii{constructor(e={}){this.logger=vi.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const o=t.cacheInBuiltFormats?Mi:Fi;this.formats={number:o((e,t)=>{const o=new Intl.NumberFormat(e,{...t});return e=>o.format(e)}),currency:o((e,t)=>{const o=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>o.format(e)}),datetime:o((e,t)=>{const o=new Intl.DateTimeFormat(e,{...t});return e=>o.format(e)}),relativetime:o((e,t)=>{const o=new Intl.RelativeTimeFormat(e,{...t});return e=>o.format(e,t.range||"day")}),list:o((e,t)=>{const o=new Intl.ListFormat(e,{...t});return e=>o.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Mi(t)}format(e,t,o,n={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const o={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const r=n[1].substring(0,n[1].length-1);"currency"===t&&r.indexOf(":")<0?o.currency||(o.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?o.range||(o.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),r=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();o[i]||(o[i]=r),"false"===r&&(o[i]=!1),"true"===r&&(o[i]=!0),isNaN(r)||(o[i]=parseInt(r,10))}})}return{formatName:t,formatOptions:o}})(t);if(this.formats[r]){let t=e;try{const s=Zr([n,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[n.interpolationkey]])||{},a=s.locale||s.lng||n.locale||n.lng||o;t=this.formats[r](e,a,{...i,...n,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class $i extends xi{constructor(e,t,o,n={}){super(),this.backend=e,this.store=t,this.services=o,this.languageUtils=o.languageUtils,this.options=n,this.logger=vi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],Zr([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(o,n.backend,n)])}queueLoad(e,t,o,n){const r={},i={},s={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const s=`${e}|${t}`;!o.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(r).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(r),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,o){const n=e.split("|"),r=n[0],i=n[1];t&&this.emit("failedLoading",r,i,t),!t&&o&&this.store.addResourceBundle(r,i,o,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&o&&(this.state[e]=0);const s={};this.queue.forEach(o=>{((e,t,o)=>{const{obj:n,k:r}=si(e,t,Object);n[r]=n[r]||[],n[r].push(o)})(o.loaded,[r],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(o,e),t&&o.errors.push(t),0!==o.pendingCount||o.done||(Object.keys(o.loaded).forEach(e=>{s[e]||(s[e]={});const t=o.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,o,n=0,r=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:o,tried:n,wait:r,callback:i});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,o,n+1,2*r,i)},r):i(s,a)},a=this.backend[o].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const o=a(e,t);o&&"function"==typeof o.then?o.then(e=>s(null,e)).catch(s):s(null,o)}catch(e){s(e)}}prepareLoading(e,t,o={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();ei(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ei(t)&&(t=[t]);const r=this.queueLoad(e,t,o,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,o){this.prepareLoading(e,t,{},o)}reload(e,t,o){this.prepareLoading(e,t,{reload:!0},o)}loadOne(e,t=""){const o=e.split("|"),n=o[0],r=o[1];this.read(n,r,"read",void 0,void 0,(o,i)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${n} failed`,o),!o&&i&&this.logger.log(`${t}loaded namespace ${r} for language ${n}`,i),this.loaded(e,o,i)})}saveMissing(e,t,o,n,r,i={},s=()=>{}){if(!Zr([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||Zr([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=o&&""!==o){if(Zr([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const a={...i,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;r=5===l.length?l(e,t,o,n,a):l(e,t,o,n),r&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}else l(e,t,o,n,s,a)}e&&e[0]&&this.store.addResource(e[0],t,o,n)}}else this.logger.warn(`did not save key "${o}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Di=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),ei(e[1])&&(t.defaultValue=e[1]),ei(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const o=e[3]||e[2];Object.keys(o).forEach(e=>{t[e]=o[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Bi=e=>(ei(e.ns)&&(e.ns=[e.ns]),ei(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ei(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),Zr([e,"access",e=>e.supportedLngs,"optionalAccess",e=>e.indexOf,"optionalCall",e=>e("cimode")])<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),zi=()=>{};class Ui extends xi{constructor(e={},t){var o;if(super(),this.options=Bi(e),this.services={},this.logger=vi,this.modules={external:[]},o=this,Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(e=>{"function"==typeof o[e]&&(o[e]=o[e].bind(o))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(ei(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const o=Di();var n;this.options={...o,...this.options,...Bi(e)},this.options.interpolation={...o.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(Zr([n=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||Zr([n,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||Zr([n,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&n.options.backend.backends.some(e=>Zr([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||Zr([e,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?vi.init(r(this.modules.logger),this.options):vi.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Ii;const t=new Oi(this.options);this.store=new Ei(this.options.resources,this.options);const n=this.services;n.logger=vi,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Ni(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Pi(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new $i(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Ai(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=zi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=ti(),s=()=>{const e=(e,o)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(o),t(e,o)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),i}loadResources(e,t=zi){let o=t;const n=ei(e)?e:this.language;if("function"==typeof e&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===Zr([n,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return o();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)t(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}Zr([this,"access",e=>e.options,"access",e=>e.preload,"optionalAccess",e=>e.forEach,"optionalCall",e=>e(e=>t(e))]),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),o(e)})}else o(null)}reloadResources(e,t,o){const n=ti();return"function"==typeof e&&(o=e,e=void 0),"function"==typeof t&&(o=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),o||(o=zi),this.services.backendConnector.reload(e,t,e=>{n.resolve(),o(e)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ci.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const o=ti();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,o.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const o=ei(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(o)?o:this.services.languageUtils.getBestMatchFromCodes(ei(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),Zr([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{r(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),o}getFixedT(e,t,o){const n=(e,t,...r)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},i.lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||o||n.keyPrefix);const s=this.options.keySeparator||".";let a;return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=ki(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ki(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return ei(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=o,n}t(...e){return Zr([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return Zr([this,"access",e=>e.translator,"optionalAccess",e=>e.exists,"call",t=>t(...e)])}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;const i=(e,t)=>{const o=this.services.backendConnector.state[`${e}|${t}`];return-1===o||0===o||2===o};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(o,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(o,e)||n&&!i(r,e)))}loadNamespaces(e,t){const o=ti();return this.options.ns?(ei(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{o.resolve(),t&&t(e)}),o):(t&&t(),Promise.resolve())}loadLanguages(e,t){const o=ti();ei(e)&&(e=[e]);const n=this.options.preload||[],r=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=n.concat(r),this.loadResources(e=>{o.resolve(),t&&t(e)}),o):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(Zr([this,"access",e=>e.languages,"optionalAccess",e=>e.length])>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=Zr([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Oi(Di());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const o=new Ui(e,t);return o.createInstance=Ui.createInstance,o}cloneInstance(e={},t=zi){const o=e.forkResourceStore;o&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},r=new Ui(n);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},o){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((o,n)=>(o[n]={...e[t][n]},o),e[t]),e),{});r.store=new Ei(e,n),r.services.resourceStore=r.store}if(e.interpolation){const t={...Di().interpolation,...this.options.interpolation,...e.interpolation},o={...n,interpolation:t};r.services.interpolator=new Pi(o)}return r.translator=new Ai(r.services,n),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(n,t),r.translator.options=n,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Vi=Ui.createInstance();Vi.createInstance,Vi.dir,Vi.init,Vi.loadResources,Vi.reloadResources,Vi.use,Vi.changeLanguage,Vi.getFixedT,Vi.t,Vi.exists,Vi.setDefaultNamespace,Vi.hasLoadedNamespace,Vi.loadNamespaces,Vi.loadLanguages;Vi.init({fallbackLng:"en",lng:"en",debug:!0,resources:{en:{translation:{categorize:{limitMaxChoicesPerCategory:"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",maxChoicesPerCategoryRestriction:"To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."},ebsr:{part:"Part {{index}}"},numberLine:{addElementLimit_one:"You can only add {{count}} element",addElementLimit_other:"You can only add {{count}} elements",clearAll:"Clear all"},imageClozeAssociation:{reachedLimit_one:"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",reachedLimit_other:"Full"},drawingResponse:{fillColor:"Fill color",outlineColor:"Outline color",noFill:"No fill",lightblue:"Light blue",lightyellow:"Light yellow",red:"Red",orange:"Orange",yellow:"Yellow",violet:"Violet",blue:"Blue",green:"Green",white:"White",black:"Black",onDoubleClick:"Double click to edit this text. Press Enter to submit."},charting:{addCategory:"Add category",actions:"Actions",add:"Add",delete:"Delete",newLabel:"New label",reachedLimit_other:"There can't be more than {{count}} categories.",keyLegend:{incorrectAnswer:"Student incorrect answer",correctAnswer:"Student correct answer",correctKeyAnswer:"Answer key correct"}},graphing:{point:"Point",circle:"Circle",line:"Line",parabola:"Parabola",absolute:"Absolute Value",exponential:"Exponential",polygon:"Polygon",ray:"Ray",segment:"Segment",sine:"Sine",vector:"Vector",label:"Label",redo:"Redo",reset:"Reset"},mathInline:{primaryCorrectWithAlternates:"Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct."},multipleChoice:{minSelections:"Select at least {{minSelections}}.",maxSelections_one:"Only {{maxSelections}} answer is allowed.",maxSelections_other:"Only {{maxSelections}} answers are allowed.",minmaxSelections_equal:"Select {{minSelections}}.",minmaxSelections_range:"Select between {{minSelections}} and {{maxSelections}}."},selectText:{correctAnswerSelected:"Correct",correctAnswerNotSelected:"Correct Answer Not Selected",incorrectSelection:"Incorrect Selection",key:"Key"}},common:{undo:"Undo",clearAll:"Clear all",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Show correct answer",hideCorrectAnswer:"Hide correct answer",commonCorrectAnswerWithAlternates:"Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",warning:"Warning",showNote:"Show Note",hideNote:"Hide Note",cancel:"Cancel"}},es:{translation:{categorize:{limitMaxChoicesPerCategory:"Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",maxChoicesPerCategoryRestriction:"Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"},ebsr:{part:"Parte {{index}}"},numberLine:{addElementLimit_one:"Solo puedes agregar {{count}} elemento",addElementLimit_other:"Solo puedes agregar {{count}} elementos",clearAll:"Borrar todo"},imageClozeAssociation:{reachedLimit_one:"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",reachedLimit_other:"Lleno"},drawingResponse:{fillColor:"Color de relleno",outlineColor:"Color del contorno",noFill:"Sin relleno",lightblue:"Azul claro",lightyellow:"Amarillo claro",red:"Rojo",orange:"Naranja",yellow:"Amarillo",violet:"Violeta",blue:"Azul",green:"Verde",white:"Blanco",black:"Negro",onDoubleClick:"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"},charting:{addCategory:"Añadir categoría",actions:"Acciones",add:"Añadir",delete:"Eliminar",newLabel:"Nueva etiqueta",reachedLimit_other:"No puede haber más de {{count}} categorías.",keyLegend:{incorrectAnswer:"Respuesta incorrecta del estudiante",correctAnswer:"Respuesta correcta del estudiante",correctKeyAnswer:"Clave de respuesta correcta"}},graphing:{point:"Punto",circle:"Circulo",line:"Línea",parabola:"Parábola",absolute:"Valor absoluto",exponential:"Exponencial",polygon:"Polígono",ray:"Semirrecta",segment:"Segmento ",sine:"Seno",vector:"Vector",label:"Etiqueta",redo:"Rehacer",reset:"Reiniciar"},mathInline:{primaryCorrectWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas."},multipleChoice:{minSelections:"Seleccione al menos {{minSelections}}.",maxSelections_one:"Sólo se permite {{maxSelections}} respuesta.",maxSelections_other:"Sólo se permiten {{maxSelections}} respuestas.",minmaxSelections_equal:"Seleccione {{minSelections}}.",minmaxSelections_range:"Seleccione entre {{minSelections}} y {{maxSelections}}."},selectText:{correctAnswerSelected:"Respuesta Correcta",correctAnswerNotSelected:"Respuesta Correcta No Seleccionada",incorrectSelection:"Selección Incorrecta",key:"Clave"}},common:{undo:"Deshacer",clearAll:"Borrar todo",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Mostrar respuesta correcta",hideCorrectAnswer:"Ocultar respuesta correcta",commonCorrectAnswerWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",warning:"Advertencia",showNote:"Mostrar Nota",hideNote:"Ocultar Nota",cancel:"Cancelar"}}}});var Hi={translator:{...Vi,t:(e,t)=>{const{lng:o}=t;switch(o){case"en_US":case"en-US":t.lng="en";break;case"es_ES":case"es-ES":case"es_MX":case"es-MX":t.lng="es"}return Vi.t(e,{lng:o,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};const{styled:qi}=n,Ki=o,Wi=t;const{translator:Yi}=Hi,Gi={"-webkit-touchCcallout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},Ji=qi("div")(()=>({width:"100%",cursor:"pointer"})),Qi=qi("div")(()=>({margin:"0 auto",textAlign:"center",display:"flex"})),Xi=qi("div")(()=>({width:"fit-content",minWidth:"140px",alignSelf:"center",verticalAlign:"middle",color:`var(--correct-answer-toggle-label-color, ${Mn()})`,fontWeight:"normal",...Gi})),Zi=qi("div")(()=>({position:"absolute",width:"25px","&.enter":{opacity:"0"},"&.enter-active":{opacity:"1",transition:"opacity 0.3s ease-in"},"&.exit":{opacity:"1"},"&.exit-active":{opacity:"0",transition:"opacity 0.3s ease-in"}})),es=qi("div")(()=>({width:"25px",marginRight:"5px",display:"flex",alignItems:"center"}));class ts extends Ki.Component{static __initStatic(){this.propTypes={onToggle:Wi.func,toggled:Wi.bool,show:Wi.bool,hideMessage:Wi.string,showMessage:Wi.string,className:Wi.string,language:Wi.string}}static __initStatic2(){this.defaultProps={showMessage:"Show correct answer",hideMessage:"Hide correct answer",show:!1,toggled:!1}}constructor(e){super(e),this.state={show:e.show},this.openIconRef=Ki.createRef(),this.closedIconRef=Ki.createRef(),ts.defaultProps={...ts.defaultProps,showMessage:Yi.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:Yi.t("common:hideCorrectAnswer",{lng:e.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(e){this.setState({show:e.show}),e.language!==function(e){let t,o=e[0],n=1;for(;n<e.length;){const r=e[n],i=e[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==o)return;"access"===r||"optionalAccess"===r?(t=o,o=i(o)):"call"!==r&&"optionalCall"!==r||(o=i((...e)=>o.call(t,...e)),t=void 0)}return o}([this,"access",e=>e.props,"optionalAccess",e=>e.language])&&(ts.defaultProps={...ts.defaultProps,showMessage:Yi.t("common:showCorrectAnswer",{lng:e.language}),hideMessage:Yi.t("common:hideCorrectAnswer",{lng:e.language})})}render(){const{className:e,toggled:t,hideMessage:o,showMessage:n}=this.props;return Ki.createElement(Ji,{className:e},Ki.createElement(Qr,{show:this.state.show},Ki.createElement(Qi,{onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this)},Ki.createElement(es,null,Ki.createElement(En,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},Ki.createElement(Zi,{ref:this.openIconRef},Ki.createElement(yo,{open:t,key:"correct-open"}))),Ki.createElement(En,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:"enter",enterActive:"enter-active",exit:"exit",exitActive:"exit-active"}},Ki.createElement(Zi,{ref:this.closedIconRef},Ki.createElement(yo,{open:t,key:"correct-closed"})))),Ki.createElement(Vr,{false:!0},Ki.createElement(Xi,{"aria-hidden":!this.state.show},t?o:n)))))}}ts.__initStatic(),ts.__initStatic2();const os=o,{styled:ns}=n,{Box:rs}=r,is=t,ss=ns(rs)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),as=ns("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${$n()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${In()})`}}),ls=ns("div")({position:"relative","&.feedback-tick-enter":{opacity:"0",left:"-50px"},"&.feedback-tick-enter-active":{opacity:"1",left:"0px",transition:"left 500ms ease-in 200ms, opacity 500ms linear 200ms"},"&.feedback-tick-exit":{opacity:"1",left:"0px"},"&.feedback-tick-exit-active":{opacity:"0",left:"-50px",transition:"left 300ms ease-in, opacity 300ms"}});class cs extends os.Component{static __initStatic(){this.propTypes={correctness:is.string}}constructor(e){super(e),cs.prototype.__init.call(this),cs.prototype.__init2.call(this),this.nodeRef=os.createRef()}__init(){this.getIncorrectIcon=()=>os.createElement(as,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},os.createElement("g",null,os.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",className:"incorrect-fill",width:"16.6",height:"3.7"}),os.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",className:"incorrect-fill",width:"3.7",height:"16.6"})))}__init2(){this.getCorrectIcon=()=>os.createElement(as,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},os.createElement("polygon",{className:"correct-fill",points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"}))}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return os.createElement(ss,null,os.createElement(Nn,null,e&&os.createElement(En,{nodeRef:this.nodeRef,classNames:{enter:"feedback-tick-enter",enterActive:"feedback-tick-enter-active",exit:"feedback-tick-exit",exitActive:"feedback-tick-exit-active"},timeout:{enter:700,exit:300}},os.createElement(ls,{ref:this.nodeRef},t))))}}cs.__initStatic();const{FormControlLabel:ps}=r,{Box:us}=r,{Checkbox:ds}=r,{Radio:hs}=r,gs=o,fs=t,{styled:ms}=n,ys=a,bs="multiple-choice-component",vs=ms(us)({display:"flex",alignItems:"center",backgroundColor:Dn()}),xs=ms(us)({display:"flex",alignItems:"center",backgroundColor:Dn(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Mn(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),Es=ms("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),Cs=ms("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Ss=ms(ps)({"& .MuiFormControlLabel-label":{color:`${Mn()} !important`,backgroundColor:Dn(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),ks=(e,t)=>({[`&.${bs}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),ws=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{...ks("color",Mn()),...e?{}:{"&:hover":{color:`${Tn("primary-light",Ln.PRIMARY_LIGHT)} !important`}},..."correct"===e?ks("correct-color",Mn()):{},..."incorrect"===e?ks("incorrect-color",$n()):{}},[t("checked")]:{..."correct"===e?ks("correct-selected-color",In()):{},..."incorrect"===e?ks("incorrect-checked",$n()):{},...e?{}:ks("selected-color",Tn("primary",Ln.PRIMARY))},[t("disabled")]:{...ks("disabled-color",Mn()),..."correct"===e?ks("correct-disabled-color",Fn()):{},..."incorrect"===e?ks("incorrect-disabled-color",Fn()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${Tn("focus-unchecked-border",Ln.FOCUS_UNCHECKED_BORDER)}`,backgroundColor:Tn("focus-unchecked",Ln.FOCUS_UNCHECKED)},focusVisibleChecked:{outline:`2px solid ${Tn("focus-checked-border",Ln.FOCUS_CHECKED_BORDER)}`,backgroundColor:Tn("focus-checked",Ln.FOCUS_CHECKED)}}},_s=ms(ds,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=ws(e),o=t=>e?`${e}-${t}`:t;return{[`&.${bs}`]:{...t[o("root")],"&.Mui-checked":t[o("checked")],"&.Mui-disabled":e?{}:t[o("disabled")]},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),As=e=>{const{correctness:t,checked:o,onChange:n,disabled:r,value:i,id:s,onKeyDown:a,inputRef:l}=e,c={checked:o,onChange:n,disabled:r,value:i};return gs.createElement(_s,{id:s,slotProps:{input:{ref:l}},onKeyDown:a,disableRipple:!0,...c,correctness:t,className:bs})},Os=ms(hs,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=ws(e),o=t=>e?`${e}-${t}`:t;return{[`&.${bs}`]:{...t[o("root")],"&.Mui-checked":t[o("checked")],"&.Mui-disabled":e?{}:t[o("disabled")]},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),Rs=e=>{const{correctness:t,checked:o,onChange:n,disabled:r,value:i,id:s,tagName:a,inputRef:l}=e,c={checked:o,onChange:n,disabled:r,value:i};return gs.createElement(Os,{id:s,slotProps:{input:{ref:l}},disableRipple:!0,...c,correctness:t,className:bs,name:a})};class js extends gs.Component{static __initStatic(){this.propTypes={choiceMode:fs.oneOf(["radio","checkbox"]),displayKey:fs.string,checked:fs.bool.isRequired,correctness:fs.string,disabled:fs.bool.isRequired,feedback:fs.string,label:fs.string.isRequired,rationale:fs.string,onChange:fs.func.isRequired,value:fs.string.isRequired,className:fs.string,tagName:fs.string,hideTick:fs.bool,isEvaluateMode:fs.bool,choicesLayout:fs.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:fs.bool}}static __initStatic2(){this.defaultProps={rationale:null,checked:!1,isEvaluateMode:!1}}constructor(e){super(e),js.prototype.__init.call(this),this.onToggleChoice=this.onToggleChoice.bind(this),this.choiceId=this.generateChoiceId(),this.descId=`${this.choiceId}-desc`}onToggleChoice(e){this.props.onChange(e)}generateChoiceId(){return"choice-"+(1e4*Math.random()).toFixed()}__init(){this.handleKeyDown=e=>{const{choiceMode:t}=this.props;if("checkbox"!==t)return;const o="ArrowDown"===e.key,n="ArrowUp"===e.key;if(!o&&!n)return;e.preventDefault();const r=document.getElementById(this.choiceId);if(!r)return;const i=r.closest("fieldset");if(!i)return;const s=Array.from(i.querySelectorAll('input[type="checkbox"]')),a=s.findIndex(e=>e===r);if(-1===a)return;const l=s[o?a+1:a-1];l&&l.focus()}}render(){const{choiceMode:e,disabled:t,displayKey:o,feedback:n,label:r,correctness:i,className:s,rationale:a,hideTick:l,isEvaluateMode:c,choicesLayout:p,value:u,checked:d,tagName:h,isSelectionButtonBelow:g}=this.props,f="checkbox"===e?As:Rs,m="checkbox"===e?"checkbox":"radio-button",y={..."horizontal"===p&&{[`& .${bs}`]:{padding:"8px",margin:"4px 0 4px 4px"}},...g&&"grid"!==p&&{"& > label":{alignItems:"flex-start"}},...g&&"grid"===p&&{justifyContent:"center","& > label":{alignItems:"center"}}},b=gs.createElement(gs.Fragment,null,o&&!g?gs.createElement(vs,{component:"span"},o,"."," ",gs.createElement(Br,{className:"prompt-label",prompt:r,tagName:"span"})):gs.createElement(Br,{className:"prompt-label",prompt:r,tagName:"span"})),v=gs.createElement(Cs,{id:this.descId},"checkbox"===e?"Checkbox to select the answer below":"Radio button to select the answer below"),x={disabled:t,checked:d,correctness:i,tagName:h,value:u,id:this.choiceId,onChange:this.onToggleChoice,onKeyDown:this.handleKeyDown,"aria-describedby":this.descId},E="string"==typeof r&&(r.includes("<math")||r.includes("\\(")||r.includes("\\[")||r.includes("<img")||r.includes("data-latex")||r.includes("data-raw")||r.includes("<mjx-container")),C=g?gs.createElement(Es,null,E&&v,gs.createElement(f,{...x,style:{padding:0}}),o?`${o}.`:""):gs.createElement(gs.Fragment,null,E&&v,gs.createElement(f,{...x,slotProps:{input:{ref:this.props.autoFocusRef}}}));return gs.createElement("div",{className:ys(s,"corespring-"+m,"choice-input")},gs.createElement(vs,null,!l&&c&&gs.createElement(cs,{correctness:i}),gs.createElement(xs,{className:"checkbox-holder",sx:y},gs.createElement(Ss,{label:b,value:u,htmlFor:this.choiceId,labelPlacement:g?"top":void 0,control:C}))),a&&gs.createElement(Br,{className:"rationale",defaultClassName:"rationale",prompt:a}),gs.createElement(Kn,{feedback:n,correctness:i}))}}js.__initStatic(),js.__initStatic2();const Ns=o,Ls=t,{styled:Ts}=n,{Box:Ps}=r,Ms=Ts(Ps,{shouldForwardProp:e=>"noBorder"!==e&&"horizontalLayout"!==e})(({theme:e,noBorder:t,horizontalLayout:o})=>({paddingTop:e.spacing(2.5),paddingBottom:`calc(${e.spacing(1)} + 2px)`,paddingLeft:`calc(${e.spacing(1)} + 2px)`,paddingRight:`calc(${e.spacing(1)} + 2px)`,borderBottom:t?"none":`1px solid ${e.palette.grey[300]}`,...o&&{paddingRight:e.spacing(2.5),"& label":{marginRight:e.spacing(1)}}}));class Fs extends Ns.Component{constructor(...e){super(...e),Fs.prototype.__init.call(this),Fs.prototype.__init2.call(this),Fs.prototype.__init3.call(this),Fs.prototype.__init4.call(this)}static __initStatic(){this.propTypes={}}__init(){this.state={isHovered:!1}}__init2(){this.handleMouseEnter=()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}}__init3(){this.handleMouseLeave=()=>{this.setState({isHovered:!1})}}__init4(){this.onChange=e=>{const{disabled:t,onChoiceChanged:o}=this.props;t||o(e)}}render(){const{choice:e,index:t,choicesLength:o,showCorrect:n,isEvaluateMode:r,choiceMode:i,disabled:s,checked:a,correctness:l,displayKey:c,choicesLayout:p,gridColumns:u,isSelectionButtonBelow:d,selectedAnswerBackgroundColor:h,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,hoverAnswerBackgroundColor:m,hoverAnswerStrokeColor:y,hoverAnswerStrokeWidth:b,autoFocusRef:v,tagName:x}=this.props,{isHovered:E}=this.state,C="choice"+(t===o-1?" last":""),S=!r||n?"":e.feedback,k={...e,checked:a,choiceMode:i,disabled:s,feedback:S,correctness:l,displayKey:c,index:t,choicesLayout:p,gridColumns:u,onChange:this.onChange,isEvaluateMode:r,isSelectionButtonBelow:d,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,tagName:x},w=g&&"initial"!==g,_=y&&"initial"!==y;let A="transparent",O="2px",R="initial";(w||_)&&(a&&w?(A=g,O=f):E&&!s&&_&&(A=y,O=b)),a&&h&&"initial"!==h?R=h:E&&!s&&m&&"initial"!==m&&(R=m);const j=w||_,N=j?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(O)} solid ${A}`,borderRadius:"8px"}:{},L=t===o-1||"vertical"!==p||j,T="horizontal"===p,P="initial"!==R?R:"initial";return Ns.createElement("div",{className:C,key:t,style:{backgroundColor:P,...N},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},Ns.createElement(Ms,{component:"div",noBorder:L,horizontalLayout:T},Ns.createElement(js,{...k,autoFocusRef:v})))}}Fs.__initStatic(),Fs.propTypes={choiceMode:Ls.oneOf(["radio","checkbox"]),choice:Ls.object,disabled:Ls.bool.isRequired,onChoiceChanged:Ls.func,index:Ls.number,choicesLength:Ls.number,showCorrect:Ls.bool,isEvaluateMode:Ls.bool,checked:Ls.bool,correctness:Ls.string,displayKey:Ls.string,choicesLayout:Ls.oneOf(["vertical","grid","horizontal"]),gridColumns:Ls.string,selectedAnswerBackgroundColor:Ls.string,selectedAnswerStrokeColor:Ls.string,selectedAnswerStrokeWidth:Ls.string,hoverAnswerBackgroundColor:Ls.string,hoverAnswerStrokeColor:Ls.string,hoverAnswerStrokeWidth:Ls.string,tagName:Ls.string,isSelectionButtonBelow:Ls.bool,autoFocusRef:Ls.object};const Is=o,$s=t,Ds=a,{styled:Bs}=n,{Box:zs}=r;const{translator:Us}=Hi,Vs=Bs(zs)({color:Mn(),backgroundColor:Dn(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),Hs=Bs("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),qs=Bs(zs)(({theme:e})=>({marginBottom:e.spacing(2)})),Ks=Bs(zs)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),Ws=Bs(zs)({display:"grid"}),Ys=Bs("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px","&:focus":{outline:"none"}}),Gs=Bs("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Js=Bs("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class Qs extends Is.Component{static __initStatic(){this.propTypes={className:$s.string,mode:$s.oneOf(["gather","view","evaluate"]),choiceMode:$s.oneOf(["radio","checkbox"]),keyMode:$s.oneOf(["numbers","letters","none"]),choices:$s.array,partLabel:$s.string,prompt:$s.string,teacherInstructions:$s.string,session:$s.object,disabled:$s.bool,onChoiceChanged:$s.func,responseCorrect:$s.bool,correctResponse:$s.array,choicesLayout:$s.oneOf(["vertical","grid","horizontal"]),gridColumns:$s.string,alwaysShowCorrect:$s.bool,animationsDisabled:$s.bool,language:$s.string,selectedAnswerBackgroundColor:$s.string,selectedAnswerStrokeColor:$s.string,selectedAnswerStrokeWidth:$s.string,hoverAnswerBackgroundColor:$s.string,hoverAnswerStrokeColor:$s.string,hoverAnswerStrokeWidth:$s.string,onShowCorrectToggle:$s.func,isSelectionButtonBelow:$s.bool,minSelections:$s.number,maxSelections:$s.number,autoplayAudioEnabled:$s.bool,customAudioButton:{playImage:$s.string,pauseImage:$s.string},options:$s.object}}constructor(e){super(e),Qs.prototype.__init.call(this),Qs.prototype.__init2.call(this),Qs.prototype.__init3.call(this),Qs.prototype.__init4.call(this),this.state={showCorrect:this.props.options&&this.props.alwaysShowCorrect||!1,maxSelectionsErrorState:!1},this.onToggle=this.onToggle.bind(this),this.firstInputRef=Is.createRef()}isSelected(e){const t=this.props.session&&this.props.session.value;return t&&t.indexOf&&t.indexOf(e)>=0}__init(){this.handleChange=e=>{const{value:t,checked:o}=e.target,{maxSelections:n,onChoiceChanged:r,session:i}=this.props;i.value&&i.value.length>=n&&(this.setState({maxSelectionsErrorState:o}),o)||r({value:t,selected:o,selector:"Mouse"})}}__init2(){this.onToggle=()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}}UNSAFE_componentWillReceiveProps(e){e.correctResponse||!1===this.state.showCorrect||this.setState({showCorrect:!1},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()}),e.options&&e.alwaysShowCorrect&&!0!==this.state.showCorrect&&this.setState({showCorrect:!0},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}indexToSymbol(e){return"numbers"===this.props.keyMode?`${e+1}`:"letters"===this.props.keyMode?String.fromCharCode(97+e).toUpperCase():""}__init3(){this.getCorrectness=(e={})=>{const t=e.correct,o=this.isSelected(e.value);return this.state.showCorrect?t?"correct":void 0:t?o?"correct":"incorrect":o?"incorrect":void 0}}getChecked(e){if(this.props.options&&this.props.alwaysShowCorrect)return e.correct||!1;return this.state.showCorrect&&"evaluate"===this.props.mode?e.correct||!1:this.isSelected(e.value)}renderHeading(){const{mode:e,choiceMode:t}=this.props;return"gather"!==e?null:"radio"===t?Is.createElement(Gs,null,"Multiple Choice Question"):Is.createElement(Gs,null,"Multiple Select Question")}__init4(){this.handleGroupFocus=e=>{const t=e.currentTarget,o=document.activeElement;t.contains(o)&&o!==t||(!e.relatedTarget||t.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_PRECEDING)&&function(e){let t,o=e[0],n=1;for(;n<e.length;){const r=e[n],i=e[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==o)return;"access"===r||"optionalAccess"===r?(t=o,o=i(o)):"call"!==r&&"optionalCall"!==r||(o=i((...e)=>o.call(t,...e)),t=void 0)}return o}([this,"access",e=>e.firstInputRef,"optionalAccess",e=>e.current])&&this.firstInputRef.current.focus()}}render(){const{mode:e,disabled:t,className:o,choices:n=[],choiceMode:r,gridColumns:i,partLabel:s,prompt:a,responseCorrect:l,teacherInstructions:c,alwaysShowCorrect:p,animationsDisabled:u,language:d,isSelectionButtonBelow:h,minSelections:g,maxSelections:f,autoplayAudioEnabled:m,session:y,customAudioButton:b,options:v}=this.props,{showCorrect:x,maxSelectionsErrorState:E}=this.state,C="evaluate"===e,S=C&&!l,k=i>1?{gridTemplateColumns:`repeat(${i}, 1fr)`}:void 0,w=y.value&&y.value.length||0,_=Is.createElement(Br,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:c}),A="grid"===this.props.choicesLayout?Ws:"horizontal"===this.props.choicesLayout?Ks:zs;return Is.createElement(Vs,{id:"main-container",className:Ds(o,"multiple-choice")},s&&Is.createElement(Hs,null,s),this.renderHeading(),c&&Is.createElement(qs,null,u?_:Is.createElement(cr,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},_)),Is.createElement(Ys,{tabIndex:0,onFocus:this.handleGroupFocus,role:"radio"===r?"radiogroup":"group"},Is.createElement(Br,{className:"prompt",defaultClassName:"prompt",prompt:a,tagName:"legend",autoplayAudioEnabled:m,customAudioButton:b}),!(v&&p)&&Is.createElement(ts,{show:S,toggled:x,onToggle:this.onToggle.bind(this),language:d}),Is.createElement(A,{style:k},n.map((e,o)=>Is.createElement(Fs,{autoFocusRef:0===o?this.firstInputRef:null,choicesLayout:this.props.choicesLayout,selectedAnswerBackgroundColor:this.props.selectedAnswerBackgroundColor,selectedAnswerStrokeColor:this.props.selectedAnswerStrokeColor,selectedAnswerStrokeWidth:this.props.selectedAnswerStrokeWidth,hoverAnswerBackgroundColor:this.props.hoverAnswerBackgroundColor,hoverAnswerStrokeColor:this.props.hoverAnswerStrokeColor,hoverAnswerStrokeWidth:this.props.hoverAnswerStrokeWidth,gridColumns:i,key:`choice-${o}`,choice:e,index:o,choicesLength:n.length,showCorrect:x,isEvaluateMode:C,choiceMode:r,disabled:t,tagName:s?`group-${s}`:"group",onChoiceChanged:this.handleChange,hideTick:e.hideTick,checked:this.getChecked(e),correctness:C?this.getCorrectness(e):void 0,displayKey:this.indexToSymbol(o),isSelectionButtonBelow:h})))),"checkbox"===r&&w<g&&Is.createElement(Js,null,g&&f?g===f?Us.t("translation:multipleChoice:minmaxSelections_equal",{lng:d,minSelections:g}):Us.t("translation:multipleChoice:minmaxSelections_range",{lng:d,minSelections:g,maxSelections:f}):g?Us.t("translation:multipleChoice:minSelections",{lng:d,minSelections:g}):""),"checkbox"===r&&E&&Is.createElement(Js,null,Us.t("translation:multipleChoice:maxSelections_"+(1===f?"one":"other"),{lng:d,maxSelections:f})))}}Qs.__initStatic(),Qs.defaultProps={session:{value:[]}};const Xs=o,Zs=t;class ea extends Xs.Component{static __initStatic(){this.propTypes={model:Zs.object,session:Zs.object,options:Zs.object,onChoiceChanged:Zs.func,onShowCorrectToggle:Zs.func,extraCSSRules:Zs.shape({names:Zs.arrayOf(Zs.string),rules:Zs.string})}}static __initStatic2(){this.defaultProps={model:{},session:{}}}render(){const{model:e,onChoiceChanged:t,session:o,onShowCorrectToggle:n,options:r}=this.props,{extraCSSRules:i,fontSizeFactor:s}=e;return Xs.createElement(wr,{extraCSSRules:i,fontSizeFactor:s,classes:{}},Xs.createElement(Qs,{...e,options:r,session:o,onChoiceChanged:t,onShowCorrectToggle:n}))}}ea.__initStatic(),ea.__initStatic2();const ta=o,oa=i,{renderMath:na}=l,ra=oa("pie-element:multiple-choice:print"),ia=(e,t)=>{const o="instructor"===t.role;e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=o&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.showTeacherInstructions=o,e.alwaysShowCorrect=o,e.mode=o?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e.lockChoiceOrder=!0,e.choicesLayout=e.choicesLayout||"vertical";const n=Bt(e.choices,5);return e.choices=n.map(t=>(t.rationale=o&&!1!==e.rationaleEnabled?t.rationale:void 0,t.hideTick=o,t.feedback=void 0,t)),e.keyMode=e.choicePrefix||"letters",e};class sa extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Ht(()=>{if(this._model&&this._session){const e=ia(this._model,this._options),t=this._options&&ta.createElement(ea,{model:e,session:{},options:this._options});this._root||(this._root=g(this)),this._root.render(t),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ra("render complete - render math"),na(this)})})}else ra("skip")},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{sa as default};
1
+ import{_dll_react as e,_dll_react_dom as t,_dll_mui__material_styles as o,_dll_mui__material as n,_dll_prop_types as r,_dll_pie_lib__render_ui as s,_dll_classnames as i,_dll_pie_lib__correct_answer_toggle as a,_dll_debug as c,_dll_react_dom_client as l}from"../../../@pie-lib/shared-module@^5.0.0/module/index.js";import{_dll_pie_lib__math_rendering as u}from"../../../@pie-lib/math-rendering-module@^5.0.0/module/index.js";var p="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,d=p||h||Function("return this")(),g=d.Symbol,f=Object.prototype,m=f.hasOwnProperty,b=f.toString,y=g?g.toStringTag:void 0;var v=Object.prototype.toString;var x=g?g.toStringTag:void 0;function S(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?function(e){var t=m.call(e,y),o=e[y];try{e[y]=void 0;var n=!0}catch(e){}var r=b.call(e);return n&&(t?e[y]=o:delete e[y]),r}(e):function(e){return v.call(e)}(e)}function C(e){return null!=e&&"object"==typeof e}var k=Array.isArray,w=/\s/;var E=/^\s+/;function O(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&w.test(e.charAt(t)););return t}(e)+1).replace(E,""):e}function A(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var _=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,L=/^0o[0-7]+$/i,N=parseInt;function R(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==S(e)}(e))return NaN;if(A(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=A(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=O(e);var o=j.test(e);return o||L.test(e)?N(e.slice(2),o?2:8):_.test(e)?NaN:+e}function P(e){if(!A(e))return!1;var t=S(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var $,T=d["__core-js_shared__"],I=($=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"";var M=Function.prototype.toString;function F(e){if(null!=e){try{return M.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var B=/^\[object .+?Constructor\]$/,D=Function.prototype,V=Object.prototype,z=D.toString,U=V.hasOwnProperty,K=RegExp("^"+z.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function H(e){return!(!A(e)||(t=e,I&&I in t))&&(P(e)?K:B).test(F(e));var t}function W(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return H(o)?o:void 0}var q=W(d,"WeakMap"),J=Object.create,Y=function(){function e(){}return function(t){if(!A(t))return{};if(J)return J(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();var G=function(){try{var e=W(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Q=/^(?:0|[1-9]\d*)$/;function X(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&Q.test(e))&&e>-1&&e%1==0&&e<t}function Z(e,t,o){"__proto__"==t&&G?G(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function ee(e,t){return e===t||e!=e&&t!=t}var te=Object.prototype.hasOwnProperty;function oe(e,t,o){var n=e[t];te.call(e,t)&&ee(n,o)&&(void 0!==o||t in e)||Z(e,t,o)}function ne(e,t,o,n){var r=!o;o||(o={});for(var s=-1,i=t.length;++s<i;){var a=t[s],c=n?n(o[a],e[a],a,o,e):void 0;void 0===c&&(c=e[a]),r?Z(o,a,c):oe(o,a,c)}return o}function re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function se(e){return null!=e&&re(e.length)&&!P(e)}var ie=Object.prototype;function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ie)}function ce(e){return C(e)&&"[object Arguments]"==S(e)}var le=Object.prototype,ue=le.hasOwnProperty,pe=le.propertyIsEnumerable,he=ce(function(){return arguments}())?ce:function(e){return C(e)&&ue.call(e,"callee")&&!pe.call(e,"callee")};var de="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=de&&"object"==typeof module&&module&&!module.nodeType&&module,fe=ge&&ge.exports===de?d.Buffer:void 0,me=(fe?fe.isBuffer:void 0)||function(){return!1},be={};function ye(e){return function(t){return e(t)}}be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be["[object Arguments]"]=be["[object Array]"]=be["[object ArrayBuffer]"]=be["[object Boolean]"]=be["[object DataView]"]=be["[object Date]"]=be["[object Error]"]=be["[object Function]"]=be["[object Map]"]=be["[object Number]"]=be["[object Object]"]=be["[object RegExp]"]=be["[object Set]"]=be["[object String]"]=be["[object WeakMap]"]=!1;var ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=ve&&"object"==typeof module&&module&&!module.nodeType&&module,Se=xe&&xe.exports===ve&&p.process,Ce=function(){try{var e=xe&&xe.require&&xe.require("util").types;return e||Se&&Se.binding&&Se.binding("util")}catch(e){}}(),ke=Ce&&Ce.isTypedArray,we=ke?ye(ke):function(e){return C(e)&&re(e.length)&&!!be[S(e)]},Ee=Object.prototype.hasOwnProperty;function Oe(e,t){var o=k(e),n=!o&&he(e),r=!o&&!n&&me(e),s=!o&&!n&&!r&&we(e),i=o||n||r||s,a=i?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],c=a.length;for(var l in e)!t&&!Ee.call(e,l)||i&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||X(l,c))||a.push(l);return a}function Ae(e,t){return function(o){return e(t(o))}}var _e=Ae(Object.keys,Object),je=Object.prototype.hasOwnProperty;function Le(e){return se(e)?Oe(e):function(e){if(!ae(e))return _e(e);var t=[];for(var o in Object(e))je.call(e,o)&&"constructor"!=o&&t.push(o);return t}(e)}var Ne=Object.prototype.hasOwnProperty;function Re(e){if(!A(e))return function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}(e);var t=ae(e),o=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&o.push(n);return o}function Pe(e){return se(e)?Oe(e,!0):Re(e)}var $e=W(Object,"create");var Te=Object.prototype.hasOwnProperty;var Ie=Object.prototype.hasOwnProperty;function Me(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Fe(e,t){for(var o=e.length;o--;)if(ee(e[o][0],t))return o;return-1}Me.prototype.clear=function(){this.__data__=$e?$e(null):{},this.size=0},Me.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Me.prototype.get=function(e){var t=this.__data__;if($e){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return Te.call(t,e)?t[e]:void 0},Me.prototype.has=function(e){var t=this.__data__;return $e?void 0!==t[e]:Ie.call(t,e)},Me.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=$e&&void 0===t?"__lodash_hash_undefined__":t,this};var Be=Array.prototype.splice;function De(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}De.prototype.clear=function(){this.__data__=[],this.size=0},De.prototype.delete=function(e){var t=this.__data__,o=Fe(t,e);return!(o<0)&&(o==t.length-1?t.pop():Be.call(t,o,1),--this.size,!0)},De.prototype.get=function(e){var t=this.__data__,o=Fe(t,e);return o<0?void 0:t[o][1]},De.prototype.has=function(e){return Fe(this.__data__,e)>-1},De.prototype.set=function(e,t){var o=this.__data__,n=Fe(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};var Ve=W(d,"Map");function ze(e,t){var o,n,r=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?r["string"==typeof t?"string":"hash"]:r.map}function Ue(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Ke(e,t){for(var o=-1,n=t.length,r=e.length;++o<n;)e[r+o]=t[o];return e}Ue.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(Ve||De),string:new Me}},Ue.prototype.delete=function(e){var t=ze(this,e).delete(e);return this.size-=t?1:0,t},Ue.prototype.get=function(e){return ze(this,e).get(e)},Ue.prototype.has=function(e){return ze(this,e).has(e)},Ue.prototype.set=function(e,t){var o=ze(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this};var He=Ae(Object.getPrototypeOf,Object);function We(e){var t=this.__data__=new De(e);this.size=t.size}We.prototype.clear=function(){this.__data__=new De,this.size=0},We.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},We.prototype.get=function(e){return this.__data__.get(e)},We.prototype.has=function(e){return this.__data__.has(e)},We.prototype.set=function(e,t){var o=this.__data__;if(o instanceof De){var n=o.__data__;if(!Ve||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new Ue(n)}return o.set(e,t),this.size=o.size,this};var qe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Je=qe&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=Je&&Je.exports===qe?d.Buffer:void 0,Ge=Ye?Ye.allocUnsafe:void 0;function Qe(){return[]}var Xe=Object.prototype.propertyIsEnumerable,Ze=Object.getOwnPropertySymbols,et=Ze?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var o=-1,n=null==e?0:e.length,r=0,s=[];++o<n;){var i=e[o];t(i,o,e)&&(s[r++]=i)}return s}(Ze(e),function(t){return Xe.call(e,t)}))}:Qe;var tt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ke(t,et(e)),e=He(e);return t}:Qe;function ot(e,t,o){var n=t(e);return k(e)?n:Ke(n,o(e))}function nt(e){return ot(e,Le,et)}function rt(e){return ot(e,Pe,tt)}var st=W(d,"DataView"),it=W(d,"Promise"),at=W(d,"Set"),ct="[object Map]",lt="[object Promise]",ut="[object Set]",pt="[object WeakMap]",ht="[object DataView]",dt=F(st),gt=F(Ve),ft=F(it),mt=F(at),bt=F(q),yt=S;(st&&yt(new st(new ArrayBuffer(1)))!=ht||Ve&&yt(new Ve)!=ct||it&&yt(it.resolve())!=lt||at&&yt(new at)!=ut||q&&yt(new q)!=pt)&&(yt=function(e){var t=S(e),o="[object Object]"==t?e.constructor:void 0,n=o?F(o):"";if(n)switch(n){case dt:return ht;case gt:return ct;case ft:return lt;case mt:return ut;case bt:return pt}return t});var vt=yt,xt=Object.prototype.hasOwnProperty;var St=d.Uint8Array;function Ct(e){var t=new e.constructor(e.byteLength);return new St(t).set(new St(e)),t}var kt=/\w*$/;var wt=g?g.prototype:void 0,Et=wt?wt.valueOf:void 0;function Ot(e,t,o){var n,r,s,i=e.constructor;switch(t){case"[object ArrayBuffer]":return Ct(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var o=t?Ct(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}(e,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var o=t?Ct(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}(e,o);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return(s=new(r=e).constructor(r.source,kt.exec(r))).lastIndex=r.lastIndex,s;case"[object Symbol]":return n=e,Et?Object(Et.call(n)):{}}}var At=Ce&&Ce.isMap,_t=At?ye(At):function(e){return C(e)&&"[object Map]"==vt(e)};var jt=Ce&&Ce.isSet,Lt=jt?ye(jt):function(e){return C(e)&&"[object Set]"==vt(e)},Nt="[object Arguments]",Rt="[object Function]",Pt="[object Object]",$t={};function Tt(e,t,o,n,r,s){var i,a=1&t,c=2&t,l=4&t;if(o&&(i=r?o(e,n,r,s):o(e)),void 0!==i)return i;if(!A(e))return e;var u=k(e);if(u){if(i=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&xt.call(e,"index")&&(o.index=e.index,o.input=e.input),o}(e),!a)return function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o<n;)t[o]=e[o];return t}(e,i)}else{var p=vt(e),h=p==Rt||"[object GeneratorFunction]"==p;if(me(e))return function(e,t){if(t)return e.slice();var o=e.length,n=Ge?Ge(o):new e.constructor(o);return e.copy(n),n}(e,a);if(p==Pt||p==Nt||h&&!r){if(i=c||h?{}:function(e){return"function"!=typeof e.constructor||ae(e)?{}:Y(He(e))}(e),!a)return c?function(e,t){return ne(e,tt(e),t)}(e,function(e,t){return e&&ne(t,Pe(t),e)}(i,e)):function(e,t){return ne(e,et(e),t)}(e,function(e,t){return e&&ne(t,Le(t),e)}(i,e))}else{if(!$t[p])return r?e:{};i=Ot(e,p,a)}}s||(s=new We);var d=s.get(e);if(d)return d;s.set(e,i),Lt(e)?e.forEach(function(n){i.add(Tt(n,t,o,n,e,s))}):_t(e)&&e.forEach(function(n,r){i.set(r,Tt(n,t,o,r,e,s))});var g=u?void 0:(l?c?rt:nt:c?Pe:Le)(e);return function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!1!==t(e[o],o,e););}(g||e,function(n,r){g&&(n=e[r=n]),oe(i,r,Tt(n,t,o,r,e,s))}),i}$t[Nt]=$t["[object Array]"]=$t["[object ArrayBuffer]"]=$t["[object DataView]"]=$t["[object Boolean]"]=$t["[object Date]"]=$t["[object Float32Array]"]=$t["[object Float64Array]"]=$t["[object Int8Array]"]=$t["[object Int16Array]"]=$t["[object Int32Array]"]=$t["[object Map]"]=$t["[object Number]"]=$t[Pt]=$t["[object RegExp]"]=$t["[object Set]"]=$t["[object String]"]=$t["[object Symbol]"]=$t["[object Uint8Array]"]=$t["[object Uint8ClampedArray]"]=$t["[object Uint16Array]"]=$t["[object Uint32Array]"]=!0,$t["[object Error]"]=$t[Rt]=$t["[object WeakMap]"]=!1;var It=function(){return d.Date.now()},Mt=Math.max,Ft=Math.min;function Bt(e,t,o){var n,r,s,i,a,c,l=0,u=!1,p=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var o=n,s=r;return n=r=void 0,l=t,i=e.apply(s,o)}function g(e){var o=e-c;return void 0===c||o>=t||o<0||p&&e-l>=s}function f(){var e=It();if(g(e))return m(e);a=setTimeout(f,function(e){var o=t-(e-c);return p?Ft(o,s-(e-l)):o}(e))}function m(e){return a=void 0,h&&n?d(e):(n=r=void 0,i)}function b(){var e=It(),o=g(e);if(n=arguments,r=this,c=e,o){if(void 0===a)return function(e){return l=e,a=setTimeout(f,t),u?d(e):i}(c);if(p)return clearTimeout(a),a=setTimeout(f,t),d(c)}return void 0===a&&(a=setTimeout(f,t)),i}return t=R(t)||0,A(o)&&(u=!!o.leading,s=(p="maxWait"in o)?Mt(R(o.maxWait)||0,t):s,h="trailing"in o?!!o.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=r=a=void 0},b.flush=function(){return void 0===a?i:m(It())},b}function Dt(e,t){return null!=e?e:t()}function Vt(e){let t,o=e[0],n=1;for(;n<e.length;){const r=e[n],s=e[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==o)return;"access"===r||"optionalAccess"===r?(t=o,o=s(o)):"call"!==r&&"optionalCall"!==r||(o=s((...e)=>o.call(t,...e)),t=void 0)}return o}const zt=e=>"string"==typeof e,Ut=()=>{let e,t;const o=new Promise((o,n)=>{e=o,t=n});return o.resolve=e,o.reject=t,o},Kt=e=>null==e?"":""+e,Ht=/###/g,Wt=e=>e&&e.indexOf("###")>-1?e.replace(Ht,"."):e,qt=e=>!e||zt(e),Jt=(e,t,o)=>{const n=zt(t)?t.split("."):t;let r=0;for(;r<n.length-1;){if(qt(e))return{};const t=Wt(n[r]);!e[t]&&o&&(e[t]=new o),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return qt(e)?{}:{obj:e,k:Wt(n[r])}},Yt=(e,t,o)=>{const{obj:n,k:r}=Jt(e,t,Object);if(void 0!==n||1===t.length)return void(n[r]=o);let s=t[t.length-1],i=t.slice(0,t.length-1),a=Jt(e,i,Object);for(;void 0===a.obj&&i.length;)s=`${i[i.length-1]}.${s}`,i=i.slice(0,i.length-1),a=Jt(e,i,Object),Vt([a,"optionalAccess",e=>e.obj])&&void 0!==a.obj[`${a.k}.${s}`]&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=o},Gt=(e,t)=>{const{obj:o,k:n}=Jt(e,t);if(o&&Object.prototype.hasOwnProperty.call(o,n))return o[n]},Qt=(e,t,o)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?zt(e[n])||e[n]instanceof String||zt(t[n])||t[n]instanceof String?o&&(e[n]=t[n]):Qt(e[n],t[n],o):e[n]=t[n]);return e},Xt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const eo=e=>zt(e)?e.replace(/[&<>"'\/]/g,e=>Zt[e]):e;const to=[" ",",","?","!",";"],oo=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const o=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,o),this.regExpQueue.push(e),o}}(20),no=(e,t,o=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const n=t.split(o);let r=e;for(let e=0;e<n.length;){if(!r||"object"!=typeof r)return;let t,s="";for(let i=e;i<n.length;++i)if(i!==e&&(s+=o),s+=n[i],t=r[s],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&i<n.length-1)continue;e+=i-e+1;break}r=t}return r},ro=e=>Vt([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),so={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){Vt([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class io{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||so,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,o,n){return n&&!this.debug?null:(zt(e[0])&&(e[0]=`${o}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new io(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new io(this.logger,e)}}var ao=new io;class co{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const o=this.observers[e].get(t)||0;this.observers[e].set(t,o+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,o])=>{for(let n=0;n<o;n++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([o,n])=>{for(let r=0;r<n;r++)o.apply(o,[e,...t])})}}}class lo extends co{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,o,n={}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],o&&(Array.isArray(o)?i.push(...o):zt(o)&&r?i.push(...o.split(r)):i.push(o)));const a=Gt(this.data,i);return!a&&!t&&!o&&e.indexOf(".")>-1&&(e=i[0],t=i[1],o=i.slice(2).join(".")),!a&&s&&zt(o)?no(Vt([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),o,r):a}addResource(e,t,o,n,r={silent:!1}){const s=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let i=[e,t];o&&(i=i.concat(s?o.split(s):o)),e.indexOf(".")>-1&&(i=e.split("."),n=t,t=i[1]),this.addNamespaces(t),Yt(this.data,i,n),r.silent||this.emit("added",e,t,o,n)}addResources(e,t,o,n={silent:!1}){for(const n in o)(zt(o[n])||Array.isArray(o[n]))&&this.addResource(e,t,n,o[n],{silent:!0});n.silent||this.emit("added",e,t,o)}addResourceBundle(e,t,o,n,r,s={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),n=o,o=t,t=i[1]),this.addNamespaces(t);let a=Gt(this.data,i)||{};s.skipCopy||(o=JSON.parse(JSON.stringify(o))),n?Qt(a,o,r):a={...a,...o},Yt(this.data,i,a),s.silent||this.emit("added",e,t,o)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var uo={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,o,n,r){return e.forEach(e=>{t=Dt(Vt([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,o,n,r)]),()=>t)}),t}};const po=Symbol("i18next/PATH_KEY");function ho(e,t){const{[po]:o}=e(function(){const e=[],t=Object.create(null);let o;return t.get=(n,r)=>(Vt([o,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),r===po?e:(e.push(r),o=Proxy.revocable(n,t),o.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return o.join(Dt(Vt([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const go={},fo=e=>!zt(e)&&"boolean"!=typeof e&&"number"!=typeof e;class mo extends co{constructor(e,t={}){var o,n;super(),o=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{o[e]&&(n[e]=o[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=ao.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const o={...t};if(null==e)return!1;const n=this.resolve(e,o);if(void 0===Vt([n,"optionalAccess",e=>e.res]))return!1;const r=fo(n.res);return!1!==o.returnObjects||!r}extractFromKey(e,t){let o=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===o&&(o=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const s=o&&e.indexOf(o)>-1,i=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,o)=>{t=t||"",o=o||"";const n=to.filter(e=>t.indexOf(e)<0&&o.indexOf(e)<0);if(0===n.length)return!0;const r=oo.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let s=!r.test(e);if(!s){const t=e.indexOf(o);t>0&&!r.test(e.substring(0,t))&&(s=!0)}return s})(e,o,n));if(s&&!i){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:zt(r)?[r]:r};const s=e.split(o);(o!==n||o===n&&this.options.ns.indexOf(s[0])>-1)&&(r=s.shift()),e=s.join(n)}return{key:e,namespaces:zt(r)?[r]:r}}translate(e,t,o){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=ho(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);const r=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],n),c=a[a.length-1];let l=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const u=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===Vt([u,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return p?r?{res:`${c}${l}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${l}${i}`:r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:i;const h=this.resolve(e,n);let d=Vt([h,"optionalAccess",e=>e.res]);const g=Vt([h,"optionalAccess",e=>e.usedKey])||i,f=Vt([h,"optionalAccess",e=>e.exactUsedKey])||i,m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==n.count&&!zt(n.count),v=mo.hasDefaultValue(n),x=y?this.pluralResolver.getSuffix(u,n.count,n):"",S=n.ordinal&&y?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",C=y&&!n.ordinal&&0===n.count,k=C&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${x}`]||n[`defaultValue${S}`]||n.defaultValue;let w=d;b&&!d&&v&&(w=k);const E=fo(w),O=Object.prototype.toString.apply(w);if(!(b&&w&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(O)<0)||zt(m)&&Array.isArray(w))if(b&&zt(m)&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,n,o));else{let t=!1,r=!1;!this.isValidLookup(d)&&v&&(t=!0,d=k),this.isValidLookup(d)||(r=!0,d=i);const a=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:d,p=v&&k!==d&&this.options.updateMissing;if(r||t||p){if(this.logger.log(p?"updateKey":"missingKey",u,c,i,p?k:d),s){const e=this.resolve(i,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let o=0;o<t.length;o++)e.push(t[o]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const o=(e,t,o)=>{const r=v&&o!==d?o:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,r,p,n):Vt([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,c,t,r,p,n),this.emit("missingKey",e,c,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);C&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{o([e],i+t,n[`defaultValue${t}`]||k)})}):o(e,i,k))}d=this.extendTranslation(d,e,n,h,o),r&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${c}${l}${i}`),(r||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${i}`:i,t?d:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,w,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(h.res=e,h.usedParams=this.getUsedParamsDetails(n),h):e}if(s){const e=Array.isArray(w),t=e?[]:{},o=e?f:g;for(const e in w)if(Object.prototype.hasOwnProperty.call(w,e)){const r=`${o}${s}${e}`;t[e]=v&&!d?this.translate(r,{...n,defaultValue:fo(k)?k[e]:void 0,joinArrays:!1,ns:a}):this.translate(r,{...n,joinArrays:!1,ns:a}),t[e]===r&&(t[e]=w[e])}d=t}}return r?(h.res=d,h.usedParams=this.getUsedParamsDetails(n),h):d}extendTranslation(e,t,o,n,r){if(Vt([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const s=zt(e)&&(void 0!==Vt([o,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let i;if(s){const t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let a=o.replace&&!zt(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,o.lng||this.language||n.usedLng,o),s){const t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(o.nest=!1)}!o.lng&&n&&n.res&&(o.lng=this.language||n.usedLng),!1!==o.nest&&(e=this.interpolator.nest(e,(...e)=>Vt([r,"optionalAccess",e=>e[0]])!==e[0]||o.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),o)),o.interpolation&&this.interpolator.reset()}const s=o.postProcess||this.options.postProcess,i=zt(s)?[s]:s;return null!=e&&Vt([i,"optionalAccess",e=>e.length])&&!1!==o.applyPostProcessor&&(e=uo.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),e}resolve(e,t={}){let o,n,r,s,i;return zt(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(o))return;const a=this.extractFromKey(e,t),c=a.key;n=c;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==t.count&&!zt(t.count),p=u&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(zt(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(o)||(i=e,go[`${d[0]}-${e}`]||!Vt([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||Vt([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(i)])||(go[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${d.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(n=>{if(this.isValidLookup(o))return;s=n;const i=[c];if(Vt([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(i,c,n,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(n,t.count,t));const o=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(r)&&i.push(c+e.replace(r,this.options.pluralSeparator)),i.push(c+e),p&&i.push(c+o)),h){const n=`${c}${this.options.contextSeparator||"_"}${t.context}`;i.push(n),u&&(t.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),i.push(n+e),p&&i.push(n+o))}}let a;for(;a=i.pop();)this.isValidLookup(o)||(r=a,o=this.getResource(n,e,a,t))}))})}),{res:o,usedKey:n,exactUsedKey:r,usedLng:s,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,o,n={}){return Vt([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,o,n):this.resourceStore.getResource(e,t,o,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=e.replace&&!zt(e.replace);let n=o?e.replace:e;if(o&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!o){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t===o.substring(0,12)&&void 0!==e[o])return!0;return!1}}class bo{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ao.create("languageUtils")}getScriptPartFromCode(e){if(!(e=ro(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=ro(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(zt(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const o=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(o)||(t=o)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const o=this.getScriptPartFromCode(e);if(this.isSupportedCode(o))return t=o;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),zt(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let o=e[t];return o||(o=e[this.getScriptPartFromCode(t)]),o||(o=e[this.formatLanguageCode(t)]),o||(o=e[this.getLanguagePartFromCode(t)]),o||(o=e.default),o||[]}toResolveHierarchy(e,t){const o=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],r=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return zt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):zt(e)&&r(this.formatLanguageCode(e)),o.forEach(e=>{n.indexOf(e)<0&&r(this.formatLanguageCode(e))}),n}}const yo={zero:0,one:1,two:2,few:3,many:4,other:5},vo={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xo{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ao.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const o=ro("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:o,type:n});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let s;try{s=new Intl.PluralRules(o,{type:n})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vo;if(!e.match(/-|_/))return vo;const n=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(n,t)}return this.pluralRulesCache[r]=s,s}needsPlural(e,t={}){let o=this.getRule(e,t);return o||(o=this.getRule("dev",t)),Vt([o,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.length])>1}getPluralFormsOfKey(e,t,o={}){return this.getSuffixes(e,o).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let o=this.getRule(e,t);return o||(o=this.getRule("dev",t)),o?o.resolvedOptions().pluralCategories.sort((e,t)=>yo[e]-yo[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,o={}){const n=this.getRule(e,o);return n?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,o))}}const So=(e,t,o,n=".",r=!0)=>{let s=((e,t,o)=>{const n=Gt(e,o);return void 0!==n?n:Gt(t,o)})(e,t,o);return!s&&r&&zt(o)&&(s=no(e,o,n),void 0===s&&(s=no(t,o,n))),s},Co=e=>e.replace(/\$/g,"$$$$");class ko{constructor(e={}){this.logger=ao.create("interpolator"),this.options=e,this.format=Vt([e,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.format])||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:o,useRawValueToEscape:n,prefix:r,prefixEscaped:s,suffix:i,suffixEscaped:a,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:d,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:eo,this.escapeValue=void 0===o||o,this.useRawValueToEscape=void 0!==n&&n,this.prefix=r?Xt(r):s||"{{",this.suffix=i?Xt(i):a||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=p?Xt(p):h||Xt("$t("),this.nestingSuffix=d?Xt(d):g||Xt(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>Vt([e,"optionalAccess",e=>e.source])===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,o,n){let r,s,i;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){const r=So(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,o,{...n,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),s=r.shift().trim(),i=r.join(this.formatSeparator).trim();return this.format(So(t,a,s,this.options.keySeparator,this.options.ignoreJSONStructure),i,o,{...n,...t,interpolationkey:s})};this.resetRegExp();const l=Vt([n,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,u=void 0!==Vt([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Co(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Co(this.escape(e)):Co(e)}].forEach(t=>{for(i=0;r=t.regex.exec(e);){const o=r[1].trim();if(s=c(o),void 0===s)if("function"==typeof l){const t=l(e,r,n);s=zt(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,o))s="";else{if(u){s=r[0];continue}this.logger.warn(`missed to pass in variable ${o} for interpolating ${e}`),s=""}else zt(s)||this.useRawValueToEscape||(s=Kt(s));const a=t.safeValue(s);if(e=e.replace(r[0],a),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,o={}){let n,r,s;const i=(e,t)=>{const o=this.nestingOptionsSeparator;if(e.indexOf(o)<0)return e;const n=e.split(new RegExp(`${o}[ ]*{`));let r=`{${n[1]}`;e=n[0],r=this.interpolate(r,s);const i=r.match(/'/g),a=r.match(/"/g);(Dt(Vt([i,"optionalAccess",e=>e.length]),()=>0)%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{s=JSON.parse(r),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${o}${r}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];s={...o},s=s.replace&&!zt(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==c&&(a=n[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),r=t(i.call(this,n[1].trim(),s),s),r&&n[0]===e&&!zt(r))return r;zt(r)||(r=Kt(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),a.length&&(r=a.reduce((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const wo=e=>{const t={};return(o,n,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const i=n+JSON.stringify(s);let a=t[i];return a||(a=e(ro(n),r),t[i]=a),a(o)}},Eo=e=>(t,o,n)=>e(ro(o),n)(t);class Oo{constructor(e={}){this.logger=ao.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const o=t.cacheInBuiltFormats?wo:Eo;this.formats={number:o((e,t)=>{const o=new Intl.NumberFormat(e,{...t});return e=>o.format(e)}),currency:o((e,t)=>{const o=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>o.format(e)}),datetime:o((e,t)=>{const o=new Intl.DateTimeFormat(e,{...t});return e=>o.format(e)}),relativetime:o((e,t)=>{const o=new Intl.RelativeTimeFormat(e,{...t});return e=>o.format(e,t.range||"day")}),list:o((e,t)=>{const o=new Intl.ListFormat(e,{...t});return e=>o.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=wo(t)}format(e,t,o,n={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:s}=(e=>{let t=e.toLowerCase().trim();const o={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const r=n[1].substring(0,n[1].length-1);"currency"===t&&r.indexOf(":")<0?o.currency||(o.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?o.range||(o.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),r=n.join(":").trim().replace(/^'+|'+$/g,""),s=t.trim();o[s]||(o[s]=r),"false"===r&&(o[s]=!1),"true"===r&&(o[s]=!0),isNaN(r)||(o[s]=parseInt(r,10))}})}return{formatName:t,formatOptions:o}})(t);if(this.formats[r]){let t=e;try{const i=Vt([n,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[n.interpolationkey]])||{},a=i.locale||i.lng||n.locale||n.lng||o;t=this.formats[r](e,a,{...s,...n,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class Ao extends co{constructor(e,t,o,n={}){super(),this.backend=e,this.store=t,this.services=o,this.languageUtils=o.languageUtils,this.options=n,this.logger=ao.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],Vt([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(o,n.backend,n)])}queueLoad(e,t,o,n){const r={},s={},i={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const i=`${e}|${t}`;!o.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===s[i]&&(s[i]=!0):(this.state[i]=1,n=!1,void 0===s[i]&&(s[i]=!0),void 0===r[i]&&(r[i]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(i[e]=!0)}),(Object.keys(r).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(r),pending:Object.keys(s),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(a)}}loaded(e,t,o){const n=e.split("|"),r=n[0],s=n[1];t&&this.emit("failedLoading",r,s,t),!t&&o&&this.store.addResourceBundle(r,s,o,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&o&&(this.state[e]=0);const i={};this.queue.forEach(o=>{((e,t,o)=>{const{obj:n,k:r}=Jt(e,t,Object);n[r]=n[r]||[],n[r].push(o)})(o.loaded,[r],s),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(o,e),t&&o.errors.push(t),0!==o.pendingCount||o.done||(Object.keys(o.loaded).forEach(e=>{i[e]||(i[e]={});const t=o.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,o,n=0,r=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:o,tried:n,wait:r,callback:s});this.readingCalls++;const i=(i,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,o,n+1,2*r,s)},r):s(i,a)},a=this.backend[o].bind(this.backend);if(2!==a.length)return a(e,t,i);try{const o=a(e,t);o&&"function"==typeof o.then?o.then(e=>i(null,e)).catch(i):i(null,o)}catch(e){i(e)}}prepareLoading(e,t,o={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();zt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),zt(t)&&(t=[t]);const r=this.queueLoad(e,t,o,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,o){this.prepareLoading(e,t,{},o)}reload(e,t,o){this.prepareLoading(e,t,{reload:!0},o)}loadOne(e,t=""){const o=e.split("|"),n=o[0],r=o[1];this.read(n,r,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${n} failed`,o),!o&&s&&this.logger.log(`${t}loaded namespace ${r} for language ${n}`,s),this.loaded(e,o,s)})}saveMissing(e,t,o,n,r,s={},i=()=>{}){if(!Vt([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||Vt([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=o&&""!==o){if(Vt([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const a={...s,isUpdate:r},c=this.backend.create.bind(this.backend);if(c.length<6)try{let r;r=5===c.length?c(e,t,o,n,a):c(e,t,o,n),r&&"function"==typeof r.then?r.then(e=>i(null,e)).catch(i):i(null,r)}catch(e){i(e)}else c(e,t,o,n,i,a)}e&&e[0]&&this.store.addResource(e[0],t,o,n)}}else this.logger.warn(`did not save key "${o}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const _o=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),zt(e[1])&&(t.defaultValue=e[1]),zt(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const o=e[3]||e[2];Object.keys(o).forEach(e=>{t[e]=o[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),jo=e=>(zt(e.ns)&&(e.ns=[e.ns]),zt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),zt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),Vt([e,"access",e=>e.supportedLngs,"optionalAccess",e=>e.indexOf,"optionalCall",e=>e("cimode")])<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Lo=()=>{};class No extends co{constructor(e={},t){var o;if(super(),this.options=jo(e),this.services={},this.logger=ao,this.modules={external:[]},o=this,Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(e=>{"function"==typeof o[e]&&(o[e]=o[e].bind(o))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(zt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const o=_o();var n;this.options={...o,...this.options,...jo(e)},this.options.interpolation={...o.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(Vt([n=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||Vt([n,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||Vt([n,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&n.options.backend.backends.some(e=>Vt([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||Vt([e,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?ao.init(r(this.modules.logger),this.options):ao.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Oo;const t=new bo(this.options);this.store=new lo(this.options.resources,this.options);const n=this.services;n.logger=ao,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new xo(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new ko(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Ao(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new mo(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Lo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=Ut(),i=()=>{const e=(e,o)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(o),t(e,o)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),s}loadResources(e,t=Lo){let o=t;const n=zt(e)?e:this.language;if("function"==typeof e&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===Vt([n,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return o();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)t(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}Vt([this,"access",e=>e.options,"access",e=>e.preload,"optionalAccess",e=>e.forEach,"optionalCall",e=>e(e=>t(e))]),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),o(e)})}else o(null)}reloadResources(e,t,o){const n=Ut();return"function"==typeof e&&(o=e,e=void 0),"function"==typeof t&&(o=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),o||(o=Lo),this.services.backendConnector.reload(e,t,e=>{n.resolve(),o(e)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&uo.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const o=Ut();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,s)=>{s?this.isLanguageChangingTo===e&&(n(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,o.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},s=t=>{e||t||!this.services.languageDetector||(t=[]);const o=zt(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(o)?o:this.services.languageUtils.getBestMatchFromCodes(zt(t)?[t]:t);s&&(this.language||n(s),this.translator.language||this.translator.changeLanguage(s),Vt([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(s)])),this.loadResources(s,e=>{r(e,s)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),o}getFixedT(e,t,o){const n=(e,t,...r)=>{let s;s="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},s.lng=s.lng||n.lng,s.lngs=s.lngs||n.lngs,s.ns=s.ns||n.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||o||n.keyPrefix);const i=this.options.keySeparator||".";let a;return s.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=ho(e,{...this.options,...t})),`${s.keyPrefix}${i}${e}`)):("function"==typeof e&&(e=ho(e,{...this.options,...t})),a=s.keyPrefix?`${s.keyPrefix}${i}${e}`:e),this.t(a,s)};return zt(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=o,n}t(...e){return Vt([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return Vt([this,"access",e=>e.translator,"optionalAccess",e=>e.exists,"call",t=>t(...e)])}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;const s=(e,t)=>{const o=this.services.backendConnector.state[`${e}|${t}`];return-1===o||0===o||2===o};if(t.precheck){const e=t.precheck(this,s);if(void 0!==e)return e}return!!this.hasResourceBundle(o,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(o,e)||n&&!s(r,e)))}loadNamespaces(e,t){const o=Ut();return this.options.ns?(zt(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{o.resolve(),t&&t(e)}),o):(t&&t(),Promise.resolve())}loadLanguages(e,t){const o=Ut();zt(e)&&(e=[e]);const n=this.options.preload||[],r=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=n.concat(r),this.loadResources(e=>{o.resolve(),t&&t(e)}),o):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(Vt([this,"access",e=>e.languages,"optionalAccess",e=>e.length])>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=Vt([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new bo(_o());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const o=new No(e,t);return o.createInstance=No.createInstance,o}cloneInstance(e={},t=Lo){const o=e.forkResourceStore;o&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},r=new No(n);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},o){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((o,n)=>(o[n]={...e[t][n]},o),e[t]),e),{});r.store=new lo(e,n),r.services.resourceStore=r.store}if(e.interpolation){const t={..._o().interpolation,...this.options.interpolation,...e.interpolation},o={...n,interpolation:t};r.services.interpolator=new ko(o)}return r.translator=new mo(r.services,n),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(n,t),r.translator.options=n,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ro=No.createInstance();Ro.createInstance,Ro.dir,Ro.init,Ro.loadResources,Ro.reloadResources,Ro.use,Ro.changeLanguage,Ro.getFixedT,Ro.t,Ro.exists,Ro.setDefaultNamespace,Ro.hasLoadedNamespace,Ro.loadNamespaces,Ro.loadLanguages;Ro.init({fallbackLng:"en",lng:"en",debug:!0,resources:{en:{translation:{categorize:{limitMaxChoicesPerCategory:"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",maxChoicesPerCategoryRestriction:"To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."},ebsr:{part:"Part {{index}}"},numberLine:{addElementLimit_one:"You can only add {{count}} element",addElementLimit_other:"You can only add {{count}} elements",clearAll:"Clear all"},imageClozeAssociation:{reachedLimit_one:"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",reachedLimit_other:"Full"},drawingResponse:{fillColor:"Fill color",outlineColor:"Outline color",noFill:"No fill",lightblue:"Light blue",lightyellow:"Light yellow",red:"Red",orange:"Orange",yellow:"Yellow",violet:"Violet",blue:"Blue",green:"Green",white:"White",black:"Black",onDoubleClick:"Double click to edit this text. Press Enter to submit."},charting:{addCategory:"Add category",actions:"Actions",add:"Add",delete:"Delete",newLabel:"New label",reachedLimit_other:"There can't be more than {{count}} categories.",keyLegend:{incorrectAnswer:"Student incorrect answer",correctAnswer:"Student correct answer",correctKeyAnswer:"Answer key correct"}},graphing:{point:"Point",circle:"Circle",line:"Line",parabola:"Parabola",absolute:"Absolute Value",exponential:"Exponential",polygon:"Polygon",ray:"Ray",segment:"Segment",sine:"Sine",vector:"Vector",label:"Label",redo:"Redo",reset:"Reset"},mathInline:{primaryCorrectWithAlternates:"Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct."},multipleChoice:{minSelections:"Select at least {{minSelections}}.",maxSelections_one:"Only {{maxSelections}} answer is allowed.",maxSelections_other:"Only {{maxSelections}} answers are allowed.",minmaxSelections_equal:"Select {{minSelections}}.",minmaxSelections_range:"Select between {{minSelections}} and {{maxSelections}}."},selectText:{correctAnswerSelected:"Correct",correctAnswerNotSelected:"Correct Answer Not Selected",incorrectSelection:"Incorrect Selection",key:"Key"}},common:{undo:"Undo",clearAll:"Clear all",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Show correct answer",hideCorrectAnswer:"Hide correct answer",commonCorrectAnswerWithAlternates:"Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",warning:"Warning",showNote:"Show Note",hideNote:"Hide Note",cancel:"Cancel"}},es:{translation:{categorize:{limitMaxChoicesPerCategory:"Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",maxChoicesPerCategoryRestriction:"Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"},ebsr:{part:"Parte {{index}}"},numberLine:{addElementLimit_one:"Solo puedes agregar {{count}} elemento",addElementLimit_other:"Solo puedes agregar {{count}} elementos",clearAll:"Borrar todo"},imageClozeAssociation:{reachedLimit_one:"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",reachedLimit_other:"Lleno"},drawingResponse:{fillColor:"Color de relleno",outlineColor:"Color del contorno",noFill:"Sin relleno",lightblue:"Azul claro",lightyellow:"Amarillo claro",red:"Rojo",orange:"Naranja",yellow:"Amarillo",violet:"Violeta",blue:"Azul",green:"Verde",white:"Blanco",black:"Negro",onDoubleClick:"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"},charting:{addCategory:"Añadir categoría",actions:"Acciones",add:"Añadir",delete:"Eliminar",newLabel:"Nueva etiqueta",reachedLimit_other:"No puede haber más de {{count}} categorías.",keyLegend:{incorrectAnswer:"Respuesta incorrecta del estudiante",correctAnswer:"Respuesta correcta del estudiante",correctKeyAnswer:"Clave de respuesta correcta"}},graphing:{point:"Punto",circle:"Circulo",line:"Línea",parabola:"Parábola",absolute:"Valor absoluto",exponential:"Exponencial",polygon:"Polígono",ray:"Semirrecta",segment:"Segmento ",sine:"Seno",vector:"Vector",label:"Etiqueta",redo:"Rehacer",reset:"Reiniciar"},mathInline:{primaryCorrectWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas."},multipleChoice:{minSelections:"Seleccione al menos {{minSelections}}.",maxSelections_one:"Sólo se permite {{maxSelections}} respuesta.",maxSelections_other:"Sólo se permiten {{maxSelections}} respuestas.",minmaxSelections_equal:"Seleccione {{minSelections}}.",minmaxSelections_range:"Seleccione entre {{minSelections}} y {{maxSelections}}."},selectText:{correctAnswerSelected:"Respuesta Correcta",correctAnswerNotSelected:"Respuesta Correcta No Seleccionada",incorrectSelection:"Selección Incorrecta",key:"Clave"}},common:{undo:"Deshacer",clearAll:"Borrar todo",correct:"Correct",incorrect:"Incorrect",showCorrectAnswer:"Mostrar respuesta correcta",hideCorrectAnswer:"Ocultar respuesta correcta",commonCorrectAnswerWithAlternates:"Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",warning:"Advertencia",showNote:"Mostrar Nota",hideNote:"Ocultar Nota",cancel:"Cancelar"}}}});var Po={translator:{...Ro,t:(e,t)=>{const{lng:o}=t;switch(o){case"en_US":case"en-US":t.lng="en";break;case"es_ES":case"es-ES":case"es_MX":case"es-MX":t.lng="es"}return Ro.t(e,{lng:o,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},$o.apply(null,arguments)}function To(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}function Io(e,t){return Io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Io(e,t)}function Mo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Io(e,t)}function Fo(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Bo=!1;var Do=e.createContext(null),Vo=function(e){return e.scrollTop};const zo=e,Uo=t;var Ko="unmounted",Ho="exited",Wo="entering",qo="entered",Jo="exiting",Yo=function(e){function t(t,o){var n;n=e.call(this,t,o)||this;var r,s=o&&!o.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?s?(r=Ho,n.appearStatus=Wo):r=qo:r=t.unmountOnExit||t.mountOnEnter?Ko:Ho,n.state={status:r},n.nextCallback=null,n}Mo(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ko?{status:Ho}:null};var o=t.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==Wo&&o!==qo&&(t=Wo):o!==Wo&&o!==qo||(t=Jo)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,o,n=this.props.timeout;return e=t=o=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,o=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:o}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Wo){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Uo.findDOMNode(this);o&&Vo(o)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ho&&this.setState({status:Ko})},o.performEnter=function(e){var t=this,o=this.props.enter,n=this.context?this.context.isMounting:e,r=this.props.nodeRef?[n]:[Uo.findDOMNode(this),n],s=r[0],i=r[1],a=this.getTimeouts(),c=n?a.appear:a.enter;!e&&!o||Bo?this.safeSetState({status:qo},function(){t.props.onEntered(s)}):(this.props.onEnter(s,i),this.safeSetState({status:Wo},function(){t.props.onEntering(s,i),t.onTransitionEnd(c,function(){t.safeSetState({status:qo},function(){t.props.onEntered(s,i)})})}))},o.performExit=function(){var e=this,t=this.props.exit,o=this.getTimeouts(),n=this.props.nodeRef?void 0:Uo.findDOMNode(this);t&&!Bo?(this.props.onExit(n),this.safeSetState({status:Jo},function(){e.props.onExiting(n),e.onTransitionEnd(o.exit,function(){e.safeSetState({status:Ho},function(){e.props.onExited(n)})})})):this.safeSetState({status:Ho},function(){e.props.onExited(n)})},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,o=!0;return this.nextCallback=function(n){o&&(o=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var o=this.props.nodeRef?this.props.nodeRef.current:Uo.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(o&&!n){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],s=r[0],i=r[1];this.props.addEndListener(s,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===Ko)return null;var t=this.props,o=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var n=To(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return zo.createElement(Do.Provider,{value:null},"function"==typeof o?o(e,n):zo.cloneElement(zo.Children.only(o),n))},t}(zo.Component);function Go(){}Yo.contextType=Do,Yo.propTypes={},Yo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Go,onEntering:Go,onEntered:Go,onExit:Go,onExiting:Go,onExited:Go},Yo.UNMOUNTED=Ko,Yo.EXITED=Ho,Yo.ENTERING=Wo,Yo.ENTERED=qo,Yo.EXITING=Jo;var Qo=Yo;const Xo=e;var Zo=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return n=t,void((o=e).classList?o.classList.add(n):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(o,n)||("string"==typeof o.className?o.className=o.className+" "+n:o.setAttribute("class",(o.className&&o.className.baseVal||"")+" "+n)));var o,n})},en=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return n=t,void((o=e).classList?o.classList.remove(n):"string"==typeof o.className?o.className=Fo(o.className,n):o.setAttribute("class",Fo(o.className&&o.className.baseVal||"",n)));var o,n})},tn=function(e){function t(){for(var t,o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,o){var n=t.resolveArguments(e,o),r=n[0],s=n[1];t.removeClasses(r,"exit"),t.addClass(r,s?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,o)},t.onEntering=function(e,o){var n=t.resolveArguments(e,o),r=n[0],s=n[1]?"appear":"enter";t.addClass(r,s,"active"),t.props.onEntering&&t.props.onEntering(e,o)},t.onEntered=function(e,o){var n=t.resolveArguments(e,o),r=n[0],s=n[1]?"appear":"enter";t.removeClasses(r,s),t.addClass(r,s,"done"),t.props.onEntered&&t.props.onEntered(e,o)},t.onExit=function(e){var o=t.resolveArguments(e)[0];t.removeClasses(o,"appear"),t.removeClasses(o,"enter"),t.addClass(o,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var o=t.resolveArguments(e)[0];t.addClass(o,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var o=t.resolveArguments(e)[0];t.removeClasses(o,"exit"),t.addClass(o,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,o){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,o]},t.getClassNames=function(e){var o=t.props.classNames,n="string"==typeof o,r=n?""+(n&&o?o+"-":"")+e:o[e];return{baseClassName:r,activeClassName:n?r+"-active":o[e+"Active"],doneClassName:n?r+"-done":o[e+"Done"]}},t}Mo(t,e);var o=t.prototype;return o.addClass=function(e,t,o){var n=this.getClassNames(t)[o+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===o&&r&&(n+=" "+r),"active"===o&&e&&Vo(e),n&&(this.appliedClasses[t][o]=n,Zo(e,n))},o.removeClasses=function(e,t){var o=this.appliedClasses[t],n=o.base,r=o.active,s=o.done;this.appliedClasses[t]={},n&&en(e,n),r&&en(e,r),s&&en(e,s)},o.render=function(){var e=this.props;e.classNames;var t=To(e,["classNames"]);return Xo.createElement(Qo,$o({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Xo.Component);tn.defaultProps={classNames:""},tn.propTypes={};var on=tn;const{Children:nn}=e,{cloneElement:rn}=e,{isValidElement:sn}=e;function an(e,t){var o=Object.create(null);return e&&nn.map(e,function(e){return e}).forEach(function(e){o[e.key]=function(e){return t&&sn(e)?t(e):e}(e)}),o}function cn(e,t,o){return null!=o[t]?o[t]:e.props[t]}function ln(e,t,o){var n=an(e.children),r=function(e,t){function o(o){return o in t?t[o]:e[o]}e=e||{},t=t||{};var n,r=Object.create(null),s=[];for(var i in e)i in t?s.length&&(r[i]=s,s=[]):s.push(i);var a={};for(var c in t){if(r[c])for(n=0;n<r[c].length;n++){var l=r[c][n];a[r[c][n]]=o(l)}a[c]=o(c)}for(n=0;n<s.length;n++)a[s[n]]=o(s[n]);return a}(t,n);return Object.keys(r).forEach(function(s){var i=r[s];if(sn(i)){var a=s in t,c=s in n,l=t[s],u=sn(l)&&!l.props.in;!c||a&&!u?c||!a||u?c&&a&&sn(l)&&(r[s]=rn(i,{onExited:o.bind(null,i),in:l.props.in,exit:cn(i,"exit",e),enter:cn(i,"enter",e)})):r[s]=rn(i,{in:!1}):r[s]=rn(i,{onExited:o.bind(null,i),in:!0,exit:cn(i,"exit",e),enter:cn(i,"enter",e)})}}),r}const un=e;var pn=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},hn=function(e){function t(t,o){var n,r=(n=e.call(this,t,o)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n));return n.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},n}Mo(t,e);var o=t.prototype;return o.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},o.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var o,n,r=t.children,s=t.handleExited;return{children:t.firstRender?(o=e,n=s,an(o.children,function(e){return rn(e,{onExited:n.bind(null,e),in:!0,appear:cn(e,"appear",o),enter:cn(e,"enter",o),exit:cn(e,"exit",o)})})):ln(e,r,s),firstRender:!1}},o.handleExited=function(e,t){var o=an(this.props.children);e.key in o||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var o=$o({},t.children);return delete o[e.key],{children:o}}))},o.render=function(){var e=this.props,t=e.component,o=e.childFactory,n=To(e,["component","childFactory"]),r=this.state.contextValue,s=pn(this.state.children).map(o);return delete n.appear,delete n.enter,delete n.exit,null===t?un.createElement(Do.Provider,{value:r},s):un.createElement(Do.Provider,{value:r},un.createElement(t,n,s))},t}(un.Component);hn.propTypes={},hn.defaultProps={component:"div",childFactory:function(e){return e}};var dn=hn;const gn=e,{styled:fn}=o,{Box:mn}=n,bn=r,{color:yn}=s,vn=fn(mn)({width:"33px",height:"33px","& svg":{position:"absolute",display:"inline-block",width:"33px",height:"33px",verticalAlign:"middle","& hide":{display:"none"}}}),xn=fn("svg")({"& .incorrect-fill":{fill:`var(--feedback-incorrect-bg-color, ${yn.incorrect()})`},"& .correct-fill":{fill:`var(--feedback-correct-bg-color, ${yn.correct()})`}}),Sn=fn("div")({position:"relative","&.feedback-tick-enter":{opacity:"0",left:"-50px"},"&.feedback-tick-enter-active":{opacity:"1",left:"0px",transition:"left 500ms ease-in 200ms, opacity 500ms linear 200ms"},"&.feedback-tick-exit":{opacity:"1",left:"0px"},"&.feedback-tick-exit-active":{opacity:"0",left:"-50px",transition:"left 300ms ease-in, opacity 300ms"}});class Cn extends gn.Component{static __initStatic(){this.propTypes={correctness:bn.string}}constructor(e){super(e),Cn.prototype.__init.call(this),Cn.prototype.__init2.call(this),this.nodeRef=gn.createRef()}__init(){this.getIncorrectIcon=()=>gn.createElement(xn,{key:"1",preserveAspectRatio:"xMinYMin meet",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},gn.createElement("g",null,gn.createElement("rect",{x:"11",y:"17.3",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",className:"incorrect-fill",width:"16.6",height:"3.7"}),gn.createElement("rect",{x:"17.4",y:"10.7",transform:"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",className:"incorrect-fill",width:"3.7",height:"16.6"})))}__init2(){this.getCorrectIcon=()=>gn.createElement(xn,{key:"2",preserveAspectRatio:"xMinYMin meet",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 44 40",style:{enableBackground:"new 0 0 44 40"}},gn.createElement("polygon",{className:"correct-fill",points:"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"}))}render(){const{correctness:e}=this.props,t=(()=>"incorrect"===e?this.getIncorrectIcon():"correct"===e?this.getCorrectIcon():null)();return gn.createElement(vn,null,gn.createElement(dn,null,e&&gn.createElement(on,{nodeRef:this.nodeRef,classNames:{enter:"feedback-tick-enter",enterActive:"feedback-tick-enter-active",exit:"feedback-tick-exit",exitActive:"feedback-tick-exit-active"},timeout:{enter:700,exit:300}},gn.createElement(Sn,{ref:this.nodeRef},t))))}}Cn.__initStatic();const{FormControlLabel:kn}=n,{Box:wn}=n,{Checkbox:En}=n,{Radio:On}=n,An=e,_n=r,{styled:jn}=o,{Feedback:Ln}=s,{color:Nn}=s,{PreviewPrompt:Rn}=s,Pn=i,$n="multiple-choice-component",Tn=jn(wn)({display:"flex",alignItems:"center",backgroundColor:Nn.background()}),In=jn(wn)({display:"flex",alignItems:"center",backgroundColor:Nn.background(),flex:1,"& .MuiFormControlLabel-root":{marginLeft:"-14px"},"& label":{color:Nn.text(),"& > span":{fontSize:"inherit"},"& > .MuiButtonBase-root":{padding:"12px"}}}),Mn=jn("span")(({theme:e})=>({display:"flex",alignItems:"center","& > span":{marginLeft:`-${e.spacing(1)}`}})),Fn=jn("span")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),Bn=jn(kn)({"& .MuiFormControlLabel-label":{color:`${Nn.text()} !important`,backgroundColor:Nn.background(),letterSpacing:"normal"},"&.Mui-disabled *":{cursor:"not-allowed !important"}}),Dn=(e,t)=>({[`&.${$n}`]:{color:`var(--choice-input-${e}, ${t}) !important`}}),Vn=e=>{const t=t=>e?`${e}-${t}`:t;return{[t("root")]:{...Dn("color",Nn.text()),...e?{}:{"&:hover":{color:`${Nn.primaryLight()} !important`}},..."correct"===e?Dn("correct-color",Nn.text()):{},..."incorrect"===e?Dn("incorrect-color",Nn.incorrect()):{}},[t("checked")]:{..."correct"===e?Dn("correct-selected-color",Nn.correct()):{},..."incorrect"===e?Dn("incorrect-checked",Nn.incorrect()):{},...e?{}:Dn("selected-color",Nn.primary())},[t("disabled")]:{...Dn("disabled-color",Nn.text()),..."correct"===e?Dn("correct-disabled-color",Nn.disabled()):{},..."incorrect"===e?Dn("incorrect-disabled-color",Nn.disabled()):{},opacity:.6,cursor:"not-allowed !important",pointerEvents:"initial !important"},focusVisibleUnchecked:{outline:`2px solid ${Nn.focusUncheckedBorder()}`,backgroundColor:Nn.focusUnchecked()},focusVisibleChecked:{outline:`2px solid ${Nn.focusCheckedBorder()}`,backgroundColor:Nn.focusChecked()}}},zn=jn(En,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=Vn(e),o=t=>e?`${e}-${t}`:t;return{[`&.${$n}`]:{...t[o("root")],"&.Mui-checked":t[o("checked")],"&.Mui-disabled":e?{}:t[o("disabled")]},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),Un=e=>{const{correctness:t,checked:o,onChange:n,disabled:r,value:s,id:i,onKeyDown:a,inputRef:c}=e,l={checked:o,onChange:n,disabled:r,value:s};return An.createElement(zn,{id:i,slotProps:{input:{ref:c}},onKeyDown:a,disableRipple:!0,...l,correctness:t,className:$n})},Kn=jn(On,{shouldForwardProp:e=>"correctness"!==e})(({correctness:e})=>{const t=Vn(e),o=t=>e?`${e}-${t}`:t;return{[`&.${$n}`]:{...t[o("root")],"&.Mui-checked":t[o("checked")],"&.Mui-disabled":e?{}:t[o("disabled")]},"&.Mui-focusVisible":{"&:not(.Mui-checked)":t.focusVisibleUnchecked,"&.Mui-checked":t.focusVisibleChecked}}}),Hn=e=>{const{correctness:t,checked:o,onChange:n,disabled:r,value:s,id:i,tagName:a,inputRef:c}=e,l={checked:o,onChange:n,disabled:r,value:s};return An.createElement(Kn,{id:i,slotProps:{input:{ref:c}},disableRipple:!0,...l,correctness:t,className:$n,name:a})};class Wn extends An.Component{static __initStatic(){this.propTypes={choiceMode:_n.oneOf(["radio","checkbox"]),displayKey:_n.string,checked:_n.bool.isRequired,correctness:_n.string,disabled:_n.bool.isRequired,feedback:_n.string,label:_n.string.isRequired,rationale:_n.string,onChange:_n.func.isRequired,value:_n.string.isRequired,className:_n.string,tagName:_n.string,hideTick:_n.bool,isEvaluateMode:_n.bool,choicesLayout:_n.oneOf(["vertical","grid","horizontal"]),isSelectionButtonBelow:_n.bool}}static __initStatic2(){this.defaultProps={rationale:null,checked:!1,isEvaluateMode:!1}}constructor(e){super(e),Wn.prototype.__init.call(this),this.onToggleChoice=this.onToggleChoice.bind(this),this.choiceId=this.generateChoiceId(),this.descId=`${this.choiceId}-desc`}onToggleChoice(e){this.props.onChange(e)}generateChoiceId(){return"choice-"+(1e4*Math.random()).toFixed()}__init(){this.handleKeyDown=e=>{const{choiceMode:t}=this.props;if("checkbox"!==t)return;const o="ArrowDown"===e.key,n="ArrowUp"===e.key;if(!o&&!n)return;e.preventDefault();const r=document.getElementById(this.choiceId);if(!r)return;const s=r.closest("fieldset");if(!s)return;const i=Array.from(s.querySelectorAll('input[type="checkbox"]')),a=i.findIndex(e=>e===r);if(-1===a)return;const c=i[o?a+1:a-1];c&&c.focus()}}render(){const{choiceMode:e,disabled:t,displayKey:o,feedback:n,label:r,correctness:s,className:i,rationale:a,hideTick:c,isEvaluateMode:l,choicesLayout:u,value:p,checked:h,tagName:d,isSelectionButtonBelow:g}=this.props,f="checkbox"===e?Un:Hn,m="checkbox"===e?"checkbox":"radio-button",b={..."horizontal"===u&&{[`& .${$n}`]:{padding:"8px",margin:"4px 0 4px 4px"}},...g&&"grid"!==u&&{"& > label":{alignItems:"flex-start"}},...g&&"grid"===u&&{justifyContent:"center","& > label":{alignItems:"center"}}},y="string"==typeof r&&(r.includes("<math")||r.includes("\\(")||r.includes("\\[")||r.includes("<img")||r.includes("data-latex")||r.includes("data-raw")||r.includes("<mjx-container")),v=o?An.createElement(Fn,{id:this.descId},y?`Pick the answer below, ${o}`:o):null,x=An.createElement(An.Fragment,null,o&&!g?An.createElement(Tn,{component:"span"},An.createElement("span",{"aria-hidden":"true"},o,"."," "),An.createElement(Rn,{className:"prompt-label",prompt:r,tagName:"span"})):An.createElement(Rn,{className:"prompt-label",prompt:r,tagName:"span"})),S={disabled:t,checked:h,correctness:s,tagName:d,value:p,id:this.choiceId,onChange:this.onToggleChoice,onKeyDown:this.handleKeyDown,...v?{"aria-describedby":this.descId}:{}},C=g?An.createElement(Mn,null,v,An.createElement(f,{...S,style:{padding:0}}),An.createElement("span",{"aria-hidden":"true"},o?`${o}.`:"")):An.createElement(An.Fragment,null,v,An.createElement(f,{...S,slotProps:{input:{ref:this.props.autoFocusRef}}}));return An.createElement("div",{className:Pn(i,"corespring-"+m,"choice-input")},An.createElement(Tn,null,!c&&l&&An.createElement(Cn,{correctness:s}),An.createElement(In,{className:"checkbox-holder",sx:b},An.createElement(Bn,{label:x,value:p,htmlFor:this.choiceId,labelPlacement:g?"top":void 0,control:C}))),a&&An.createElement(Rn,{className:"rationale",defaultClassName:"rationale",prompt:a}),An.createElement(Ln,{feedback:n,correctness:s}))}}Wn.__initStatic(),Wn.__initStatic2();const qn=e,Jn=r,{styled:Yn}=o,{Box:Gn}=n,Qn=Yn(Gn,{shouldForwardProp:e=>"noBorder"!==e&&"horizontalLayout"!==e})(({theme:e,noBorder:t,horizontalLayout:o})=>({paddingTop:e.spacing(2.5),paddingBottom:`calc(${e.spacing(1)} + 2px)`,paddingLeft:`calc(${e.spacing(1)} + 2px)`,paddingRight:`calc(${e.spacing(1)} + 2px)`,borderBottom:t?"none":`1px solid ${e.palette.grey[300]}`,...o&&{paddingRight:e.spacing(2.5),"& label":{marginRight:e.spacing(1)}}}));class Xn extends qn.Component{constructor(...e){super(...e),Xn.prototype.__init.call(this),Xn.prototype.__init2.call(this),Xn.prototype.__init3.call(this),Xn.prototype.__init4.call(this)}static __initStatic(){this.propTypes={}}__init(){this.state={isHovered:!1}}__init2(){this.handleMouseEnter=()=>{const{disabled:e,checked:t}=this.props;e||t||this.setState({isHovered:!0})}}__init3(){this.handleMouseLeave=()=>{this.setState({isHovered:!1})}}__init4(){this.onChange=e=>{const{disabled:t,onChoiceChanged:o}=this.props;t||o(e)}}render(){const{choice:e,index:t,choicesLength:o,showCorrect:n,isEvaluateMode:r,choiceMode:s,disabled:i,checked:a,correctness:c,displayKey:l,choicesLayout:u,gridColumns:p,isSelectionButtonBelow:h,selectedAnswerBackgroundColor:d,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,hoverAnswerBackgroundColor:m,hoverAnswerStrokeColor:b,hoverAnswerStrokeWidth:y,autoFocusRef:v,tagName:x}=this.props,{isHovered:S}=this.state,C="choice"+(t===o-1?" last":""),k=!r||n?"":e.feedback,w={...e,checked:a,choiceMode:s,disabled:i,feedback:k,correctness:c,displayKey:l,index:t,choicesLayout:u,gridColumns:p,onChange:this.onChange,isEvaluateMode:r,isSelectionButtonBelow:h,selectedAnswerStrokeColor:g,selectedAnswerStrokeWidth:f,tagName:x},E=g&&"initial"!==g,O=b&&"initial"!==b;let A="transparent",_="2px",j="initial";(E||O)&&(a&&E?(A=g,_=f):S&&!i&&O&&(A=b,_=y)),a&&d&&"initial"!==d?j=d:S&&!i&&m&&"initial"!==m&&(j=m);const L=E||O,N=L?{border:`${(e=>{if(!e)return"2px";const t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t})(_)} solid ${A}`,borderRadius:"8px"}:{},R=t===o-1||"vertical"!==u||L,P="horizontal"===u,$="initial"!==j?j:"initial";return qn.createElement("div",{className:C,key:t,style:{backgroundColor:$,...N},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},qn.createElement(Qn,{component:"div",noBorder:R,horizontalLayout:P},qn.createElement(Wn,{...w,autoFocusRef:v})))}}Xn.__initStatic(),Xn.propTypes={choiceMode:Jn.oneOf(["radio","checkbox"]),choice:Jn.object,disabled:Jn.bool.isRequired,onChoiceChanged:Jn.func,index:Jn.number,choicesLength:Jn.number,showCorrect:Jn.bool,isEvaluateMode:Jn.bool,checked:Jn.bool,correctness:Jn.string,displayKey:Jn.string,choicesLayout:Jn.oneOf(["vertical","grid","horizontal"]),gridColumns:Jn.string,selectedAnswerBackgroundColor:Jn.string,selectedAnswerStrokeColor:Jn.string,selectedAnswerStrokeWidth:Jn.string,hoverAnswerBackgroundColor:Jn.string,hoverAnswerStrokeColor:Jn.string,hoverAnswerStrokeWidth:Jn.string,tagName:Jn.string,isSelectionButtonBelow:Jn.bool,autoFocusRef:Jn.object};const Zn=e,er=r,tr=a,or=i,{styled:nr}=o,{Box:rr}=n,{color:sr}=s,{Collapsible:ir}=s,{PreviewPrompt:ar}=s;const{translator:cr}=Po,lr=nr(rr)({color:sr.text(),backgroundColor:sr.background(),"& *":{"-webkit-font-smoothing":"antialiased"},position:"relative","& legend":{border:"none !important"}}),ur=nr("h2")(({theme:e})=>({display:"block",fontSize:"inherit",margin:"0",fontWeight:"normal",paddingBottom:e.spacing(2)})),pr=nr(rr)(({theme:e})=>({marginBottom:e.spacing(2)})),hr=nr(rr)({display:"flex",flexDirection:"row",flexWrap:"wrap"}),dr=nr(rr)({display:"grid"}),gr=nr("fieldset")({border:"0px",padding:"0.01em 0 0 0",margin:"0px",minWidth:"0px","&:focus":{outline:"none"}}),fr=nr("h3")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}),mr=nr("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(1)}));class br extends Zn.Component{static __initStatic(){this.propTypes={className:er.string,mode:er.oneOf(["gather","view","evaluate"]),choiceMode:er.oneOf(["radio","checkbox"]),keyMode:er.oneOf(["numbers","letters","none"]),choices:er.array,partLabel:er.string,prompt:er.string,teacherInstructions:er.string,session:er.object,disabled:er.bool,onChoiceChanged:er.func,responseCorrect:er.bool,correctResponse:er.array,choicesLayout:er.oneOf(["vertical","grid","horizontal"]),gridColumns:er.string,alwaysShowCorrect:er.bool,animationsDisabled:er.bool,language:er.string,selectedAnswerBackgroundColor:er.string,selectedAnswerStrokeColor:er.string,selectedAnswerStrokeWidth:er.string,hoverAnswerBackgroundColor:er.string,hoverAnswerStrokeColor:er.string,hoverAnswerStrokeWidth:er.string,onShowCorrectToggle:er.func,isSelectionButtonBelow:er.bool,minSelections:er.number,maxSelections:er.number,autoplayAudioEnabled:er.bool,customAudioButton:{playImage:er.string,pauseImage:er.string},options:er.object}}constructor(e){super(e),br.prototype.__init.call(this),br.prototype.__init2.call(this),br.prototype.__init3.call(this),br.prototype.__init4.call(this),this.state={showCorrect:this.props.options&&this.props.alwaysShowCorrect||!1,maxSelectionsErrorState:!1},this.onToggle=this.onToggle.bind(this),this.firstInputRef=Zn.createRef()}isSelected(e){const t=this.props.session&&this.props.session.value;return t&&t.indexOf&&t.indexOf(e)>=0}__init(){this.handleChange=e=>{const{value:t,checked:o}=e.target,{maxSelections:n,onChoiceChanged:r,session:s}=this.props;s.value&&s.value.length>=n&&(this.setState({maxSelectionsErrorState:o}),o)||r({value:t,selected:o,selector:"Mouse"})}}__init2(){this.onToggle=()=>{"evaluate"===this.props.mode&&this.setState({showCorrect:!this.state.showCorrect},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}}UNSAFE_componentWillReceiveProps(e){e.correctResponse||!1===this.state.showCorrect||this.setState({showCorrect:!1},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()}),e.options&&e.alwaysShowCorrect&&!0!==this.state.showCorrect&&this.setState({showCorrect:!0},()=>{this.props.onShowCorrectToggle&&this.props.onShowCorrectToggle()})}indexToSymbol(e){return"numbers"===this.props.keyMode?`${e+1}`:"letters"===this.props.keyMode?String.fromCharCode(97+e).toUpperCase():""}__init3(){this.getCorrectness=(e={})=>{const t=e.correct,o=this.isSelected(e.value);return this.state.showCorrect?t?"correct":void 0:t?o?"correct":"incorrect":o?"incorrect":void 0}}getChecked(e){if(this.props.options&&this.props.alwaysShowCorrect)return e.correct||!1;return this.state.showCorrect&&"evaluate"===this.props.mode?e.correct||!1:this.isSelected(e.value)}renderHeading(){const{mode:e,choiceMode:t}=this.props;return"gather"!==e?null:"radio"===t?Zn.createElement(fr,null,"Multiple Choice Question"):Zn.createElement(fr,null,"Multiple Select Question")}__init4(){this.handleGroupFocus=e=>{const t=e.currentTarget,o=document.activeElement;t.contains(o)&&o!==t||(!e.relatedTarget||t.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_PRECEDING)&&function(e){let t,o=e[0],n=1;for(;n<e.length;){const r=e[n],s=e[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==o)return;"access"===r||"optionalAccess"===r?(t=o,o=s(o)):"call"!==r&&"optionalCall"!==r||(o=s((...e)=>o.call(t,...e)),t=void 0)}return o}([this,"access",e=>e.firstInputRef,"optionalAccess",e=>e.current])&&this.firstInputRef.current.focus()}}render(){const{mode:e,disabled:t,className:o,choices:n=[],choiceMode:r,gridColumns:s,partLabel:i,prompt:a,responseCorrect:c,teacherInstructions:l,alwaysShowCorrect:u,animationsDisabled:p,language:h,isSelectionButtonBelow:d,minSelections:g,maxSelections:f,autoplayAudioEnabled:m,session:b,customAudioButton:y,options:v}=this.props,{showCorrect:x,maxSelectionsErrorState:S}=this.state,C="evaluate"===e,k=C&&!c,w=s>1?{gridTemplateColumns:`repeat(${s}, 1fr)`}:void 0,E=b.value&&b.value.length||0,O=Zn.createElement(ar,{tagName:"div",className:"prompt",defaultClassName:"teacher-instructions",prompt:l}),A="grid"===this.props.choicesLayout?dr:"horizontal"===this.props.choicesLayout?hr:rr;return Zn.createElement(lr,{id:"main-container",className:or(o,"multiple-choice")},i&&Zn.createElement(ur,null,i),this.renderHeading(),l&&Zn.createElement(pr,null,p?O:Zn.createElement(ir,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},O)),Zn.createElement(gr,{tabIndex:0,onFocus:this.handleGroupFocus,role:"radio"===r?"radiogroup":"group"},Zn.createElement(ar,{className:"prompt",defaultClassName:"prompt",prompt:a,tagName:"legend",autoplayAudioEnabled:m,customAudioButton:y}),!(v&&u)&&Zn.createElement(tr,{show:k,toggled:x,onToggle:this.onToggle.bind(this),language:h}),Zn.createElement(A,{style:w},n.map((e,o)=>Zn.createElement(Xn,{autoFocusRef:0===o?this.firstInputRef:null,choicesLayout:this.props.choicesLayout,selectedAnswerBackgroundColor:this.props.selectedAnswerBackgroundColor,selectedAnswerStrokeColor:this.props.selectedAnswerStrokeColor,selectedAnswerStrokeWidth:this.props.selectedAnswerStrokeWidth,hoverAnswerBackgroundColor:this.props.hoverAnswerBackgroundColor,hoverAnswerStrokeColor:this.props.hoverAnswerStrokeColor,hoverAnswerStrokeWidth:this.props.hoverAnswerStrokeWidth,gridColumns:s,key:`choice-${o}`,choice:e,index:o,choicesLength:n.length,showCorrect:x,isEvaluateMode:C,choiceMode:r,disabled:t,tagName:i?`group-${i}`:"group",onChoiceChanged:this.handleChange,hideTick:e.hideTick,checked:this.getChecked(e),correctness:C?this.getCorrectness(e):void 0,displayKey:this.indexToSymbol(o),isSelectionButtonBelow:d})))),"checkbox"===r&&E<g&&Zn.createElement(mr,null,g&&f?g===f?cr.t("translation:multipleChoice:minmaxSelections_equal",{lng:h,minSelections:g}):cr.t("translation:multipleChoice:minmaxSelections_range",{lng:h,minSelections:g,maxSelections:f}):g?cr.t("translation:multipleChoice:minSelections",{lng:h,minSelections:g}):""),"checkbox"===r&&S&&Zn.createElement(mr,null,cr.t("translation:multipleChoice:maxSelections_"+(1===f?"one":"other"),{lng:h,maxSelections:f})))}}br.__initStatic(),br.defaultProps={session:{value:[]}};const yr=e,vr=r,{PreviewLayout:xr}=s;class Sr extends yr.Component{static __initStatic(){this.propTypes={model:vr.object,session:vr.object,options:vr.object,onChoiceChanged:vr.func,onShowCorrectToggle:vr.func,extraCSSRules:vr.shape({names:vr.arrayOf(vr.string),rules:vr.string})}}static __initStatic2(){this.defaultProps={model:{},session:{}}}render(){const{model:e,onChoiceChanged:t,session:o,onShowCorrectToggle:n,options:r}=this.props,{extraCSSRules:s,fontSizeFactor:i}=e;return yr.createElement(xr,{extraCSSRules:s,fontSizeFactor:i,classes:{}},yr.createElement(br,{...e,options:r,session:o,onChoiceChanged:t,onShowCorrectToggle:n}))}}Sr.__initStatic(),Sr.__initStatic2();const Cr=e,{createRoot:kr}=l,wr=c,{renderMath:Er}=u,Or=wr("pie-element:multiple-choice:print"),Ar=(e,t)=>{const o="instructor"===t.role;e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=o&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.showTeacherInstructions=o,e.alwaysShowCorrect=o,e.mode=o?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e.lockChoiceOrder=!0,e.choicesLayout=e.choicesLayout||"vertical";const n=Tt(e.choices,5);return e.choices=n.map(t=>(t.rationale=o&&!1!==e.rationaleEnabled?t.rationale:void 0,t.hideTick=o,t.feedback=void 0,t)),e.keyMode=e.choicePrefix||"letters",e};class _r extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Bt(()=>{if(this._model&&this._session){const e=Ar(this._model,this._options),t=this._options&&Cr.createElement(Sr,{model:e,session:{},options:this._options});this._root||(this._root=kr(this)),this._root.render(t),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Or("render complete - render math"),Er(this)})})}else Or("skip")},50,{leading:!1,trailing:!0})}set options(e){this._options=e}set model(e){this._model=e,this._rerender()}connectedCallback(){}disconnectedCallback(){this._root&&this._root.unmount()}}export{_r as default};