@pie-element/explicit-constructed-response 11.1.2-next.2 → 11.1.2
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/CHANGELOG.json +1102 -0
- package/CHANGELOG.md +2194 -0
- package/LICENSE.md +5 -0
- package/README.md +1 -0
- package/configure/CHANGELOG.json +652 -0
- package/configure/CHANGELOG.md +1935 -0
- package/configure/lib/alternateResponses.js +199 -0
- package/configure/lib/alternateResponses.js.map +1 -0
- package/configure/lib/alternateSection.js +329 -0
- package/configure/lib/alternateSection.js.map +1 -0
- package/configure/lib/defaults.js +184 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/ecr-toolbar.js +181 -0
- package/configure/lib/ecr-toolbar.js.map +1 -0
- package/configure/lib/index.js +161 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +501 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/lib/markupUtils.js +70 -0
- package/configure/lib/markupUtils.js.map +1 -0
- package/configure/lib/utils.js +15 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +22 -0
- package/controller/CHANGELOG.json +517 -0
- package/controller/CHANGELOG.md +1344 -0
- package/controller/lib/defaults.js +23 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +368 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/package.json +18 -0
- package/docs/config-schema.json +2629 -0
- package/docs/config-schema.json.md +1941 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +20 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +10 -0
- package/docs/pie-schema.json +1130 -0
- package/docs/pie-schema.json.md +814 -0
- package/lib/index.js +91 -0
- package/lib/index.js.map +1 -0
- package/lib/main.js +205 -0
- package/lib/main.js.map +1 -0
- package/lib/print.js +71 -0
- package/lib/print.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +6534 -0
- package/module/demo.js +45 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +18 -0
- package/module/print-demo.js +83 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +25 -92
- package/configure.js +0 -2
- package/controller.js +0 -1
- package/dist/_virtual/_rolldown/runtime.js +0 -4
- package/dist/author/alternateResponses.d.ts +0 -34
- package/dist/author/alternateResponses.js +0 -113
- package/dist/author/alternateSection.d.ts +0 -58
- package/dist/author/alternateSection.js +0 -213
- package/dist/author/defaults.d.ts +0 -186
- package/dist/author/defaults.js +0 -128
- package/dist/author/ecr-toolbar.d.ts +0 -41
- package/dist/author/ecr-toolbar.js +0 -100
- package/dist/author/index.d.ts +0 -42
- package/dist/author/index.js +0 -96
- package/dist/author/main.d.ts +0 -38
- package/dist/author/main.js +0 -291
- package/dist/author/markupUtils.d.ts +0 -14
- package/dist/author/markupUtils.js +0 -13
- package/dist/author/utils.d.ts +0 -9
- package/dist/author/utils.js +0 -7
- package/dist/browser/author/index.js +0 -3378
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/browser-BC3WygxE.js +0 -360
- package/dist/browser/browser-BC3WygxE.js.map +0 -1
- package/dist/browser/controller/index.js +0 -4152
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -96
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/dist-B5QyKMGD.js +0 -45663
- package/dist/browser/dist-B5QyKMGD.js.map +0 -1
- package/dist/browser/dist-D9ARZhQk.js +0 -1426
- package/dist/browser/dist-D9ARZhQk.js.map +0 -1
- package/dist/browser/explicit-constructed-response.css +0 -2
- package/dist/browser/main-Czk7a-Zt.js +0 -959
- package/dist/browser/main-Czk7a-Zt.js.map +0 -1
- package/dist/browser/print/index.js +0 -40
- package/dist/browser/print/index.js.map +0 -1
- package/dist/controller/defaults.d.ts +0 -25
- package/dist/controller/defaults.js +0 -19
- package/dist/controller/index.d.ts +0 -64
- package/dist/controller/index.js +0 -139
- package/dist/delivery/index.d.ts +0 -20
- package/dist/delivery/index.js +0 -66
- package/dist/delivery/main.d.ts +0 -48
- package/dist/delivery/main.js +0 -115
- package/dist/explicit-constructed-response.css +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -393
- package/dist/index.js +0 -2
- package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +0 -3993
- package/dist/print/index.d.ts +0 -15
- package/dist/print/index.js +0 -40
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -12
package/module/print.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_dll_debug as e,_dll_react as t,_dll_prop_types as n,_dll_mui__material_styles as r,_dll_react_dom as o,_dll_mui__material as i,_dll_pie_lib__render_ui as a,_dll_mui__material_colors as s,_dll_classnames as l,_dll_mui__icons_material as c,_dll_pie_lib__correct_answer_toggle as u,_dll_react_dom_client as d}from"../../../@pie-lib/shared-module@^5.2.4/module/index.js";import{_dll_pie_lib__math_rendering as p}from"../../../@pie-lib/math-rendering-module@^5.0.9/module/index.js";import{_dll_pie_lib__drag as h}from"../../../@pie-lib/drag-module@^4.0.9/module/index.js";var g="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")(),v=m.Symbol,b=Object.prototype,y=b.hasOwnProperty,x=b.toString,w=v?v.toStringTag:void 0;var S=Object.prototype.toString;var C=v?v.toStringTag:void 0;function k(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?function(e){var t=y.call(e,w),n=e[w];try{e[w]=void 0;var r=!0}catch(e){}var o=x.call(e);return r&&(t?e[w]=n:delete e[w]),o}(e):function(e){return S.call(e)}(e)}function A(e){return null!=e&&"object"==typeof e}function O(e){return"symbol"==typeof e||A(e)&&"[object Symbol]"==k(e)}var R=Array.isArray,_=v?v.prototype:void 0,E=_?_.toString:void 0;function L(e){if("string"==typeof e)return e;if(R(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(e,L)+"";if(O(e))return E?E.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var j=/\s/;var D=/^\s+/;function N(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&j.test(e.charAt(t)););return t}(e)+1).replace(D,""):e}function P(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var T=/^[-+]0x[0-9a-f]+$/i,$=/^0b[01]+$/i,I=/^0o[0-7]+$/i,M=parseInt;function z(e){if("number"==typeof e)return e;if(O(e))return NaN;if(P(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=P(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=N(e);var n=$.test(e);return n||I.test(e)?M(e.slice(2),n?2:8):T.test(e)?NaN:+e}function F(e){return e}function W(e){if(!P(e))return!1;var t=k(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var B,H=m["__core-js_shared__"],V=(B=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"";var U=Function.prototype.toString;function K(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var q=/^\[object .+?Constructor\]$/,Y=Function.prototype,J=Object.prototype,X=Y.toString,Q=J.hasOwnProperty,G=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z(e){return!(!P(e)||(t=e,V&&V in t))&&(W(e)?G:q).test(K(e));var t}function ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Z(n)?n:void 0}var te=ee(m,"WeakMap"),ne=/^(?:0|[1-9]\d*)$/;function re(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ne.test(e))&&e>-1&&e%1==0&&e<t}function oe(e,t){return e===t||e!=e&&t!=t}function ie(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ae(e){return null!=e&&ie(e.length)&&!W(e)}var se=Object.prototype;function le(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||se)}function ce(e){return A(e)&&"[object Arguments]"==k(e)}var ue=Object.prototype,de=ue.hasOwnProperty,pe=ue.propertyIsEnumerable,he=ce(function(){return arguments}())?ce:function(e){return A(e)&&de.call(e,"callee")&&!pe.call(e,"callee")};var ge="object"==typeof exports&&exports&&!exports.nodeType&&exports,fe=ge&&"object"==typeof module&&module&&!module.nodeType&&module,me=fe&&fe.exports===ge?m.Buffer:void 0,ve=(me?me.isBuffer:void 0)||function(){return!1},be={};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 ye,xe="object"==typeof exports&&exports&&!exports.nodeType&&exports,we=xe&&"object"==typeof module&&module&&!module.nodeType&&module,Se=we&&we.exports===xe&&g.process,Ce=function(){try{var e=we&&we.require&&we.require("util").types;return e||Se&&Se.binding&&Se.binding("util")}catch(e){}}(),ke=Ce&&Ce.isTypedArray,Ae=ke?(ye=ke,function(e){return ye(e)}):function(e){return A(e)&&ie(e.length)&&!!be[k(e)]},Oe=Object.prototype.hasOwnProperty;function Re(e,t){var n=R(e),r=!n&&he(e),o=!n&&!r&&ve(e),i=!n&&!r&&!o&&Ae(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!Oe.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||re(c,l))||s.push(c);return s}var _e=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Ee=_e,Le=Object.prototype.hasOwnProperty;function je(e){if(!le(e))return Ee(e);var t=[];for(var n in Object(e))Le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function De(e){return ae(e)?Re(e):je(e)}var Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/;function Te(e,t){if(R(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!O(e))||(Pe.test(e)||!Ne.test(e)||null!=t&&e in Object(t))}var $e=ee(Object,"create");var Ie=Object.prototype.hasOwnProperty;var Me=Object.prototype.hasOwnProperty;function ze(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(e,t){for(var n=e.length;n--;)if(oe(e[n][0],t))return n;return-1}ze.prototype.clear=function(){this.__data__=$e?$e(null):{},this.size=0},ze.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ze.prototype.get=function(e){var t=this.__data__;if($e){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ie.call(t,e)?t[e]:void 0},ze.prototype.has=function(e){var t=this.__data__;return $e?void 0!==t[e]:Me.call(t,e)},ze.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$e&&void 0===t?"__lodash_hash_undefined__":t,this};var We=Array.prototype.splice;function Be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.__data__=[],this.size=0},Be.prototype.delete=function(e){var t=this.__data__,n=Fe(t,e);return!(n<0)&&(n==t.length-1?t.pop():We.call(t,n,1),--this.size,!0)},Be.prototype.get=function(e){var t=this.__data__,n=Fe(t,e);return n<0?void 0:t[n][1]},Be.prototype.has=function(e){return Fe(this.__data__,e)>-1},Be.prototype.set=function(e,t){var n=this.__data__,r=Fe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var He=ee(m,"Map");function Ve(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Ue(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ue.prototype.clear=function(){this.size=0,this.__data__={hash:new ze,map:new(He||Be),string:new ze}},Ue.prototype.delete=function(e){var t=Ve(this,e).delete(e);return this.size-=t?1:0,t},Ue.prototype.get=function(e){return Ve(this,e).get(e)},Ue.prototype.has=function(e){return Ve(this,e).has(e)},Ue.prototype.set=function(e,t){var n=Ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ke(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ke.Cache||Ue),n}Ke.Cache=Ue;var qe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ye=/\\(\\)?/g,Je=function(e){var t=Ke(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(qe,function(e,n,r,o){t.push(r?o.replace(Ye,"$1"):n||e)}),t}),Xe=Je;function Qe(e,t){return R(e)?e:Te(e,t)?[e]:Xe(function(e){return null==e?"":L(e)}(e))}function Ge(e){if("string"==typeof e||O(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ze(e,t){for(var n=0,r=(t=Qe(t,e)).length;null!=e&&n<r;)e=e[Ge(t[n++])];return n&&n==r?e:void 0}function et(e,t,n){var r=null==e?void 0:Ze(e,t);return void 0===r?n:r}function tt(e){var t=this.__data__=new Be(e);this.size=t.size}tt.prototype.clear=function(){this.__data__=new Be,this.size=0},tt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},tt.prototype.get=function(e){return this.__data__.get(e)},tt.prototype.has=function(e){return this.__data__.has(e)},tt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Be){var r=n.__data__;if(!He||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ue(r)}return n.set(e,t),this.size=n.size,this};var nt=Object.prototype.propertyIsEnumerable,rt=Object.getOwnPropertySymbols,ot=rt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(rt(e),function(t){return nt.call(e,t)}))}:function(){return[]};function it(e){return function(e,t,n){var r=t(e);return R(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,De,ot)}var at=ee(m,"DataView"),st=ee(m,"Promise"),lt=ee(m,"Set"),ct="[object Map]",ut="[object Promise]",dt="[object Set]",pt="[object WeakMap]",ht="[object DataView]",gt=K(at),ft=K(He),mt=K(st),vt=K(lt),bt=K(te),yt=k;(at&&yt(new at(new ArrayBuffer(1)))!=ht||He&&yt(new He)!=ct||st&&yt(st.resolve())!=ut||lt&&yt(new lt)!=dt||te&&yt(new te)!=pt)&&(yt=function(e){var t=k(e),n="[object Object]"==t?e.constructor:void 0,r=n?K(n):"";if(r)switch(r){case gt:return ht;case ft:return ct;case mt:return ut;case vt:return dt;case bt:return pt}return t});var xt=yt,wt=m.Uint8Array;function St(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ue;++t<n;)this.add(e[t])}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function kt(e,t){return e.has(t)}St.prototype.add=St.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},St.prototype.has=function(e){return this.__data__.has(e)};function At(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,h=2&n?new St:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var g=e[d],f=t[d];if(r)var m=a?r(f,g,d,t,e,i):r(g,f,d,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Ct(t,function(e,t){if(!kt(h,t)&&(g===e||o(g,e,n,r,i)))return h.push(t)})){p=!1;break}}else if(g!==f&&!o(g,f,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function Ot(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Rt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var _t=v?v.prototype:void 0,Et=_t?_t.valueOf:void 0;var Lt=Object.prototype.hasOwnProperty;var jt="[object Arguments]",Dt="[object Array]",Nt="[object Object]",Pt=Object.prototype.hasOwnProperty;function Tt(e,t,n,r,o,i){var a=R(e),s=R(t),l=a?Dt:xt(e),c=s?Dt:xt(t),u=(l=l==jt?Nt:l)==Nt,d=(c=c==jt?Nt:c)==Nt,p=l==c;if(p&&ve(e)){if(!ve(t))return!1;a=!0,u=!1}if(p&&!u)return i||(i=new tt),a||Ae(e)?At(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new wt(e),new wt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return oe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ot;case"[object Set]":var l=1&r;if(s||(s=Rt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=At(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(Et)return Et.call(e)==Et.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var h=u&&Pt.call(e,"__wrapped__"),g=d&&Pt.call(t,"__wrapped__");if(h||g){var f=h?e.value():e,m=g?t.value():t;return i||(i=new tt),o(f,m,n,r,i)}}return!!p&&(i||(i=new tt),function(e,t,n,r,o,i){var a=1&n,s=it(e),l=s.length;if(l!=it(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Lt.call(t,u)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var h=!0;i.set(e,t),i.set(t,e);for(var g=a;++c<l;){var f=e[u=s[c]],m=t[u];if(r)var v=a?r(m,f,u,t,e,i):r(f,m,u,e,t,i);if(!(void 0===v?f===m||o(f,m,n,r,i):v)){h=!1;break}g||(g="constructor"==u)}if(h&&!g){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}function $t(e,t,n,r,o){return e===t||(null==e||null==t||!A(e)&&!A(t)?e!=e&&t!=t:Tt(e,t,n,r,$t,o))}function It(e){return e==e&&!P(e)}function Mt(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function zt(e){var t=function(e){for(var t=De(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,It(o)]}return t}(e);return 1==t.length&&t[0][2]?Mt(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new tt;if(r)var p=r(c,u,l,e,t,d);if(!(void 0===p?$t(u,c,3,r,d):p))return!1}}return!0}(n,e,t)}}function Ft(e,t){return null!=e&&t in Object(e)}function Wt(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Qe(t,e)).length,i=!1;++r<o;){var a=Ge(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&ie(o)&&re(a,o)&&(R(e)||he(e))}(e,t,Ft)}function Bt(e){return Te(e)?function(e){return function(t){return null==t?void 0:t[e]}}(Ge(e)):function(e){return function(t){return Ze(t,e)}}(e)}function Ht(e){return"function"==typeof e?e:null==e?F:"object"==typeof e?R(e)?(t=e[0],n=e[1],Te(t)&&It(n)?Mt(Ge(t),n):function(e){var r=et(e,t);return void 0===r&&r===n?Wt(e,t):$t(n,r,3)}):zt(e):Bt(e);var t,n}var Vt,Ut=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[Vt?a:++r];if(!1===t(o[s],s,o))break}return e},Kt=Ut;function qt(e,t){return e&&Kt(e,t,De)}var Yt=function(){return m.Date.now()},Jt=Math.max,Xt=Math.min;function Qt(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function f(){var e=Yt();if(g(e))return m(e);s=setTimeout(f,function(e){var n=t-(e-l);return d?Xt(n,i-(e-c)):n}(e))}function m(e){return s=void 0,p&&r?h(e):(r=o=void 0,a)}function v(){var e=Yt(),n=g(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(f,t),u?h(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(f,t),h(l)}return void 0===s&&(s=setTimeout(f,t)),a}return t=z(t)||0,P(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Jt(z(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},v.flush=function(){return void 0===s?a:m(Yt())},v}var Gt=Object.prototype.hasOwnProperty;var Zt,en,tn,nn={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(e,t){return[t+"box-flex"]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1},rn={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1},on=function(e){return e.length?e.charAt(0).toUpperCase()+e.substring(1):e},an=on,sn=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,ln="undefined"==typeof document?{}:document.documentElement.style,cn=(Zt=function(){for(var e in ln)if(sn.test(e))return e.match(sn)[0];return"WebkitOpacity"in ln?"Webkit":"KhtmlOpacity"in ln?"Khtml":""}(),en=Zt.toLowerCase(),{style:Zt,css:"-"+en+"-",dom:{Webkit:"WebKit",ms:"MS",o:"WebKit"}[Zt]||an(Zt)}),un=function(e,t){return t?t.toUpperCase():""},dn=/[-\s]+(.)?/g,pn=function(e){return e?e.replace(dn,un):""},hn=/::/g,gn=/([A-Z]+)([A-Z][a-z])/g,fn=/([a-z\d])([A-Z])/g,mn=/_/g,vn=function(e,t){return e?e.replace(hn,"/").replace(gn,"$1_$2").replace(fn,"$1_$2").replace(mn,t||"-"):""},bn=function(e){return vn(e).toLowerCase()},yn=pn,xn=bn,wn=function(e){return e.length?e.charAt(0).toLowerCase()+e.substring(1):e},Sn=on,Cn=cn,kn=nn,An="undefined"==typeof document?{}:document.documentElement.style,On=function(e,t){t=t||{};var n=wn(yn(e)),r=xn(e),o=tn?n:r,i=Cn.style?tn?Cn.style:Cn.css:"";if(n in An)return t.asString?o:[o];var a=o,s=kn[r],l=[];if(tn&&(a=Sn(o)),"function"==typeof s){var c=s(o,i)||[];c&&!Array.isArray(c)&&(c=[c]),c.length&&(c=c.map(function(e){return tn?wn(yn(e)):xn(e)})),l=l.concat(c)}return i&&l.push(i+a),l.push(o),t.asString||1==l.length?l[0]:l},Rn=Object.prototype.hasOwnProperty,_n=function(e,t){return Rn.call(e,t)},En=Object.prototype.toString,Ln=Object.prototype.toString,jn=On,Dn=bn,Nn=pn,Pn=_n,Tn=function(e){return!!e&&"[object Object]"===En.call(e)},$n=function(e){return"[object Function]"===Ln.apply(e)},In=function(e,t,n,r){jn(t).forEach(function(t){e[r?r(t):t]=n})},Mn={cssUnitless:rn},zn=function(e,t,n,r){"string"==typeof e&&(e=function(e){e=(e||"").split(";");var t={};return e.forEach(function(e){var n=e.split(":");2==n.length&&(t[n[0].trim()]=n[1].trim())}),t}(e)),(t=t||Mn).cssUnitless=t.cssUnitless||Mn.cssUnitless,r=r||{};var o,i,a,s,l,c,u,d,p=t.scope||{},h=null!=t.addUnits?t.addUnits:!p||null==p.addUnits||p.addUnits,g=(null!=t.cssUnitless?t.cssUnitless:p?p.cssUnitless:null)||{},f=(t.cssUnit||p?p.cssUnit:null)||"px",m=t.prefixProperties||(p?p.prefixProperties:null)||{},v=t.camelize?Nn:Dn;for(a in e)if(Pn(e,a)){if(s=e[a],i=Dn(n?n+a:a),o=!1,d=!1,$n(s)&&(u=s.call(p||e,s,a,i,e),Tn(u)&&null!=u.value?(s=u.value,d=u.prefix,i=u.name?Dn(u.name):i):s=u),c="number"==(l=typeof s)||"string"==l&&""!=s&&1*s==s,null==s||null==i||""===i)continue;if((c||"string"==l)&&(o=!0),!o&&null!=s.value&&s.prefix&&(o=!0,d=s.prefix,s=s.value),o){if(d=d||!!m[i],c&&(s=h&&!(i in g)?s+f:s+""),"border"!=i&&(i.indexOf("border")||~i.indexOf("radius")||~i.indexOf("width"))||!c||(i+="-width"),!i.indexOf("border-radius-")&&(i.replace(/border(-radius)(-(.*))/,function(e,t,n){var r={"-top":["-top-left","-top-right"],"-left":["-top-left","-bottom-left"],"-right":["-top-right","-bottom-right"],"-bottom":["-bottom-left","-bottom-right"]};n in r?(i=[],r[n].forEach(function(e){i.push("border"+e+t)})):i="border"+n+t}),Array.isArray(i))){i.forEach(function(e){d?In(r,e,s,v):r[v(e)]=s});continue}d?In(r,i,s,v):r[v(i)]=s}else zn(s,t,i+"-",r)}return r},Fn=zn,Wn=_n,Bn={prefixProperties:nn,cssUnitless:rn,object:zn,string:function(e,t){e=Fn(e,t);var n,r=[];for(n in e)Wn(e,n)&&r.push(n+": "+e[n]);return r.join("; ")}};const Hn=e("@pie-lib:mask-markup:serialization"),Vn=["span"],Un=["em","strong","u"],Kn=(e,t)=>{const n=e.getAttribute(t);return r=(e=>{const t=/([\w-]*)\s*:\s*([^;]*)/g;let n;const r={};for(;n=t.exec(e);)r[n[1]]=n[2].trim();return r})(n),Bn.object(r,{camelize:!0,addUnits:!1});var r},qn=["border","class","style"],Yn={b:"bold",em:"italic",u:"underline",s:"strikethrough",code:"code",strong:"strong"},Jn=(e,t=[])=>{if(8===e.nodeType)return null;if(3===e.nodeType){const n={text:e.textContent};return t.length>0&&(n.marks=t.map(e=>({type:e,data:void 0}))),{object:"text",leaves:[n]}}if(1===e.nodeType){const r=e.tagName.toLowerCase(),o=Yn[r];if(o){Hn("[deserialize] mark: ",o);return{_flatten:!0,nodes:Xn(e.childNodes,[...t,o])}}if("math"===r)return{isMath:!0,nodes:[e]};const i=(e=>{if(!e.attributes||e.attributes.length<=0)return;const t={};let n;for(n=0;n<e.attributes.length;n++){const r=e.attributes[n];t[r.name]=r.value}return t})(e)||{};"audio"===r&&""===i.controls&&(i.controls=!0);const a=qn.reduce((n=e,(e,t)=>{if(!n.getAttribute)return e;if(n.getAttribute(t))switch(t){case"style":e.style=Kn(n,t);break;case"class":e.className=((e,t,n)=>{const r=e.getAttribute(n);return delete t.class,r})(n,e,t);break;default:e[t]=n.getAttribute(t)}return e}),{...i}),s=(e=>Vn.includes(e)?"inline":Un.includes(e)?"mark":"block")(r),l=Xn(e.childNodes,t);return{object:s,type:r,data:{dataset:{...e.dataset},attributes:{...a}},nodes:l}}var n;return null},Xn=(e,t=[])=>{const n=[];for(let r=0;r<e.length;r++){const o=Jn(e[r],t);null!==o&&(o._flatten&&o.nodes?n.push(...o.nodes):n.push(o))}return n},Qn=t,Gn=n,{styled:Zn}=r,{renderMath:er}=p;const tr=Zn("div")(({theme:e})=>({paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5)})),nr=Zn("span")(()=>({display:"inline-block",width:".75em"})),rr=["tbody","tr"],or=(e,t,n,r,o,i)=>{if(!t)return null;const a=[];return(e.nodes||[]).forEach((e,i)=>{const s=e.type?`${e.type}-${i}`:`${i}`;if(e.isMath)return a.push(Qn.createElement("span",{dangerouslySetInnerHTML:{__html:`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`}})),a;if(r){const o=r(e,t,n);if(o){const t="blank"===function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}([e,"access",e=>e.data,"optionalAccess",e=>e.dataset,"optionalAccess",e=>e.component]);return t&&a.push(Qn.createElement(nr,{key:`spacer-${i}`})),a.push(o),void(t&&a.push(Qn.createElement(nr,{key:`spacer-${i}`})))}}if("text"===e.object){const t=e.leaves.reduce((e,t)=>{const n=t.text,r=((e,t)=>{const n=""===t.trim(),r=e&&e.type;return n&&rr.includes(r)?void 0:t})(o,n);return r?e+r:e},""),n=(e=>{const t=e.leaves.find(e=>et(e,"marks",[]).length);return t?t.marks[0]:null})(e);if(n){let e;for(e in Yn)if(Yn[e]===n.type){const n=e;a.push(Qn.createElement(n,{key:s},t));break}}else t.length>0&&a.push(t)}else{const o=or(e,t,n,r,e);if("p"===e.type||"paragraph"===e.type)a.push(Qn.createElement(tr,{key:s},o));else{const t=e.type;e.nodes&&e.nodes.length>0?a.push(Qn.createElement(t,{key:s,...e.data.attributes},o)):a.push(Qn.createElement(t,{key:s,...e.data.attributes}))}}}),a},ir=Zn("div")(()=>({display:"initial","&:not(.MathJax) table":{borderCollapse:"collapse"},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:"8px 12px",textAlign:"left"}}));class ar extends Qn.Component{constructor(e){super(e),ar.prototype.__init.call(this),this.internalContainerRef=Qn.createRef()}static __initStatic(){this.propTypes={renderChildren:Gn.func,layout:Gn.object,value:Gn.object,onChange:Gn.func,elementType:Gn.string,containerRef:Gn.oneOfType([Gn.func,Gn.shape({current:Gn.instanceOf(Element)})])}}componentDidMount(){const e=this.props.containerRef||this.internalContainerRef;e.current&&"function"==typeof er&&er(e.current)}__init(){this.handleChange=(e,t)=>{const n={...this.props.value,[e]:t};this.props.onChange(n)}}render(){const{value:e,layout:t,elementType:n,containerRef:r}=this.props,o=or(t,e,this.handleChange,this.props.renderChildren,null),i=r||this.internalContainerRef;return Qn.createElement(ir,{ref:i},o)}}ar.__initStatic();const sr=/\{\{(\d+)\}\}/g;const lr=t,cr=n;var ur;const dr=(e,t)=>{const{markup:n}=(o=t,(r=e)?{markup:r.replace(sr,(e,t)=>`<span data-component="${o}" data-id="${t}"></span>`)}:{markup:""});var r,o;return(e=>{if(!e||!e.trim())return{object:"value",document:{object:"document",data:{},nodes:[{object:"block",type:"span",data:{},isVoid:!1,nodes:[]}]}};const t=(new DOMParser).parseFromString(e,"text/html");let n=Xn(t.body.childNodes);return!n.some(e=>"block"===e.object||"inline"===e.object)&&n.length>0&&(n=[{object:"block",type:"span",data:{},isVoid:!1,nodes:n}]),0===n.length&&(n=[{object:"block",type:"span",data:{},isVoid:!1,nodes:[]}]),{object:"value",document:{object:"document",data:{},nodes:n}}})(n).document},pr=(e,t)=>((ur=class extends lr.Component{static __initStatic(){this.propTypes={markup:cr.string,layout:cr.object,value:cr.object,onChange:cr.func,customMarkMarkupComponent:cr.func,elementType:cr.string}}constructor(e){super(e),this.containerRef=lr.createRef()}componentDidUpdate(e){if(this.props.markup!==e.markup){const e=this.containerRef.current;(e&&e.querySelectorAll('[data-latex][data-math-handled="true"]')||[]).forEach(e=>{const t=e.querySelector("mjx-container");t&&e.removeChild(t);const n=e.getAttribute("data-raw");e.innerHTML=n,e.removeAttribute("data-math-handled")})}}render(){const{markup:n,layout:r,value:o,onChange:i,elementType:a}=this.props,s=r||dr(n,e);return lr.createElement(ar,{containerRef:this.containerRef,elementType:a,layout:s,value:o,onChange:i,renderChildren:t(this.props)})}}).__initStatic(),ur),{useMemo:hr}=t,{useLayoutEffect:gr}=t,{useEffect:fr}=t,{useRef:mr}=t,{useCallback:vr}=t,br="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function yr(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function xr(e){return"nodeType"in e}function wr(e){var t,n;return e?yr(e)?e:xr(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Sr(e){const{Document:t}=wr(e);return e instanceof t}function Cr(e){return!yr(e)&&e instanceof wr(e).HTMLElement}function kr(e){return e instanceof wr(e).SVGElement}function Ar(e){return e?yr(e)?e.document:xr(e)?Sr(e)?e:Cr(e)||kr(e)?e.ownerDocument:document:document:document}const Or=br?gr:fr;function Rr(e){const t=mr(e);return Or(()=>{t.current=e}),vr(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function _r(e,t){void 0===t&&(t=[e]);const n=mr(e);return Or(()=>{n.current!==e&&(n.current=e)},t),n}function Er(e,t){const n=mr();return hr(()=>{const t=e(n.current);return n.current=t,t},[...t])}function Lr(e){const t=Rr(e),n=mr(null),r=vr(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function jr(e){const t=mr();return fr(()=>{t.current=e},[e]),t.current}let Dr={};function Nr(e,t){return hr(()=>{if(t)return t;const n=null==Dr[e]?0:Dr[e]+1;return Dr[e]=n,e+"-"+n},[e,t])}function Pr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const Tr=Pr(1),$r=Pr(-1);function Ir(e){if(!e)return!1;const{KeyboardEvent:t}=wr(e.target);return t&&e instanceof t}function Mr(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=wr(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const zr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[zr.Translate.toString(e),zr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Fr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wr(e){return e.matches(Fr)?e:e.querySelector(Fr)}const Br=t,{useState:Hr}=t,{useCallback:Vr}=t,Ur={display:"none"};function Kr(e){let{id:t,value:n}=e;return Br.createElement("div",{id:t,style:Ur},n)}function qr(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return Br.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const Yr=t,{createContext:Jr}=t,{useContext:Xr}=t,{useEffect:Qr}=t,{useState:Gr}=t,{useCallback:Zr}=t,{useMemo:eo}=t,{useRef:to}=t,{memo:no}=t,{useReducer:ro}=t,{cloneElement:oo}=t,{forwardRef:io}=t,{createPortal:ao}=o,{unstable_batchedUpdates:so}=o,lo=Jr(null);const co={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},uo={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function po(e){let{announcements:t=uo,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=co}=e;const{announce:i,announcement:a}=function(){const[e,t]=Hr("");return{announce:Vr(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=Nr("DndLiveRegion"),[l,c]=Gr(!1);if(Qr(()=>{c(!0)},[]),function(e){const t=Xr(lo);Qr(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(eo(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}}),[i,t])),!l)return null;const u=Yr.createElement(Yr.Fragment,null,Yr.createElement(Kr,{id:r,value:o.draggable}),Yr.createElement(qr,{id:s,announcement:a}));return n?ao(u,n):u}var ho;function go(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(ho||(ho={}));const fo=Object.freeze({x:0,y:0});function mo(e,t){const n=Mr(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function vo(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function bo(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*s;return Number((o/(n+r-o)).toFixed(4))}return 0}const yo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=bo(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(vo)};function xo(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:fo}const wo=(So=1,function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((e,t)=>({...e,top:e.top+So*t.y,bottom:e.bottom+So*t.y,left:e.left+So*t.x,right:e.right+So*t.x}),{...e})});var So;function Co(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const ko={ignoreTransform:!1};function Ao(e,t){void 0===t&&(t=ko);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=wr(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=Co(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function Oo(e){return Ao(e,{ignoreTransform:!0})}function Ro(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(Sr(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Cr(o)||kr(o))return n;if(n.includes(o))return n;const i=wr(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=wr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=wr(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function _o(e){const[t]=Ro(e,1);return null!=t?t:null}function Eo(e){return br&&e?yr(e)?e:xr(e)?Sr(e)||e===Ar(e).scrollingElement?window:Cr(e)?e:null:null:null}function Lo(e){return yr(e)?e.scrollX:e.scrollLeft}function jo(e){return yr(e)?e.scrollY:e.scrollTop}function Do(e){return{x:Lo(e),y:jo(e)}}var No;function Po(e){return!(!br||!e)&&e===document.scrollingElement}function To(e){const t={x:0,y:0},n=Po(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(No||(No={}));const $o={x:.2,y:.2};function Io(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=$o);const{isTop:c,isBottom:u,isLeft:d,isRight:p}=To(e),h={x:0,y:0},g={x:0,y:0},f=t.height*o.y,m=t.width*o.x;return!c&&i<=t.top+f?(h.y=No.Backward,g.y=r*Math.abs((t.top+f-i)/f)):!u&&l>=t.bottom-f&&(h.y=No.Forward,g.y=r*Math.abs((t.bottom-f-l)/f)),!p&&s>=t.right-m?(h.x=No.Forward,g.x=r*Math.abs((t.right-m-s)/m)):!d&&a<=t.left+m&&(h.x=No.Backward,g.x=r*Math.abs((t.left+m-a)/m)),{direction:h,speed:g}}function Mo(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function zo(e){return e.reduce((e,t)=>Tr(e,Do(t)),fo)}function Fo(e,t){if(void 0===t&&(t=Ao),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);_o(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Wo=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Lo(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+jo(t),0)}]];class Bo{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Ro(t),r=zo(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of Wo)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ho{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Vo(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Uo,Ko;function qo(e){e.preventDefault()}function Yo(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Uo||(Uo={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ko||(Ko={}));const Jo={start:[Ko.Space,Ko.Enter],cancel:[Ko.Esc],end:[Ko.Space,Ko.Enter,Ko.Tab]},Xo=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ko.Right:return{...n,x:n.x+25};case Ko.Left:return{...n,x:n.x-25};case Ko.Down:return{...n,y:n.y+25};case Ko.Up:return{...n,y:n.y-25}}};class Qo{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Ho(Ar(t)),this.windowListeners=new Ho(wr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Uo.Resize,this.handleCancel),this.windowListeners.add(Uo.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Uo.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Fo(n),t(fo)}handleKeyDown(e){if(Ir(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Jo,coordinateGetter:i=Xo,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:fo;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=$r(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:p}=To(n),h=Mo(n),g={x:Math.min(o===Ko.Right?h.right-h.width/2:h.right,Math.max(o===Ko.Right?h.left:h.left+h.width/2,u.x)),y:Math.min(o===Ko.Down?h.bottom-h.height/2:h.bottom,Math.max(o===Ko.Down?h.top:h.top+h.height/2,u.y))},f=o===Ko.Right&&!s||o===Ko.Left&&!l,m=o===Ko.Down&&!c||o===Ko.Up&&!i;if(f&&g.x!==u.x){const e=n.scrollLeft+t.x,i=o===Ko.Right&&e<=d.x||o===Ko.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Ko.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(m&&g.y!==u.y){const e=n.scrollTop+t.y,i=o===Ko.Down&&e<=d.y||o===Ko.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Ko.Down?n.scrollTop-d.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,Tr($r(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Go(e){return Boolean(e&&"distance"in e)}function Zo(e){return Boolean(e&&"delay"in e)}Qo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Jo,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class ei{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=wr(e);return e instanceof t?e:Ar(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=Ar(i),this.documentListeners=new Ho(this.document),this.listeners=new Ho(n),this.windowListeners=new Ho(wr(i)),this.initialCoordinates=null!=(r=Mr(o))?r:fo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Uo.Resize,this.handleCancel),this.windowListeners.add(Uo.DragStart,qo),this.windowListeners.add(Uo.VisibilityChange,this.handleCancel),this.windowListeners.add(Uo.ContextMenu,qo),this.documentListeners.add(Uo.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Zo(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Go(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Uo.Click,Yo,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Uo.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=Mr(e))?t:fo,l=$r(r,s);if(!n&&a){if(Go(a)){if(null!=a.tolerance&&Vo(l,a.tolerance))return this.handleCancel();if(Vo(l,a.distance))return this.handleStart()}return Zo(a)&&Vo(l,a.tolerance)?this.handleCancel():void this.handlePending(a,l)}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ko.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ti={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ni extends ei{constructor(e){const{event:t}=e,n=Ar(t.target);super(e,ti,n)}}ni.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const ri={move:{name:"mousemove"},end:{name:"mouseup"}};var oi;!function(e){e[e.RightClick=2]="RightClick"}(oi||(oi={}));(class extends ei{constructor(e){super(e,ri,Ar(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==oi.RightClick&&(null==r||r({event:n}),!0)}}];const ii={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var ai,si;function li(e){let{acceleration:t,activator:n=ai.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=si.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:p}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=jr(t);return Er(e=>{if(n||!r||!e)return ci;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[No.Backward]:e.x[No.Backward]||-1===o.x,[No.Forward]:e.x[No.Forward]||1===o.x},y:{[No.Backward]:e.y[No.Backward]||-1===o.y,[No.Forward]:e.y[No.Forward]||1===o.y}}},[n,t,r])}({delta:d,disabled:!i}),[g,f]=function(){const e=mr(null);return[vr((t,n)=>{e.current=setInterval(t,n)},[]),vr(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=to({x:0,y:0}),v=to({x:0,y:0}),b=eo(()=>{switch(n){case ai.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ai.DraggableRect:return o}},[n,o,l]),y=to(null),x=Zr(()=>{const e=y.current;if(!e)return;const t=m.current.x*v.current.x,n=m.current.y*v.current.y;e.scrollBy(t,n)},[]),w=eo(()=>s===si.TreeOrder?[...c].reverse():c,[s,c]);Qr(()=>{if(i&&c.length&&b){for(const e of w){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=u[n];if(!o)continue;const{direction:i,speed:s}=Io(e,o,b,t,p);for(const e of["x","y"])h[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return f(),y.current=e,g(x,a),m.current=s,void(v.current=i)}m.current={x:0,y:0},v.current={x:0,y:0},f()}else f()},[t,x,r,f,i,a,JSON.stringify(b),JSON.stringify(h),g,c,w,u,JSON.stringify(p)])}(class extends ei{constructor(e){super(e,ii)}static setup(){return window.addEventListener(ii.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ii.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ai||(ai={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(si||(si={}));const ci={x:{[No.Backward]:!1,[No.Forward]:!1},y:{[No.Backward]:!1,[No.Forward]:!1}};var ui,di;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(ui||(ui={})),function(e){e.Optimized="optimized"}(di||(di={}));const pi=new Map;function hi(e,t){return Er(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function gi(e){let{callback:t,disabled:n}=e;const r=Rr(t),o=eo(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return Qr(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function fi(e){return new Bo(Ao(e),e)}function mi(e,t,n){void 0===t&&(t=fi);const[r,o]=Gr(null);function i(){o(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const a=function(e){let{callback:t,disabled:n}=e;const r=Rr(t),o=eo(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return Qr(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=gi({callback:i});return Or(()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())},[e]),r}const vi=[];function bi(e,t){void 0===t&&(t=[]);const n=to(null);return Qr(()=>{n.current=null},t),Qr(()=>{const t=e!==fo;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?$r(e,n.current):fo}function yi(e){return eo(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const xi=[];function wi(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Cr(t)?t:e}const Si=[{sensor:ni,options:{}},{sensor:Qo,options:{}}],Ci={current:{}},ki={draggable:{measure:Oo},droppable:{measure:Oo,strategy:ui.WhileDragging,frequency:di.Optimized},dragOverlay:{measure:Ao}};class Ai extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Oi={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ai,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:go},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ki,measureDroppableContainers:go,windowRect:null,measuringScheduled:!1},Ri={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:go,draggableNodes:new Map,over:null,measureDroppableContainers:go},_i=Jr(Ri),Ei=Jr(Oi);function Li(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ai}}}function ji(e,t){switch(t.type){case ho.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ho.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ho.DragEnd:case ho.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ho.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ai(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ho.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ai(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case ho.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ai(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Di(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=Xr(_i),i=jr(r),a=jr(null==n?void 0:n.id);return Qr(()=>{if(!t&&!r&&i&&null!=a){if(!Ir(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Wr(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}function Ni(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const Pi=Jr({...fo,scaleX:1,scaleY:1});var Ti;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ti||(Ti={})),no(function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:s=!0,children:l,sensors:c=Si,collisionDetection:u=yo,measuring:d,modifiers:p,...h}=e;const g=ro(ji,void 0,Li),[f,m]=g,[v,b]=function(){const[e]=Gr(()=>new Set),t=Zr(t=>(e.add(t),()=>e.delete(t)),[e]);return[Zr(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[y,x]=Gr(Ti.Uninitialized),w=y===Ti.Initialized,{draggable:{active:S,nodes:C,translate:k},droppable:{containers:A}}=f,O=null!=S?C.get(S):null,R=to({initial:null,translated:null}),_=eo(()=>{var e;return null!=S?{id:S,data:null!=(e=null==O?void 0:O.data)?e:Ci,rect:R}:null},[S,O]),E=to(null),[L,j]=Gr(null),[D,N]=Gr(null),P=_r(h,Object.values(h)),T=Nr("DndDescribedBy",i),$=eo(()=>A.getEnabled(),[A]),I=eo(()=>({draggable:{...ki.draggable,...null==M?void 0:M.draggable},droppable:{...ki.droppable,...null==M?void 0:M.droppable},dragOverlay:{...ki.dragOverlay,...null==M?void 0:M.dragOverlay}}),[null==(M=d)?void 0:M.draggable,null==M?void 0:M.droppable,null==M?void 0:M.dragOverlay]);var M;const{droppableRects:z,measureDroppableContainers:F,measuringScheduled:W}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=Gr(null),{frequency:s,measure:l,strategy:c}=o,u=to(e),d=function(){switch(c){case ui.Always:return!1;case ui.BeforeDragging:return n;default:return!n}}(),p=_r(d),h=Zr(function(e){void 0===e&&(e=[]),p.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),g=to(null),f=Er(t=>{if(d&&!n)return pi;if(!t||t===pi||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Bo(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,i,n,d,l]);return Qr(()=>{u.current=e},[e]),Qr(()=>{d||h()},[n,d]),Qr(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),Qr(()=>{d||"number"!=typeof s||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},s))},[s,d,h,...r]),{droppableRects:f,measureDroppableContainers:h,measuringScheduled:null!=i}}($,{dragging:w,dependencies:[k.x,k.y],config:I.droppable}),B=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return Er(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,S),H=eo(()=>D?Mr(D):null,[D]),V=function(){const e=!1===(null==L?void 0:L.autoScrollEnabled),t="object"==typeof s?!1===s.enabled:!1===s,n=w&&!e&&!t;if("object"==typeof s)return{...s,enabled:n};return{enabled:n}}(),U=function(e,t){return hi(e,t)}(B,I.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=to(!1),{x:a,y:s}="boolean"==typeof o?{x:o,y:o}:o;Or(()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=xo(n(e),r);if(a||(o.x=0),s||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=_o(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,a,s,r,n])}({activeNode:null!=S?C.get(S):null,config:V.layoutShiftCompensation,initialRect:U,measure:I.draggable.measure});const K=mi(B,I.draggable.measure,U),q=mi(B?B.parentElement:null),Y=to({activatorEvent:null,active:null,activeNode:B,collisionRect:null,collisions:null,droppableRects:z,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=A.getNodeFor(null==(t=Y.current.over)?void 0:t.id),X=function(e){let{measure:t}=e;const[n,r]=Gr(null),o=gi({callback:Zr(e=>{for(const{target:n}of e)if(Cr(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=Zr(e=>{const n=wi(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[a,s]=Lr(i);return eo(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}({measure:I.dragOverlay.measure}),Q=null!=(n=X.nodeRef.current)?n:B,G=w?null!=(r=X.rect)?r:K:null,Z=Boolean(X.nodeRef.current&&X.rect),ee=xo(te=Z?null:K,hi(te));var te;const ne=yi(Q?wr(Q):null),re=function(e){const t=to(e),n=Er(n=>e?n&&n!==vi&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ro(e):vi,[e]);return Qr(()=>{t.current=e},[e]),n}(w?null!=J?J:B:null),oe=function(e,t){void 0===t&&(t=Ao);const[n]=e,r=yi(n?wr(n):null),[o,i]=Gr(xi);function a(){i(()=>e.length?e.map(e=>Po(e)?r:new Bo(t(e),e)):xi)}const s=gi({callback:a});return Or(()=>{null==s||s.disconnect(),a(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(re),ie=Ni(p,{transform:{x:k.x-ee.x,y:k.y-ee.y,scaleX:1,scaleY:1},activatorEvent:D,active:_,activeNodeRect:K,containerNodeRect:q,draggingNodeRect:G,over:Y.current.over,overlayNodeRect:X.rect,scrollableAncestors:re,scrollableAncestorRects:oe,windowRect:ne}),ae=H?Tr(H,k):null,se=function(e){const[t,n]=Gr(null),r=to(e),o=Zr(e=>{const t=Eo(e.target);t&&n(e=>e?(e.set(t,Do(t)),new Map(e)):null)},[]);return Qr(()=>{const t=r.current;if(e!==t){i(t);const a=e.map(e=>{const t=Eo(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,Do(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Eo(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),eo(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Tr(e,t),fo):zo(e):fo,[e,t])}(re),le=bi(se),ce=bi(se,[K]),ue=Tr(ie,le),de=G?wo(G,ie):null,pe=_&&de?u({active:_,collisionRect:de,droppableRects:z,droppableContainers:$,pointerCoordinates:ae}):null,he=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(pe,"id"),[ge,fe]=Gr(null),me=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Z?ie:Tr(ie,ce),null!=(o=null==ge?void 0:ge.rect)?o:null,K),ve=to(null),be=Zr((e,t)=>{let{sensor:n,options:r}=t;if(null==E.current)return;const o=C.get(E.current);if(!o)return;const i=e.nativeEvent,a=new n({active:E.current,activeNode:o,event:i,options:r,context:Y,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=P.current,n={id:e};null==t||t(n),v({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:o}=P.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),v({type:"onDragPending",event:i})},onStart(e){const t=E.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=P.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:R}};so(()=>{null==r||r(o),x(Ti.Initializing),m({type:ho.DragStart,initialCoordinates:e,active:t}),v({type:"onDragStart",event:o}),j(ve.current),N(i)})},onMove(e){m({type:ho.DragMove,coordinates:e})},onEnd:s(ho.DragEnd),onCancel:s(ho.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=Y.current;let a=null;if(t&&o){const{cancelDrop:s}=P.current;if(a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===ho.DragEnd&&"function"==typeof s){await Promise.resolve(s(a))&&(e=ho.DragCancel)}}E.current=null,so(()=>{m({type:e}),x(Ti.Uninitialized),fe(null),j(null),N(null),ve.current=null;const t=e===ho.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=P.current[t];null==e||e(a),v({type:t,event:a})}})}}ve.current=a},[C]),ye=Zr((e,t)=>(n,r)=>{const o=n.nativeEvent,i=C.get(r);if(null!==E.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},E.current=r,be(n,t))},[C,be]),xe=function(e,t){return eo(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,ye);!function(e){Qr(()=>{if(!br)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),Or(()=>{K&&y===Ti.Initializing&&x(Ti.Initialized)},[K,y]),Qr(()=>{const{onDragMove:e}=P.current,{active:t,activatorEvent:n,collisions:r,over:o}=Y.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:ue.x,y:ue.y},over:o};so(()=>{null==e||e(i),v({type:"onDragMove",event:i})})},[ue.x,ue.y]),Qr(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=Y.current;if(!e||null==E.current||!t||!o)return;const{onDragOver:i}=P.current,a=r.get(he),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};so(()=>{fe(s),null==i||i(l),v({type:"onDragOver",event:l})})},[he]),Or(()=>{Y.current={activatorEvent:D,active:_,activeNode:B,collisionRect:de,collisions:pe,droppableRects:z,draggableNodes:C,draggingNode:Q,draggingNodeRect:G,droppableContainers:A,over:ge,scrollableAncestors:re,scrollAdjustedTranslate:ue},R.current={initial:G,translated:de}},[_,B,pe,de,C,Q,G,z,A,ge,re,ue]),li({...V,delta:k,draggingRect:de,pointerCoordinates:ae,scrollableAncestors:re,scrollableAncestorRects:oe});const we=eo(()=>({active:_,activeNode:B,activeNodeRect:K,activatorEvent:D,collisions:pe,containerNodeRect:q,dragOverlay:X,draggableNodes:C,droppableContainers:A,droppableRects:z,over:ge,measureDroppableContainers:F,scrollableAncestors:re,scrollableAncestorRects:oe,measuringConfiguration:I,measuringScheduled:W,windowRect:ne}),[_,B,K,D,pe,q,X,C,A,z,ge,F,re,oe,I,W,ne]),Se=eo(()=>({activatorEvent:D,activators:xe,active:_,activeNodeRect:K,ariaDescribedById:{draggable:T},dispatch:m,draggableNodes:C,over:ge,measureDroppableContainers:F}),[D,xe,_,K,m,T,C,ge,F]);return Yr.createElement(lo.Provider,{value:b},Yr.createElement(_i.Provider,{value:Se},Yr.createElement(Ei.Provider,{value:we},Yr.createElement(Pi.Provider,{value:me},l)),Yr.createElement(Di,{disabled:!1===(null==a?void 0:a.restoreFocus)})),Yr.createElement(po,{...a,hiddenTextDescribedById:T}))});const $i=Jr(null),Ii="button";function Mi(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=Nr("Draggable"),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:p}=Xr(_i),{role:h=Ii,roleDescription:g="draggable",tabIndex:f=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,v=Xr(m?Pi:$i),[b,y]=Lr(),[x,w]=Lr(),S=function(e,t){return eo(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(a,t),C=_r(n);Or(()=>(d.set(t,{id:t,key:i,node:b,activatorNode:x,data:C}),()=>{const e=d.get(t);e&&e.key===i&&d.delete(t)}),[d,t]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:eo(()=>({role:h,tabIndex:f,"aria-disabled":r,"aria-pressed":!(!m||h!==Ii)||void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[r,h,f,m,g,u.draggable]),isDragging:m,listeners:r?void 0:S,node:b,over:p,setNodeRef:y,setActivatorNodeRef:w,transform:v}}const zi={timeout:25};function Fi(e){let{animation:t,children:n}=e;const[r,o]=Gr(null),[i,a]=Gr(null),s=jr(n);return n||r||!s||o(s),Or(()=>{if(!i)return;const e=null==r?void 0:r.key,n=null==r?void 0:r.props.id;null!=e&&null!=n?Promise.resolve(t(n,i)).then(()=>{o(null)}):o(null)},[t,r,i]),Yr.createElement(Yr.Fragment,null,n,r?oo(r,{ref:a}):null)}const Wi={x:0,y:0,scaleX:1,scaleY:1};function Bi(e){let{children:t}=e;return Yr.createElement(_i.Provider,{value:Ri},Yr.createElement(Pi.Provider,{value:Wi},t))}const Hi={position:"fixed",touchAction:"none"},Vi=e=>Ir(e)?"transform 250ms ease":void 0,Ui=io((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:a,rect:s,style:l,transform:c,transition:u=Vi}=e;if(!s)return null;const d=o?c:{...c,scaleX:1,scaleY:1},p={...Hi,width:s.width,height:s.height,top:s.top,left:s.left,transform:zr.Transform.toString(d),transformOrigin:o&&r?mo(r,s):void 0,transition:"function"==typeof u?u(r):u,...l};return Yr.createElement(n,{className:a,style:p,ref:t},i)}),Ki={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:zr.Transform.toString(t)},{transform:zr.Transform.toString(n)}]},sideEffects:(qi={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:n}=e;const r={},{styles:o,className:i}=qi;if(null!=o&&o.active)for(const[e,n]of Object.entries(o.active))void 0!==n&&(r[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,n));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&n.node.style.setProperty(e,t);return null!=i&&i.active&&t.node.classList.add(i.active),null!=i&&i.dragOverlay&&n.node.classList.add(i.dragOverlay),function(){for(const[e,n]of Object.entries(r))t.node.style.setProperty(e,n);null!=i&&i.active&&t.node.classList.remove(i.active)}})};var qi;function Yi(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Rr((e,i)=>{if(null===t)return;const a=n.get(e);if(!a)return;const s=a.node.current;if(!s)return;const l=wi(i);if(!l)return;const{transform:c}=wr(i).getComputedStyle(i),u=Co(c);if(!u)return;const d="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...Ki,...e};return e=>{let{active:i,dragOverlay:a,transform:s,...l}=e;if(!t)return;const c={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:1!==s.scaleX?i.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?i.rect.height*s.scaleY/a.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},p=o({...l,active:i,dragOverlay:a,transform:{initial:s,final:d}}),[h]=p,g=p[p.length-1];if(JSON.stringify(h)===JSON.stringify(g))return;const f=null==r?void 0:r({active:i,dragOverlay:a,...l}),m=a.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{null==f||f(),e()}})}}(t);return Fo(s,o.draggable.measure),d({active:{id:e,data:a.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:u})})}let Ji=0;function Xi(e){return eo(()=>{if(null!=e)return Ji++,Ji},[e])}const Qi=Yr.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:a,wrapperElement:s="div",className:l,zIndex:c=999}=e;const{activatorEvent:u,active:d,activeNodeRect:p,containerNodeRect:h,draggableNodes:g,droppableContainers:f,dragOverlay:m,over:v,measuringConfiguration:b,scrollableAncestors:y,scrollableAncestorRects:x,windowRect:w}=Xr(Ei),S=Xr(Pi),C=Xi(null==d?void 0:d.id),k=Ni(a,{activatorEvent:u,active:d,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:m.rect,over:v,overlayNodeRect:m.rect,scrollableAncestors:y,scrollableAncestorRects:x,transform:S,windowRect:w}),A=hi(p),O=Yi({config:r,draggableNodes:g,droppableContainers:f,measuringConfiguration:b}),R=A?m.setRef:void 0;return Yr.createElement(Bi,null,Yr.createElement(Fi,{animation:O},d&&C?Yr.createElement(Ui,{key:C,id:d.id,ref:R,as:s,activatorEvent:u,adjustScale:t,className:l,transition:i,rect:A,style:{zIndex:c,...o},transform:k},n):null))}),Gi=t,{useEffect:Zi}=t,{useRef:ea}=t,ta=n,{styled:na}=r,{Chip:ra}=i,{color:oa}=a,{renderMath:ia}=p;function aa(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const sa=na("span")(({theme:e,disabled:t})=>({border:`solid 0px ${e.palette.primary.main}`,borderRadius:e.spacing(2),margin:e.spacing(.5),transform:"translate(0, 0)",display:"inline-flex",...t&&{}})),la=na(ra)(()=>({backgroundColor:oa.white(),border:`1px solid ${oa.text()}`,color:oa.text(),alignItems:"center",display:"inline-flex",height:"initial",minHeight:"32px",fontSize:"inherit",whiteSpace:"pre-wrap",maxWidth:"374px",pointerEvents:"none",borderRadius:"3px",paddingTop:"12px",paddingBottom:"12px","&.Mui-disabled":{opacity:1}})),ca=na("span")(()=>({whiteSpace:"normal","& img":{display:"block",padding:"2px 0"},"& mjx-frac":{fontSize:"120% !important"}}));function ua({choice:e,disabled:t,instanceId:n}){const r=ea(null),{attributes:o,listeners:i,setNodeRef:a,isDragging:s}=Mi({id:`choice-${e.id}`,data:{choice:e,instanceId:n,fromChoice:!0,type:"MaskBlank"},disabled:t});return Zi(()=>{ia(r.current)},[e.value]),Gi.createElement(sa,{ref:a,style:s?{width:aa([r,"access",e=>e.current,"optionalAccess",e=>e.offsetWidth]),height:aa([r,"access",e=>e.current,"optionalAccess",e=>e.offsetHeight])}:{},disabled:t,...i,...o},Gi.createElement(la,{clickable:!1,disabled:t,ref:r,label:Gi.createElement(ca,{dangerouslySetInnerHTML:{__html:e.value}})}))}ua.propTypes={choice:ta.object.isRequired,disabled:ta.bool,instanceId:ta.oneOfType([ta.string,ta.number])};const da=t,pa=n,{DragDroppablePlaceholder:ha}=h;class ga extends da.Component{constructor(...e){super(...e),ga.prototype.__init.call(this)}static __initStatic(){this.propTypes={disabled:pa.bool,duplicates:pa.bool,choices:pa.arrayOf(pa.shape({label:pa.string,value:pa.string})),value:pa.object,choicePosition:pa.string.isRequired,instanceId:pa.string}}__init(){this.getStyleForWrapper=()=>{const{choicePosition:e}=this.props;switch(e){case"above":return{margin:"0 0 40px 0"};case"below":return{margin:"40px 0 0 0"};case"right":return{margin:"0 0 0 40px"};default:return{margin:"0 40px 0 0"}}}}render(){const{disabled:e,duplicates:t,choices:n,value:r,instanceId:o}=this.props,i=n.filter(e=>{if(!0===t)return!0;const n=function(e,t){var n;return qt(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}(r,Ht(t=>t===e.id));return void 0===n}),a={...this.getStyleForWrapper(),minWidth:"100px"};return da.createElement("div",{style:a},da.createElement(ha,{disabled:e,instanceId:o},i.map((t,n)=>da.createElement(ua,{key:`${t.value}-${n}`,disabled:e,choice:t,instanceId:o}))))}}ga.__initStatic();const fa=t,{useEffect:ma}=t,{useRef:va}=t,{useState:ba}=t,ya=n,xa=e,{styled:wa}=r,{Chip:Sa}=i,Ca=l,{color:ka}=a,{grey:Aa}=s,{renderMath:Oa}=p;function Ra(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}xa("pie-lib:mask-markup:blank");const _a=wa("span")(({dragged:e,over:t})=>({border:`solid 0px ${ka.primary()}`,minWidth:"200px",touchAction:"none",overflow:"hidden",whiteSpace:"nowrap",opacity:1,...t&&{whiteSpace:"nowrap",overflow:"hidden"},...e&&{opacity:.5}})),Ea=wa(Sa)(()=>({backgroundColor:ka.background(),border:`2px dashed ${ka.text()}`,touchAction:"none",color:ka.text(),fontSize:"inherit",maxWidth:"374px",position:"relative",borderRadius:"3px","&.over":{whiteSpace:"nowrap",overflow:"hidden"},"&.parentOver":{border:`1px solid ${Aa[500]}`,backgroundColor:`${Aa[300]}`},"&.correct":{border:`solid 1px ${ka.correct()}`},"&.incorrect":{border:`solid 1px ${ka.incorrect()}`},"&.Mui-disabled":{opacity:1}})),La=wa("span")(()=>({whiteSpace:"normal",pointerEvents:"none","& img":{display:"block",padding:"2px 0"},"& p":{marginTop:"0",marginBottom:"0"},"& mjx-frac":{fontSize:"120% !important"},"&.over":{whiteSpace:"nowrap",overflow:"hidden"},"&.hidden":{color:"transparent",opacity:0},"&.dragged":{position:"absolute",left:16,maxWidth:"60px",top:"50%",transform:"translateY(-50%)"}}));function ja({disabled:e,choice:t,isOver:n,isDragging:r,dragItem:o,correct:i,emptyResponseAreaWidth:a,emptyResponseAreaHeight:s}){const l=va(null),c=va(null),u=va(null),[d,p]=ba({height:0,width:0}),h=()=>{f()},g=()=>{const e=Ra([c,"access",e=>e.current,"optionalAccess",e=>e.querySelector,"call",e=>e("img")]);e?e.onload=h:setTimeout(()=>{f()},300)},f=()=>{if(c.current&&l.current){l.current.style.width="auto",l.current.style.height="auto",l.current.offsetHeight;const e=(()=>{if(!c.current)return null;if(c.current.querySelector("mjx-container")&&c.current.parentElement)return c.current.parentElement;return c.current.querySelector("img")||c.current})()||c.current,t=e.getBoundingClientRect(),n=(t.width||e.offsetWidth||0)+24,r=Math.max(t.height||0,e.offsetHeight||0,e.scrollHeight||0,c.current.scrollHeight||0)+24,o=parseFloat(a)||0,i=parseFloat(s)||0,u=n<=o?o:n,d=r<=i?i:r;p(e=>({width:u>o?u:e.width,height:d>i?d:e.height})),l.current.style.width=`${u}px`,l.current.style.height=`${d}px`}};ma(()=>{g()},[]),ma(()=>{l.current&&Oa(l.current)},[i,n,Ra([o,"optionalAccess",e=>e.choice,"optionalAccess",e=>e.value])]),ma(()=>{t?g():p({height:0,width:0})},[t]),ma(()=>{n||r||(u.current={width:l.current.offsetWidth,height:l.current.offsetHeight})},[t,n,r]);const m=o&&n&&o.choice&&o.choice.value,v=t&&t.value,b=n||r?{width:Ra([u,"access",e=>e.current,"optionalAccess",e=>e.width]),height:Ra([u,"access",e=>e.current,"optionalAccess",e=>e.height])}:(()=>{const e=isNaN(parseFloat(a))?0:parseFloat(a),t=isNaN(parseFloat(s))?0:parseFloat(s);return{...{height:d.height||t,width:d.width||e},...e?{}:{minWidth:90},...t?{}:{minHeight:32}}})();return fa.createElement(Ea,{clickable:!1,disabled:e,ref:l,component:"span",label:fa.createElement(fa.Fragment,null,fa.createElement(La,{ref:c,draggable:!0,className:Ca({over:n,hidden:m}),dangerouslySetInnerHTML:{__html:v||""}}),m&&fa.createElement(La,{draggable:!0,className:Ca({over:n,dragged:!0}),dangerouslySetInnerHTML:{__html:m||""}})),className:Ca({over:n,parentOver:n,correct:void 0!==i&&i,incorrect:void 0!==i&&!i}),variant:e?"outlined":void 0,style:b})}function Da({id:e,disabled:t,duplicates:n,choice:r,correct:o,onChange:i,emptyResponseAreaWidth:a,emptyResponseAreaHeight:s,instanceId:l}){const{attributes:c,listeners:u,setNodeRef:d,transform:p,isDragging:h}=Mi({id:`mask-blank-drag-${e}`,disabled:t||!r,data:{id:e,choice:r,instanceId:l,fromChoice:!1,type:"MaskBlank"}}),{setNodeRef:g,isOver:f,active:m}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=Nr("Droppable"),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=Xr(_i),u=to({disabled:n}),d=to(!1),p=to(null),h=to(null),{disabled:g,updateMeasurementsFor:f,timeout:m}={...zi,...o},v=_r(null!=f?f:r),b=gi({callback:Zr(()=>{d.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(v.current)?v.current:[v.current]),h.current=null},m)):d.current=!0},[m]),disabled:g||!a}),y=Zr((e,t)=>{b&&(t&&(b.unobserve(t),d.current=!1),e&&b.observe(e))},[b]),[x,w]=Lr(y),S=_r(t);return Qr(()=>{b&&x.current&&(b.disconnect(),d.current=!1,b.observe(x.current))},[x,b]),Qr(()=>(s({type:ho.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:p,data:S}}),()=>s({type:ho.UnregisterDroppable,key:i,id:r})),[r]),Qr(()=>{n!==u.current.disabled&&(s({type:ho.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n)},[r,i,n,s]),{active:a,rect:p,isOver:(null==l?void 0:l.id)===r,node:x,over:l,setNodeRef:w}}({id:`mask-blank-drop-${e}`,data:{id:e,accepts:["MaskBlank"],instanceId:l}}),v={transform:zr.Translate.toString(p)};return fa.createElement(_a,{ref:e=>{d(e),g(e)},style:v,dragged:h,over:f,...c,...u},fa.createElement(ja,{id:e,disabled:t,duplicates:n,choice:r,isOver:f,dragItem:Ra([m,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),correct:o,onChange:i,emptyResponseAreaWidth:a,emptyResponseAreaHeight:s,instanceId:l}))}ja.defaultProps={emptyResponseAreaWidth:0,emptyResponseAreaHeight:0},ja.propTypes={id:ya.oneOfType([ya.string,ya.number]),disabled:ya.bool,duplicates:ya.bool,choice:ya.object,isOver:ya.bool,dragItem:ya.object,correct:ya.bool,onChange:ya.func,emptyResponseAreaWidth:ya.oneOfType([ya.string,ya.number]),emptyResponseAreaHeight:ya.oneOfType([ya.string,ya.number]),instanceId:ya.string},Da.defaultProps={emptyResponseAreaWidth:0,emptyResponseAreaHeight:0},Da.propTypes={id:ya.oneOfType([ya.string,ya.number]),disabled:ya.bool,duplicates:ya.bool,choice:ya.object,correct:ya.bool,onChange:ya.func,emptyResponseAreaWidth:ya.oneOfType([ya.string,ya.number]),emptyResponseAreaHeight:ya.oneOfType([ya.string,ya.number]),instanceId:ya.string};const Na=t,Pa=n,{DragProvider:Ta}=h;function $a(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}const Ia=pr("blank",e=>(t,n,r)=>{const o=$a([t,"access",e=>e.data,"optionalAccess",e=>e.dataset])||{};if("blank"===o.component){const{disabled:i,duplicates:a,correctResponse:s,feedback:l,showCorrectAnswer:c,emptyResponseAreaWidth:u,emptyResponseAreaHeight:d,instanceId:p,isDragging:h}=e,g=c?s[o.id]:n[o.id],f=g&&e.choices.find(e=>e.id===g);return Na.createElement(Da,{key:`${t.type}-${o.id}`,correct:c||l&&l[o.id],disabled:i,duplicates:a,choice:f,id:o.id,emptyResponseAreaWidth:u,emptyResponseAreaHeight:d,onChange:(e,t)=>{const o={...n};void 0===t?delete o[e]:o[e]=t,r(o)},instanceId:p,isDragging:h})}});class Ma extends Na.Component{constructor(e){super(e),Ma.prototype.__init.call(this),Ma.prototype.__init2.call(this),Ma.prototype.__init3.call(this),Ma.prototype.__init4.call(this),this.state={activeDragItem:null,dropAnimation:void 0}}static __initStatic(){this.propTypes={markup:Pa.string,layout:Pa.object,choicesPosition:Pa.string,choices:Pa.array,value:Pa.object,onChange:Pa.func,duplicates:Pa.bool,disabled:Pa.bool,feedback:Pa.object,correctResponse:Pa.object,showCorrectAnswer:Pa.bool,emptyResponseAreaWidth:Pa.oneOfType([Pa.string,Pa.number]),emptyResponseAreaHeight:Pa.oneOfType([Pa.string,Pa.number]),instanceId:Pa.string}}static __initStatic2(){this.defaultProps={instanceId:"drag-in-the-blank"}}__init(){this.handleDragStart=e=>{const{active:t}=e;$a([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current])&&this.setState({activeDragItem:t.data.current,dropAnimation:void 0})}}__init2(){this.renderDragOverlay=()=>{const{activeDragItem:e}=this.state;return e&&"MaskBlank"===e.type?Na.createElement(ua,{disabled:e.disabled,choice:e.choice,instanceId:e.instanceId}):null}}__init3(){this.handleDragEnd=e=>{const{active:t,over:n}=e,{onChange:r,value:o}=this.props,i=$a([t,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),a=$a([n,"optionalAccess",e=>e.data,"optionalAccess",e=>e.current]),s=!!t&&!!n&&"MaskBlank"===$a([i,"optionalAccess",e=>e.type])&&$a([a,"optionalAccess",e=>e.accepts,"optionalAccess",e=>e.includes,"call",e=>e("MaskBlank")]);if(this.setState({activeDragItem:null,dropAnimation:s?null:void 0}),!s||!r)return;const l=i,c=a.id;if(!0===a.toChoiceBoard){if(!l.fromChoice&&l.id){const e={...o};delete e[l.id],r(e)}}else if(!0===l.fromChoice){if(c&&"drag-in-the-blank-droppable"!==c){const e={...o};e[c]=l.choice.id,r(e)}}else if(l.id&&l.id!==c){const e={...o};e[c]=l.choice.id,delete e[l.id],r(e)}}}__init4(){this.getPositionDirection=e=>{let t,n,r;switch(e){case"left":t="row",r="center";break;case"right":t="row-reverse",n="flex-end",r="center";break;case"below":t="column-reverse";break;default:t="column"}return{flexDirection:t,justifyContent:n,alignItems:r}}}render(){const{markup:e,duplicates:t,value:n,onChange:r,choicesPosition:o,choices:i,correctResponse:a,disabled:s,feedback:l,showCorrectAnswer:c,emptyResponseAreaWidth:u,emptyResponseAreaHeight:d,layout:p,instanceId:h}=this.props,g=o||"below",f={display:"flex",minWidth:"100px",...this.getPositionDirection(g)};return Na.createElement(Ta,{onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,collisionDetection:yo},Na.createElement("div",{ref:e=>this.rootRef=e,style:f},Na.createElement(ga,{choicePosition:g,choices:i,value:n,duplicates:t,disabled:s,instanceId:h}),Na.createElement(Ia,{elementType:"drag-in-the-blank",markup:e,layout:p,value:n,choices:i,onChange:r,disabled:s,duplicates:t,feedback:l,correctResponse:a,showCorrectAnswer:c,emptyResponseAreaWidth:u,emptyResponseAreaHeight:d,instanceId:h,isDragging:!!this.state.activeDragItem}),Na.createElement(Qi,{style:{pointerEvents:"none"},dropAnimation:this.state.dropAnimation},this.renderDragOverlay())))}}Ma.__initStatic(),Ma.__initStatic2();const za=t,{styled:Fa}=r,Wa=l,{color:Ba}=a;function Ha(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}let Va,Ua;"undefined"!=typeof window&&(Va=require("@pie-lib/editable-html-tip-tap").default,Ua=Fa(Va)(()=>({display:"inline-block",verticalAlign:"middle",margin:"4px",borderRadius:"4px",border:`1px solid ${Ba.black()}`,"&.correct":{border:`1px solid ${Ba.correct()}`},"&.incorrect":{border:`1px solid ${Ba.incorrect()}`}})));var Ka=pr("input",e=>(t,n)=>{const{adjustedLimit:r,disabled:o,feedback:i,showCorrectAnswer:a,maxLength:s,spellCheck:l,pluginProps:c,onChange:u}=e,d=Ha([t,"access",e=>e.data,"optionalAccess",e=>e.dataset])||{};if("input"===d.component){const p=(e.choices&&d&&e.choices[d.id]||[])[0],h=a?p&&p.label:n[d.id]||"",g=s&&s[d.id],f=i&&i[d.id],m=a||"correct"===f,v=!a&&"incorrect"===f,b=e=>{const t={...n,[d.id]:e};u(t)},y=e=>{if("Enter"===e.key||13===e.keyCode)return!0};return za.createElement(Ua,{id:d.id,key:`${t.type}-input-${d.id}`,disabled:a||o,disableUnderline:!0,onChange:b,markup:h||"",charactersLimit:r?g:25,activePlugins:["languageCharacters"],pluginProps:c,languageCharactersProps:[{language:"spanish"}],spellCheck:l,adjustWidthForLimit:!0,onKeyDown:y,autoWidthToolbar:!0,toolbarOpts:{minWidth:"auto",noBorder:!0,isHidden:!!Ha([c,"optionalAccess",e=>e.characters,"optionalAccess",e=>e.disabled])},className:Wa({correct:m,incorrect:v})})}});pr("input",e=>(t,n,r)=>{const o=t.data&&t.data.dataset||{};if("input"===o.component)return e.customMarkMarkupComponent(o.id)});const qa=t,Ya=n,{Button:Ja}=i,{InputLabel:Xa}=i,{Menu:Qa}=i,{MenuItem:Ga}=i,{ArrowDropDown:Za}=c,{ArrowDropUp:es}=c,{Close:ts}=c,{Check:ns}=c,{styled:rs}=r,{color:os}=a,{renderMath:is}=p,as=rs(Ja)(()=>({color:os.text(),border:`1px solid ${os.borderGray()}`,borderRadius:"4px",justifyContent:"space-between",backgroundColor:os.background(),position:"relative",height:"45px",width:"fit-content",margin:"2px",textTransform:"none","& span":{paddingRight:"24px"},"& svg":{position:"absolute",right:"4px",top:"calc(50% - 12px)",pointerEvents:"none",color:os.text(),marginLeft:"5px"},"&.Mui-focused":{outline:`3px solid ${os.tertiary()}`,outlineOffset:"2px",borderWidth:"3px"},"&.disabledCorrect":{borderWidth:"2px",borderColor:os.correct(),color:`${os.text()} !important`},"&.disabledIncorrect":{borderWidth:"2px",borderColor:os.incorrectWithIcon(),color:`${os.text()} !important`}})),ss=rs(Qa)(()=>({backgroundColor:os.background(),border:`1px solid ${os.correct()} !important`,"&:hover":{border:`1px solid ${os.text()} `,borderColor:"initial"},"&:focus":{border:`1px solid ${os.text()}`,borderColor:"initial"},"& .MuiList-root":{padding:0}})),ls=rs(Ga)(()=>({height:24,overflow:"hidden",fontSize:"1rem",fontWeight:400,fontFamily:"inherit",lineHeight:"1.5em",whiteSpace:"nowrap",color:os.text(),backgroundColor:os.background(),"&.Mui-focusVisible":{outline:`3px solid ${os.tertiary()}`,outlineOffset:"-1px",color:os.text(),backgroundColor:os.background()},"&:hover":{color:os.text(),backgroundColor:os.dropdownBackground()},boxSizing:"border-box",padding:"16px 8px",borderRadius:"4px","&.selected":{color:`${os.text()} !important`,backgroundColor:`${os.background()} !important`,"&:hover":{color:os.text(),backgroundColor:`${os.dropdownBackground()} !important`}}})),cs=rs("span")(()=>({fontSize:"max(1rem, 14px)"})),us=rs("span")(()=>({fontSize:"max(1rem, 14px)",flexShrink:0,paddingLeft:"8px"})),ds=rs(Xa)(()=>({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"})),ps=rs(ns)(()=>({color:`${os.white()} !important`,position:"absolute",top:"-8px !important",left:"-8px",marginLeft:"0 !important",borderRadius:"50%",fontSize:"16px",padding:"2px","&.correct":{backgroundColor:os.correct()},"&.incorrect":{backgroundColor:os.incorrectWithIcon()}})),hs=rs(ts)(()=>({color:`${os.white()} !important`,position:"absolute",top:"-8px !important",left:"-8px",marginLeft:"0 !important",borderRadius:"50%",fontSize:"16px",padding:"2px","&.correct":{backgroundColor:os.correct()},"&.incorrect":{backgroundColor:os.incorrectWithIcon()}}));class gs extends qa.Component{static __initStatic(){this.propTypes={id:Ya.string,value:Ya.string,disabled:Ya.bool,onChange:Ya.func,correct:Ya.bool,choices:Ya.arrayOf(Ya.shape({value:Ya.string,label:Ya.string})),showCorrectAnswer:Ya.bool,singleQuery:Ya.bool,correctValue:Ya.string}}constructor(e){super(e),gs.prototype.__init.call(this),gs.prototype.__init2.call(this),gs.prototype.__init3.call(this),gs.prototype.__init4.call(this),gs.prototype.__init5.call(this),this.state={anchorEl:null,highlightedOptionId:null,menuWidth:null,previewValue:null},this.hiddenRef=qa.createRef(),this.buttonRef=qa.createRef(),this.previewRef=qa.createRef(),this.elementRefs=[]}componentDidMount(){this.hiddenRef.current&&null===this.state.menuWidth&&this.setState({menuWidth:this.hiddenRef.current.clientWidth})}componentDidUpdate(e,t){const n=this.hiddenRef.current;if(!t.anchorEl&&this.state.anchorEl&&this.elementRefs.forEach(e=>{if(!e)return;const t=e.querySelector("[data-latex], [data-raw]"),n=e.querySelector("mjx-container"),r=e.querySelector('[data-math-handled="true"]');!t||r&&n||is(e)}),n){const e=n.clientWidth;e!==this.state.menuWidth&&(this.elementRefs.forEach(e=>{e&&is(e)}),is(n),this.setState({menuWidth:e}))}}__init(){this.handleClick=e=>{const{id:t,value:n,choices:r}=this.props;let o=null;if(n){const e=(r||[]).findIndex(e=>e.value===n);e>=0&&(o=`dropdown-option-${t}-${e}`)}this.setState({anchorEl:e.currentTarget,highlightedOptionId:o})}}__init2(){this.handleClose=()=>{const{value:e}=this.props;this.setState({anchorEl:null,previewValue:null,highlightedOptionId:null}),!e&&this.previewRef.current&&(this.previewRef.current.innerHTML="")}}__init3(){this.handleHighlight=e=>{const t={highlightedOptionId:`dropdown-option-${this.props.id}-${e}`};this.props.value||(t.previewValue=this.props.choices[e].value),this.setState(t)}}__init4(){this.handleSelect=(e,t)=>{this.props.onChange(this.props.id,e),this.handleHighlight(t),this.handleClose()}}__init5(){this.handleHover=e=>{if(this.props.value)return;const t=`dropdown-option-${this.props.id}-${e}`,n=this.state.previewValue;this.setState({highlightedOptionId:t,previewValue:n},()=>{const t=this.elementRefs[e],n=this.previewRef.current;t&&n&&(n.innerHTML=t.innerHTML)})}}getLabel(e,t){const n=(e||[]).find(e=>e.value===t);return n?n.label.trim():void 0}render(){const{id:e,correct:t,disabled:n,value:r,choices:o,showCorrectAnswer:i,singleQuery:a,correctValue:s}=this.props,{anchorEl:l}=this.state,c=Boolean(l),u=`dropdown-button-${e}`,d=`dropdown-menu-${e}`,p=`dropdown-value-${e}`;let h;this.elementRefs=[],n&&void 0!==t&&(h=t||i?"disabledCorrect":"disabledIncorrect");const g=parseInt(e,10)+1,f=a?"Query-label":`Query-label-${g}`,m=a?"Query":`Query ${g}`;let v=null;return n&&void 0!==t&&(v=t||i?qa.createElement(ps,{className:"correct"}):qa.createElement(hs,{className:"incorrect"})),qa.createElement(qa.Fragment,null,qa.createElement("div",{ref:this.hiddenRef,style:{position:"absolute",visibility:"hidden",top:0,left:0},tabIndex:-1,"aria-hidden":"true"},(o||[]).map((e,t)=>qa.createElement(ls,{key:t,tabIndex:-1,"aria-hidden":"true"},qa.createElement(cs,{dangerouslySetInnerHTML:{__html:e.label}})))),qa.createElement(ds,{id:f,tabIndex:-1,"aria-hidden":"true"},m),qa.createElement(as,{ref:this.buttonRef,style:{...this.state.menuWidth&&{minWidth:`calc(${this.state.menuWidth}px + 8px)`},borderWidth:c?"2px":"1px",transition:"border-width 0.2s ease-in-out"},"aria-controls":c?d:void 0,"aria-haspopup":"listbox","aria-expanded":c?"true":void 0,"aria-activedescendant":this.state.highlightedOptionId,onClick:this.handleClick,className:h,disabled:n,id:u,role:"combobox","aria-label":`Select an option for ${m}`,"aria-labelledby":p},v,qa.createElement(cs,{id:p,ref:this.previewRef,dangerouslySetInnerHTML:{__html:s||(c&&this.state.previewValue?this.getLabel(o,this.state.previewValue):this.getLabel(o,r)||"")}}),c?qa.createElement(es,null):qa.createElement(Za,null)),qa.createElement(ss,{id:d,anchorEl:l,keepMounted:!0,open:c,onClose:this.handleClose,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},transitionDuration:{enter:225,exit:195},slotProps:{paper:this.state.menuWidth?{style:{minWidth:this.state.menuWidth,padding:"4px"}}:void 0,list:{"aria-labelledby":u,role:"listbox",disablePadding:!0}}},(o||[]).map((t,n)=>{const o=`dropdown-option-${e}-${n}`;return qa.createElement(ls,{id:o,className:t.value===r?"selected":"",selected:t.value===r,key:`${t.label}-${n}`,value:t.value,onClick:()=>this.handleSelect(t.value,n),role:"option","aria-selected":this.state.highlightedOptionId===o?"true":void 0,onMouseOver:()=>this.handleHover(n)},qa.createElement(cs,{ref:e=>this.elementRefs[n]=e,dangerouslySetInnerHTML:{__html:t.label}}),qa.createElement(us,{dangerouslySetInnerHTML:{__html:t.value===r?" ✓":""}}))})))}}gs.__initStatic();const fs=t;function ms(e,t){return null!=e?e:t()}function vs(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((...e)=>n.call(t,...e)),t=void 0)}return n}pr("dropdown",e=>(t,n,r)=>{const o=t.data&&t.data.dataset||{};if("dropdown"===o.component){const{choices:i,disabled:a,feedback:s,showCorrectAnswer:l}=e,c=i&&i[o.id]&&i[o.id].find(e=>e.correct),u=l?c&&c.value:n[o.id];return fs.createElement(gs,{key:`${t.type}-dropdown-${o.id}`,correct:s&&s[o.id]&&"correct"===s[o.id],disabled:a||l,value:u,correctValue:l?c&&c.label:void 0,id:o.id,onChange:r,choices:i[o.id],showCorrectAnswer:l,singleQuery:1==Object.keys(i).length})}});const bs=e=>"string"==typeof e,ys=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},xs=e=>null==e?"":""+e,ws=/###/g,Ss=e=>e&&e.indexOf("###")>-1?e.replace(ws,"."):e,Cs=e=>!e||bs(e),ks=(e,t,n)=>{const r=bs(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Cs(e))return{};const t=Ss(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Cs(e)?{}:{obj:e,k:Ss(r[o])}},As=(e,t,n)=>{const{obj:r,k:o}=ks(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=ks(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=ks(e,a,Object),vs([s,"optionalAccess",e=>e.obj])&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},Os=(e,t)=>{const{obj:n,k:r}=ks(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Rs=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?bs(e[r])||e[r]instanceof String||bs(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Rs(e[r],t[r],n):e[r]=t[r]);return e},_s=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Es={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ls=e=>bs(e)?e.replace(/[&<>"'\/]/g,e=>Es[e]):e;const js=[" ",",","?","!",";"],Ds=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 n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Ns=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},Ps=e=>vs([e,"optionalAccess",e=>e.replace,"call",e=>e("_","-")]),Ts={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){vs([console,"optionalAccess",t=>t[e],"optionalAccess",e=>e.apply,"optionalCall",e=>e(console,t)])}};class $s{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Ts,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,n,r){return r&&!this.debug?null:(bs(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new $s(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new $s(this.logger,e)}}var Is=new $s;class Ms{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+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,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class zs extends Ms{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,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):bs(n)&&o?a.push(...n.split(o)):a.push(n)));const s=Os(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&bs(n)?Ns(vs([this,"access",e=>e.data,"optionalAccess",t=>t[e],"optionalAccess",e=>e[t]]),n,o):s}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),As(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(bs(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=Os(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Rs(s,n,o):s={...s,...n},As(this.data,a,s),i.silent||this.emit("added",e,t,n)}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 Fs={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=ms(vs([this,"access",e=>e.processors,"access",t=>t[e],"optionalAccess",e=>e.process,"call",e=>e(t,n,r,o)]),()=>t)}),t}};const Ws=Symbol("i18next/PATH_KEY");function Bs(e,t){const{[Ws]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(vs([n,"optionalAccess",e=>e.revoke,"optionalCall",e=>e()]),o===Ws?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(ms(vs([t,"optionalAccess",e=>e.keySeparator]),()=>"."))}const Hs={},Vs=e=>!bs(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Us extends Ms{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Is.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===vs([r,"optionalAccess",e=>e.res]))return!1;const o=Vs(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=js.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=Ds.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:bs(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:bs(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Bs(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===vs([u,"optionalAccess",e=>e.toLowerCase,"call",e=>e()]))return d?o?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const p=this.resolve(e,r);let h=vs([p,"optionalAccess",e=>e.res]);const g=vs([p,"optionalAccess",e=>e.usedKey])||a,f=vs([p,"optionalAccess",e=>e.exactUsedKey])||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!bs(r.count),y=Us.hasDefaultValue(r),x=b?this.pluralResolver.getSuffix(u,r.count,r):"",w=r.ordinal&&b?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",S=b&&!r.ordinal&&0===r.count,C=S&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${w}`]||r.defaultValue;let k=h;v&&!h&&y&&(k=C);const A=Vs(k),O=Object.prototype.toString.apply(k);if(!(v&&k&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(O)<0)||bs(m)&&Array.isArray(k))if(v&&bs(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(h)&&y&&(t=!0,h=C),this.isValidLookup(h)||(o=!0,h=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:h,d=y&&C!==h&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",u,l,a,d?C:h),i){const e=this.resolve(a,{...r,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,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=y&&n!==h?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):vs([this,"access",e=>e.backendConnector,"optionalAccess",e=>e.saveMissing])&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);S&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||C)})}):n(e,a,C))}h=this.extendTranslation(h,e,r,p,n),o&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?h:void 0,r))}else{if(!r.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,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){const e=Array.isArray(k),t=e?[]:{},n=e?f:g;for(const e in k)if(Object.prototype.hasOwnProperty.call(k,e)){const o=`${n}${i}${e}`;t[e]=y&&!h?this.translate(o,{...r,defaultValue:Vs(C)?C[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=k[e])}h=t}}return o?(p.res=h,p.usedParams=this.getUsedParamsDetails(r),p):h}extendTranslation(e,t,n,r,o){if(vs([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.parse]))e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=bs(e)&&(void 0!==vs([n,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!bs(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>vs([o,"optionalAccess",e=>e[0]])!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,a=bs(i)?[i]:i;return null!=e&&vs([a,"optionalAccess",e=>e.length])&&!1!==n.applyPostProcessor&&(e=Fs.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return bs(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!bs(t.count),d=u&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(bs(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(n)||(a=e,Hs[`${h[0]}-${e}`]||!vs([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||vs([this,"access",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(a)])||(Hs[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${a}" 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(r=>{if(this.isValidLookup(n))return;i=r;const a=[l];if(vs([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.addLookupKeys]))this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),p){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(o)&&a.push(r+e.replace(o,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(o=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return vs([this,"access",e=>e.i18nFormat,"optionalAccess",e=>e.getResource])?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!bs(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Ks{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Is.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ps(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=Ps(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(bs(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 n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.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)),bs(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return bs(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):bs(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const qs={zero:0,one:1,two:2,few:3,many:4,other:5},Ys={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Js{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Is.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ps("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ys;if(!e.match(/-|_/))return Ys;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),vs([n,"optionalAccess",e=>e.resolvedOptions,"call",e=>e(),"access",e=>e.pluralCategories,"access",e=>e.length])>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>qs[e]-qs[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Xs=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=Os(e,n);return void 0!==r?r:Os(t,n)})(e,t,n);return!i&&o&&bs(n)&&(i=Ns(e,n,r),void 0===i&&(i=Ns(t,n,r))),i},Qs=e=>e.replace(/\$/g,"$$$$");class Gs{constructor(e={}){this.logger=Is.create("interpolator"),this.options=e,this.format=vs([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:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Ls,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?_s(o):i||"{{",this.suffix=a?_s(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?_s(d):p||_s("$t("),this.nestingSuffix=h?_s(h):g||_s(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>vs([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,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Xs(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Xs(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=vs([r,"optionalAccess",e=>e.missingInterpolationHandler])||this.options.missingInterpolationHandler,u=void 0!==vs([r,"optionalAccess",e=>e.interpolation,"optionalAccess",e=>e.skipOnVariables])?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Qs(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Qs(this.escape(e)):Qs(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=bs(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else bs(i)||this.useRawValueToEscape||(i=xs(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(ms(vs([a,"optionalAccess",e=>e.length]),()=>0)%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];i={...n},i=i.replace&&!bs(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(a.call(this,r[1].trim(),i),i),o&&r[0]===e&&!bs(o))return o;bs(o)||(o=xs(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const Zs=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(Ps(r),o),t[a]=s),s(n)}},el=e=>(t,n,r)=>e(Ps(n),r)(t);class tl{constructor(e={}){this.logger=Is.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Zs:el;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Zs(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=vs([r,"optionalAccess",e=>e.formatParams,"optionalAccess",e=>e[r.interpolationkey]])||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class nl extends Ms{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Is.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],vs([this,"access",e=>e.backend,"optionalAccess",e=>e.init,"optionalCall",e=>e(n,r.backend,r)])}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=ks(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{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)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();bs(e)&&(e=this.languageUtils.toResolveHierarchy(e)),bs(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(!vs([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace])||vs([this,"access",e=>e.services,"optionalAccess",e=>e.utils,"optionalAccess",e=>e.hasLoadedNamespace,"call",e=>e(t)])){if(null!=n&&""!==n){if(vs([this,"access",e=>e.backend,"optionalAccess",e=>e.create])){const s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,r,s):l(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" 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 rl=()=>({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]),bs(e[1])&&(t.defaultValue=e[1]),bs(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ol=e=>(bs(e.ns)&&(e.ns=[e.ns]),bs(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),bs(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),vs([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),il=()=>{};class al extends Ms{constructor(e={},t){var n;if(super(),this.options=ol(e),this.services={},this.logger=Is,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),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&&(bs(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=rl();var r;this.options={...n,...this.options,...ol(e)},this.options.interpolation={...n.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=n.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(vs([r=this,"optionalAccess",e=>e.modules,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.name,"optionalAccess",e=>e.indexOf,"call",e=>e("Locize")])>0||vs([r,"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||vs([r,"optionalAccess",e=>e.options,"optionalAccess",e=>e.backend,"optionalAccess",e=>e.backends])&&r.options.backend.backends.some(e=>vs([e,"optionalAccess",e=>e.name,"access",e=>e.indexOf,"call",e=>e("Locize")])>0||vs([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 o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Is.init(o(this.modules.logger),this.options):Is.init(null,this.options),e=this.modules.formatter?this.modules.formatter:tl;const t=new Ks(this.options);this.store=new zs(this.options.resources,this.options);const r=this.services;r.logger=Is,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new Js(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.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!==n.interpolation.format||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Gs(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new nl(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new Us(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=il),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=ys(),a=()=>{const e=(e,n)=>{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(n),t(e,n)};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?a():setTimeout(a,0),i}loadResources(e,t=il){let n=t;const r=bs(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===vs([r,"optionalAccess",e=>e.toLowerCase,"call",e=>e()])&&(!this.options.preload||0===this.options.preload.length))return n();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(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}vs([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),n(e)})}else n(null)}reloadResources(e,t,n){const r=ys();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=il),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}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&&Fs.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 n=ys();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=bs(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(bs(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),vs([this,"access",e=>e.services,"access",e=>e.languageDetector,"optionalAccess",e=>e.cacheUserLanguage,"optionalCall",e=>e(i)])),this.loadResources(i,e=>{o(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()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Bs(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Bs(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return bs(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return vs([this,"access",e=>e.translator,"optionalAccess",e=>e.translate,"call",t=>t(...e)])}exists(...e){return vs([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 n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=ys();return this.options.ns?(bs(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ys();bs(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(vs([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=vs([this,"access",e=>e.services,"optionalAccess",e=>e.languageUtils])||new Ks(rl());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 n=new al(e,t);return n.createInstance=al.createInstance,n}cloneInstance(e={},t=il){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new al(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});o.store=new zs(e,r),o.services.resourceStore=o.store}if(e.interpolation){const t={...rl().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};o.services.interpolator=new Gs(n)}return o.translator=new Us(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const sl=al.createInstance();sl.createInstance,sl.dir,sl.init,sl.loadResources,sl.reloadResources,sl.use,sl.changeLanguage,sl.getFixedT,sl.t,sl.exists,sl.setDefaultNamespace,sl.hasLoadedNamespace,sl.loadNamespaces,sl.loadLanguages;sl.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 ll={translator:{...sl,t:(e,t)=>{const{lng:n}=t;switch(n){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 sl.t(e,{lng:n,...t})}},languageOptions:[{value:"en_US",label:"English (US)"},{value:"es_ES",label:"Spanish"}]};const cl=t,ul=n,dl=u,{color:pl}=a,{Collapsible:hl}=a,{hasText:gl}=a,{hasMedia:fl}=a,{PreviewPrompt:ml}=a,{UiLayout:vl}=a,{styled:bl}=r,{translator:yl}=ll,xl=bl(vl)(({alwaysShowCorrect:e})=>({color:pl.text(),backgroundColor:pl.background(),...e&&{"& *":{borderColor:`${pl.text()} !important`}}})),wl=bl("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Sl=bl("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Cl=bl("h2")({position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"});class kl extends cl.Component{constructor(...e){super(...e),kl.prototype.__init.call(this),kl.prototype.__init2.call(this),kl.prototype.__init3.call(this),kl.prototype.__init4.call(this),kl.prototype.__init5.call(this)}static __initStatic(){this.propTypes={alwaysShowCorrect:ul.bool,animationsDisabled:ul.bool,disabled:ul.bool,displayType:ul.string,feedback:ul.object,language:ul.string,markup:ul.string,maxLengthPerChoice:ul.array,maxLengthPerChoiceEnabled:ul.bool,mode:ul.string,note:ul.string,onChange:ul.func,playerSpellCheckEnabled:ul.bool,prompt:ul.string,rationale:ul.string,role:ul.string,showNote:ul.bool,teacherInstructions:ul.string,value:ul.object,responseAreaInputConfiguration:ul.object,model:ul.object.isRequired}}static __initStatic2(){this.defaultProps={value:{}}}__init(){this.state={showCorrectAnswer:this.props.alwaysShowCorrect||!1}}__init2(){this.getChangeSession=e=>e&&e.every((e,t,n)=>e===n[0]&&1===e)?this.props.onChange:Qt(this.props.onChange,200,{maxWait:200})}UNSAFE_componentWillReceiveProps(e){const{maxLengthPerChoice:t,language:n}=this.props;let{note:r}=this.props;var o,i;(function(e){if(null==e)return!0;if(ae(e)&&(R(e)||"string"==typeof e||"function"==typeof e.splice||ve(e)||Ae(e)||he(e)))return!e.length;var t=xt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(le(e))return!je(e).length;for(var n in e)if(Gt.call(e,n))return!1;return!0})(e.feedback)&&this.setState({showCorrectAnswer:!1}),e.alwaysShowCorrect&&this.setState({showCorrectAnswer:!0}),t&&(o=t,i=e.maxLengthPerChoice,!$t(o,i))&&(this.changeSession=this.getChangeSession(e.maxLengthPerChoice)),r&&n&&n!==e.language&&r===yl.t("common:commonCorrectAnswerWithAlternates",{lng:n})&&(r=yl.t("common:commonCorrectAnswerWithAlternates",{lng:e.language}))}__init3(){this.toggleShowCorrect=()=>{this.setState({showCorrectAnswer:!this.state.showCorrectAnswer})}}__init4(){this.changeSession=this.getChangeSession(this.props.maxLengthPerChoice)}__init5(){this.onChange=e=>{this.changeSession(e)}}render(){const{showCorrectAnswer:e}=this.state,{alwaysShowCorrect:t,animationsDisabled:n,mode:r,displayType:o,role:i,language:a,maxLengthPerChoice:s,maxLengthPerChoiceEnabled:l,note:c,playerSpellCheckEnabled:u,prompt:d,rationale:p,showNote:h,teacherInstructions:g,responseAreaInputConfiguration:f,model:m,value:v}=this.props,{extraCSSRules:b}=m||{},y=(e||"view"===r&&"instructor"===i)&&h&&c,x=cl.createElement(ml,{defaultClassName:"teacher-instructions",prompt:g}),w=cl.createElement(ml,{prompt:p}),S=p&&(gl(p)||fl(p)),C=g&&(gl(g)||fl(g));return cl.createElement(xl,{extraCSSRules:b,alwaysShowCorrect:t,style:{display:`${o}`}},"gather"===r&&cl.createElement(Cl,null,"Fill in the Blank Question"),C&&cl.createElement(Sl,null,n?x:cl.createElement(hl,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"}},x)),d&&cl.createElement(ml,{prompt:d}),!t&&"evaluate"===r&&cl.createElement(dl,{show:!0,toggled:e,onToggle:this.toggleShowCorrect,language:a}),cl.createElement(Ka,{...this.props,onChange:this.onChange,showCorrectAnswer:e,value:v,maxLength:s,adjustedLimit:l,spellCheck:u,pluginProps:f}),y&&cl.createElement(wl,{dangerouslySetInnerHTML:{__html:c}}),S&&cl.createElement(Sl,null,n?w:cl.createElement(hl,{labels:{hidden:"Show Rationale",visible:"Hide Rationale"}},w)))}}kl.__initStatic(),kl.__initStatic2();const Al=t,{createRoot:Ol}=d,Rl=e,{renderMath:_l}=p,El=Rl("pie-element:explicit-constructed-response:print");class Ll extends HTMLElement{constructor(){super(),this._options=null,this._model=null,this._session=[],this._root=null,this._rerender=Qt(()=>{if(this._model&&this._session){const e=((e,t)=>{const n="instructor"===t.role;return e.prompt=!1!==e.promptEnabled?e.prompt:void 0,e.teacherInstructions=n&&!1!==e.teacherInstructionsEnabled?e.teacherInstructions:void 0,e.rationale=n&&!1!==e.rationaleEnabled?e.rationale:void 0,e.alwaysShowCorrect=n,e.mode=n?"evaluate":e.mode,e.disabled=!0,e.animationsDisabled=!0,e})(this._model,this._options),t=this._options&&Al.createElement(kl,{...e,onChange:()=>{}});this._root||(this._root=Ol(this)),this._root.render(t),queueMicrotask(()=>{El("render complete - render math"),_l(this)})}else El("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{Ll as default};
|
package/package.json
CHANGED
|
@@ -1,106 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/explicit-constructed-response",
|
|
3
|
-
"
|
|
3
|
+
"repository": "pie-framework/pie-elements",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"version": "11.1.2",
|
|
4
8
|
"description": "",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postpublish": "../../scripts/postpublish"
|
|
11
|
+
},
|
|
5
12
|
"dependencies": {
|
|
6
13
|
"@emotion/react": "^11.14.0",
|
|
7
14
|
"@emotion/style": "^0.8.0",
|
|
8
15
|
"@mui/icons-material": "^7.3.4",
|
|
9
16
|
"@mui/material": "^7.3.4",
|
|
10
|
-
"@pie-
|
|
11
|
-
"@pie-lib/
|
|
12
|
-
"@pie-lib/
|
|
13
|
-
"@pie-lib/
|
|
17
|
+
"@pie-framework/pie-player-events": "^0.1.0",
|
|
18
|
+
"@pie-lib/correct-answer-toggle": "4.0.3",
|
|
19
|
+
"@pie-lib/mask-markup": "3.0.6",
|
|
20
|
+
"@pie-lib/math-rendering": "5.0.2",
|
|
21
|
+
"@pie-lib/render-ui": "6.1.1",
|
|
22
|
+
"@pie-lib/translator": "4.0.2",
|
|
23
|
+
"classnames": "^2.2.6",
|
|
14
24
|
"he": "^1.2.0",
|
|
25
|
+
"lodash-es": "^4.17.23",
|
|
15
26
|
"prop-types": "^15.8.1",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"debug": "^4.4.3",
|
|
19
|
-
"@pie-element/shared-configure-events": "0.1.0",
|
|
20
|
-
"@pie-lib/config-ui": "13.0.4-next.30",
|
|
21
|
-
"@pie-element/shared-controller-utils": "0.1.1-next.1",
|
|
22
|
-
"@pie-element/shared-player-events": "0.1.0",
|
|
23
|
-
"@pie-element/shared-math-rendering-mathjax": "0.1.1-next.0",
|
|
24
|
-
"clsx": "^2.1.1"
|
|
25
|
-
},
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"react": "^18.0.0",
|
|
28
|
-
"react-dom": "^18.0.0"
|
|
27
|
+
"react": "18.3.1",
|
|
28
|
+
"react-dom": "18.3.1"
|
|
29
29
|
},
|
|
30
|
+
"author": "",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"gitHead": "206ff17a94e8e197744d059f97ad2b9a1bc9145d",
|
|
33
|
+
"main": "lib/index.js",
|
|
34
|
+
"module": "src/index.js",
|
|
30
35
|
"exports": {
|
|
31
|
-
".":
|
|
32
|
-
|
|
33
|
-
"default": "./dist/index.js"
|
|
34
|
-
},
|
|
35
|
-
"./delivery": {
|
|
36
|
-
"types": "./dist/delivery/index.d.ts",
|
|
37
|
-
"default": "./dist/delivery/index.js"
|
|
38
|
-
},
|
|
39
|
-
"./browser/delivery": {
|
|
40
|
-
"default": "./dist/browser/delivery/index.js"
|
|
41
|
-
},
|
|
42
|
-
"./author": {
|
|
43
|
-
"types": "./dist/author/index.d.ts",
|
|
44
|
-
"default": "./dist/author/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./browser/author": {
|
|
47
|
-
"default": "./dist/browser/author/index.js"
|
|
48
|
-
},
|
|
49
|
-
"./configure": {
|
|
50
|
-
"types": "./dist/author/index.d.ts",
|
|
51
|
-
"default": "./dist/author/index.js"
|
|
52
|
-
},
|
|
53
|
-
"./controller": {
|
|
54
|
-
"types": "./dist/controller/index.d.ts",
|
|
55
|
-
"default": "./dist/controller/index.js"
|
|
56
|
-
},
|
|
57
|
-
"./controller.js": {
|
|
58
|
-
"types": "./dist/controller/index.d.ts",
|
|
59
|
-
"default": "./dist/controller/index.js"
|
|
60
|
-
},
|
|
61
|
-
"./browser/controller": {
|
|
62
|
-
"default": "./dist/browser/controller/index.js"
|
|
63
|
-
},
|
|
64
|
-
"./print": {
|
|
65
|
-
"types": "./dist/print/index.d.ts",
|
|
66
|
-
"default": "./dist/print/index.js"
|
|
67
|
-
},
|
|
68
|
-
"./browser/print": {
|
|
69
|
-
"default": "./dist/browser/print/index.js"
|
|
70
|
-
},
|
|
71
|
-
"./runtime-support": {
|
|
72
|
-
"types": "./dist/runtime-support.d.ts",
|
|
73
|
-
"default": "./dist/runtime-support.js"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
"type": "module",
|
|
77
|
-
"main": "./dist/index.js",
|
|
78
|
-
"types": "./dist/index.d.ts",
|
|
79
|
-
"files": [
|
|
80
|
-
"configure.js",
|
|
81
|
-
"controller.js",
|
|
82
|
-
"dist"
|
|
83
|
-
],
|
|
84
|
-
"sideEffects": false,
|
|
85
|
-
"devDependencies": {
|
|
86
|
-
"vite": "^8.0.1",
|
|
87
|
-
"typescript": "^5.9.3",
|
|
88
|
-
"@vitejs/plugin-react": "^6.0.1",
|
|
89
|
-
"@types/react": "^18.2.0",
|
|
90
|
-
"@types/react-dom": "^18.2.0"
|
|
91
|
-
},
|
|
92
|
-
"scripts": {
|
|
93
|
-
"build": "bun x vite build && bun x vite build --config ../../../tools/vite/element-browser.config.ts && bun x vite build --config vite.config.iife.ts && bun x tsc --emitDeclarationOnly",
|
|
94
|
-
"dev": "bun x vite",
|
|
95
|
-
"demo": "bun x vite --mode demo",
|
|
96
|
-
"test": "bun x vitest run"
|
|
97
|
-
},
|
|
98
|
-
"pie": {
|
|
99
|
-
"controller": "@pie-element/explicit-constructed-response/controller",
|
|
100
|
-
"configure": "@pie-element/explicit-constructed-response/configure",
|
|
101
|
-
"browserSharedDependencies": {
|
|
102
|
-
"react": "18.2.0",
|
|
103
|
-
"react-dom": "18.2.0"
|
|
104
|
-
}
|
|
36
|
+
".": "./src/index.js",
|
|
37
|
+
"./print": "./src/print.js"
|
|
105
38
|
}
|
|
106
39
|
}
|
package/configure.js
DELETED
package/controller.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/controller/index.js';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/explicit-constructed-response/configure/src/alternateResponses.jsx
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare class AlternateResponses extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
choicesErrors: PropTypes.Requireable<object>;
|
|
14
|
-
model: PropTypes.Validator<object>;
|
|
15
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
-
onLengthChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
-
maxLengthPerChoiceEnabled: PropTypes.Validator<boolean>;
|
|
18
|
-
spellCheck: PropTypes.Requireable<boolean>;
|
|
19
|
-
pluginProps: PropTypes.Requireable<object>;
|
|
20
|
-
};
|
|
21
|
-
state: {
|
|
22
|
-
maxLengthPerChoice: any;
|
|
23
|
-
};
|
|
24
|
-
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
25
|
-
componentDidMount(): void;
|
|
26
|
-
updateChoicesIfNeeded: any;
|
|
27
|
-
getRemainingChoices: any;
|
|
28
|
-
onChoiceChanged: any;
|
|
29
|
-
onChoiceRemoved: any;
|
|
30
|
-
onSectionSelect: any;
|
|
31
|
-
onLengthChanged: any;
|
|
32
|
-
render(): React.JSX.Element;
|
|
33
|
-
}
|
|
34
|
-
export default AlternateResponses;
|