Content inside supertokenslib
(The raw file follows this syntax highlighted file.)

(()=>{function O(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _(e){return function t(r){return arguments.length===0||O(r)?t:e.apply(this,arguments)}}function y(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return O(r)?t:_(function(o){return e(r,o)});default:return O(r)&&O(n)?t:O(r)?_(function(o){return e(o,n)}):O(n)?_(function(o){return e(r,o)}):e(r,n)}}}function at(e,t){e=e||[],t=t||[];var r,n=e.length,o=t.length,a=[];for(r=0;r<n;)a[a.length]=e[r],r+=1;for(r=0;r<o;)a[a.length]=t[r],r+=1;return a}function z(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(r){return t.apply(this,arguments)};case 2:return function(r,n){return t.apply(this,arguments)};case 3:return function(r,n,o){return t.apply(this,arguments)};case 4:return function(r,n,o,a){return t.apply(this,arguments)};case 5:return function(r,n,o,a,u){return t.apply(this,arguments)};case 6:return function(r,n,o,a,u,s){return t.apply(this,arguments)};case 7:return function(r,n,o,a,u,s,i){return t.apply(this,arguments)};case 8:return function(r,n,o,a,u,s,i,l){return t.apply(this,arguments)};case 9:return function(r,n,o,a,u,s,i,l,f){return t.apply(this,arguments)};case 10:return function(r,n,o,a,u,s,i,l,f,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _t(e,t,r){return function(){for(var n=[],o=0,a=e,u=0,s=!1;u<t.length||o<arguments.length;){var i;u<t.length&&(!O(t[u])||o>=arguments.length)?i=t[u]:(i=arguments[o],o+=1),n[u]=i,O(i)?s=!0:a-=1,u+=1}return!s&&a<=0?r.apply(this,n):z(Math.max(0,a),_t(e,n,r))}}var Vr=y(function(t,r){return t===1?_(r):z(t,_t(t,[],r))}),H=Vr;function Bt(e){return function t(r,n,o){switch(arguments.length){case 0:return t;case 1:return O(r)?t:y(function(a,u){return e(r,a,u)});case 2:return O(r)&&O(n)?t:O(r)?y(function(a,u){return e(a,n,u)}):O(n)?y(function(a,u){return e(r,a,u)}):_(function(a){return e(r,n,a)});default:return O(r)&&O(n)&&O(o)?t:O(r)&&O(n)?y(function(a,u){return e(a,u,o)}):O(r)&&O(o)?y(function(a,u){return e(a,n,u)}):O(n)&&O(o)?y(function(a,u){return e(r,a,u)}):O(r)?_(function(a){return e(a,n,o)}):O(n)?_(function(a){return e(r,a,o)}):O(o)?_(function(a){return e(r,n,a)}):e(r,n,o)}}}var G=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Dt(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function Q(e,t,r){return function(){if(arguments.length===0)return r();var n=arguments[arguments.length-1];if(!G(n)){for(var o=0;o<e.length;){if(typeof n[e[o]]=="function")return n[e[o]].apply(n,Array.prototype.slice.call(arguments,0,-1));o+=1}if(Dt(n)){var a=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(n)}}return r.apply(this,arguments)}}var W={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function wt(e){for(var t=[],r;!(r=e.next()).done;)t.push(r.value);return t}function bt(e,t,r){for(var n=0,o=r.length;n<o;){if(e(t,r[n]))return!0;n+=1}return!1}function Lt(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function M(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function zr(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:zr;var Pe=Object.prototype.toString,Hr=function(){return Pe.call(arguments)==="[object Arguments]"?function(t){return Pe.call(t)==="[object Arguments]"}:function(t){return M("callee",t)}}(),It=Hr;var Qr=!{toString:null}.propertyIsEnumerable("toString"),ke=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Te=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),Zr=function(t,r){for(var n=0;n<t.length;){if(t[n]===r)return!0;n+=1}return!1},Kr=typeof Object.keys=="function"&&!Te?_(function(t){return Object(t)!==t?[]:Object.keys(t)}):_(function(t){if(Object(t)!==t)return[];var r,n,o=[],a=Te&&It(t);for(r in t)M(r,t)&&(!a||r!=="length")&&(o[o.length]=r);if(Qr)for(n=ke.length-1;n>=0;)r=ke[n],M(r,t)&&!Zr(o,r)&&(o[o.length]=r),n-=1;return o}),E=Kr;var Jr=_(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),qt=Jr;function Ee(e,t,r,n){var o=wt(e),a=wt(t);function u(s,i){return it(s,i,r.slice(),n.slice())}return!bt(function(s,i){return!bt(u,i,s)},a,o)}function it(e,t,r,n){if(Ot(e,t))return!0;var o=qt(e);if(o!==qt(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&Lt(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&Ot(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Ot(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=r.length-1;a>=0;){if(r[a]===e)return n[a]===t;a-=1}switch(o){case"Map":return e.size!==t.size?!1:Ee(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size!==t.size?!1:Ee(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=E(e);if(u.length!==E(t).length)return!1;var s=r.concat([e]),i=n.concat([t]);for(a=u.length-1;a>=0;){var l=u[a];if(!(M(l,t)&&it(t[l],e[l],s,i)))return!1;a-=1}return!0}var Yr=y(function(t,r){return it(t,r,[],[])}),F=Yr;function Ut(e,t,r){var n,o;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(n=1/t;r<e.length;){if(o=e[r],o===0&&1/o===n)return r;r+=1}return-1}else if(t!==t){for(;r<e.length;){if(o=e[r],typeof o=="number"&&o!==o)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(t===null)return e.indexOf(t,r)}for(;r<e.length;){if(F(e[r],t))return r;r+=1}return-1}function Wt(e,t){return Ut(t,e,0)>=0}function Z(e,t){for(var r=0,n=t.length,o=Array(n);r<n;)o[r]=e(t[r]),r+=1;return o}function ut(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var st=function(t){return(t<10?"0":"")+t},Gr=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+st(t.getUTCMonth()+1)+"-"+st(t.getUTCDate())+"T"+st(t.getUTCHours())+":"+st(t.getUTCMinutes())+":"+st(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"},Ce=Gr;function $t(e){return function(){return!e.apply(this,arguments)}}function C(e,t,r){for(var n=0,o=r.length;n<o;)t=e(t,r[n]),n+=1;return t}function Ft(e,t){for(var r=0,n=t.length,o=[];r<n;)e(t[r])&&(o[o.length]=t[r]),r+=1;return o}function ft(e){return Object.prototype.toString.call(e)==="[object Object]"}var Xr=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=W.init,e.prototype["@@transducer/result"]=W.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.xf["@@transducer/step"](t,r):t},e}();function Vt(e){return function(t){return new Xr(e,t)}}var tn=y(Q(["fantasy-land/filter","filter"],Vt,function(e,t){return ft(t)?C(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{},E(t)):Ft(e,t)})),Re=tn;var en=y(function(t,r){return Re($t(t),r)}),Ne=en;function St(e,t){var r=function(u){var s=t.concat([e]);return Wt(u,s)?"<Circular>":St(u,s)},n=function(a,u){return Z(function(s){return ut(s)+": "+r(a[s])},u.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Z(r,e).join(", ")+"))";case"[object Array]":return"["+Z(r,e).concat(n(e,Ne(function(a){return/^\d+$/.test(a)},E(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):ut(Ce(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+r(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return typeof e=="object"?"new String("+r(e.valueOf())+")":ut(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var o=e.toString();if(o!=="[object Object]")return o}return"{"+n(e,E(e)).join(", ")+"}"}}var rn=_(function(t){return St(t,[])}),zt=rn;var nn=y(function(t,r){if(t===r)return r;function n(i,l){if(i>l!=l>i)return l>i?l:i}var o=n(t,r);if(o!==void 0)return o;var a=n(typeof t,typeof r);if(a!==void 0)return a===typeof t?t:r;var u=zt(t),s=n(u,zt(r));return s!==void 0&&s===u?t:r}),Me=nn;var on=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=W.init,e.prototype["@@transducer/result"]=W.result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,this.f(r))},e}(),an=function(t){return function(r){return new on(t,r)}},Be=an;var un=y(Q(["fantasy-land/map","map"],Be,function(t,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return H(r.length,function(){return t.call(this,r.apply(this,arguments))});case"[object Object]":return C(function(n,o){return n[o]=t(r[o]),n},{},E(r));default:return Z(t,r)}})),B=un;var De=Number.isInteger||function(t){return t<<0===t};function K(e){return Object.prototype.toString.call(e)==="[object String]"}var sn=y(function(t,r){var n=t<0?r.length+t:t;return K(r)?r.charAt(n):r[n]}),Le=sn;var fn=y(function(t,r){if(r!=null)return De(t)?Le(t,r):r[t]}),qe=fn;var ln=y(function(t,r){return B(qe(t),r)}),Ue=ln;var cn=_(function(t){return G(t)?!0:!t||typeof t!="object"||K(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1}),We=cn;var $e=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function lt(e,t,r){return function(o,a,u){if(We(u))return e(o,a,u);if(u==null)return a;if(typeof u["fantasy-land/reduce"]=="function")return t(o,a,u,"fantasy-land/reduce");if(u[$e]!=null)return r(o,a,u[$e]());if(typeof u.next=="function")return r(o,a,u);if(typeof u.reduce=="function")return t(o,a,u,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Ht(e,t,r){for(var n=0,o=r.length;n<o;){if(t=e["@@transducer/step"](t,r[n]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var pn=y(function(t,r){return z(t.length,function(){return t.apply(r,arguments)})}),Fe=pn;function dn(e,t,r){for(var n=r.next();!n.done;){if(t=e["@@transducer/step"](t,n.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function mn(e,t,r,n){return e["@@transducer/result"](r[n](Fe(e["@@transducer/step"],e),t))}var hn=lt(Ht,mn,dn),Ve=hn;var gn=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,r){return this.f(t,r)},e}();function Qt(e){return new gn(e)}var yn=Bt(function(e,t,r){return Ve(typeof e=="function"?Qt(e):e,t,r)}),ze=yn;var vn=_(function(t){return H(ze(Me,0,Ue("length",t)),function(){for(var r=0,n=t.length;r<n;){if(!t[r].apply(this,arguments))return!1;r+=1}return!0})}),Zt=vn;function xn(e,t,r){for(var n=r.next();!n.done;)t=e(t,n.value),n=r.next();return t}function _n(e,t,r,n){return r[n](e,t)}var wn=lt(C,_n,xn),He=wn;var bn=y(function(t,r){return typeof r["fantasy-land/ap"]=="function"?r["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(r):typeof t=="function"?function(n){return t(n)(r(n))}:He(function(n,o){return at(n,B(o,r))},[],t)}),Qe=bn;var On=y(function(t,r){return at(r,[t])}),Kt=On;var In=_(function(t){return t==null}),Ze=In;var Sn=y(function(t,r){var n=H(t,r);return H(t,function(){return C(Qe,B(n,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Ke=Sn;var An=_(function(t){return Ke(t.length,t)}),Je=An;var jn=_(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),Jt=jn;var Pn=_(function(t){return!t}),Ye=Pn;var kn=Je(Ye),Yt=kn;function Gt(e){return e}var Tn=_(Gt),X=Tn;function Xt(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var En=_(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():G(t)?[]:K(t)?"":ft(t)?{}:It(t)?function(){return arguments}():Xt(t)?t.constructor.from(""):void 0}),Ge=En;function Cn(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;r<n;){var o=arguments[r];if(o!=null)for(var a in o)M(a,o)&&(t[a]=o[a]);r+=1}return t}var At=typeof Object.assign=="function"?Object.assign:Cn;var Rn=y(function(t,r){return r instanceof t||r!=null&&(r.constructor===t||t.name==="Object"&&typeof r=="object")}),te=Rn;var Nn=_(function(t){return t!=null&&F(t,Ge(t))}),ee=Nn;var Mn=_(function(t){return!Ze(t)}),re=Mn;var Bn=y(function(t,r){return C(function(n,o){return n[o]=t(r[o],o,r),n},{},E(r))}),ne=Bn;var Dn=y(function(t,r){return At({},r,t)}),jt=Dn;var Ln=y(function(t,r){return At({},t,r)}),ct=Ln;var qn=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=W.init,e.prototype["@@transducer/result"]=W.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r),this.xf["@@transducer/step"](t,r)},e}();function oe(e){return function(t){return new qn(e,t)}}var Un=y(Q([],oe,function(t,r){return t(r),r})),pt=Un;var or={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},se={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},$n=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Pt={CSS:{},springs:{}};function D(e,t,r){return Math.min(Math.max(e,t),r)}function dt(e,t){return e.indexOf(t)>-1}function ae(e,t){return e.apply(null,t)}var p={arr:function(e){return Array.isArray(e)},obj:function(e){return dt(Object.prototype.toString.call(e),"Object")},pth:function(e){return p.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||p.svg(e)},str:function(e){return typeof e=="string"},fnc:function(e){return typeof e=="function"},und:function(e){return typeof e>"u"},nil:function(e){return p.und(e)||e===null},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return p.hex(e)||p.rgb(e)||p.hsl(e)},key:function(e){return!or.hasOwnProperty(e)&&!se.hasOwnProperty(e)&&e!=="targets"&&e!=="keyframes"}};function ar(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(r){return parseFloat(r)}):[]}function ir(e,t){var r=ar(e),n=D(p.und(r[0])?1:r[0],.1,100),o=D(p.und(r[1])?100:r[1],.1,100),a=D(p.und(r[2])?10:r[2],.1,100),u=D(p.und(r[3])?0:r[3],.1,100),s=Math.sqrt(o/n),i=a/(2*Math.sqrt(o*n)),l=i<1?s*Math.sqrt(1-i*i):0,f=1,c=i<1?(i*s+-u)/l:-u+s;function m(v){var h=t?t*v/1e3:v;return i<1?h=Math.exp(-h*i*s)*(f*Math.cos(l*h)+c*Math.sin(l*h)):h=(f+c*h)*Math.exp(-h*s),v===0||v===1?v:1-h}function I(){var v=Pt.springs[e];if(v)return v;for(var h=1/6,d=0,S=0;;)if(d+=h,m(d)===1){if(S++,S>=16)break}else S=0;var k=d*h*1e3;return Pt.springs[e]=k,k}return t?m:I}function Fn(e){return e===void 0&&(e=10),function(t){return Math.ceil(D(t,1e-6,1)*e)*(1/e)}}var Vn=function(){var e=11,t=1/(e-1);function r(f,c){return 1-3*c+3*f}function n(f,c){return 3*c-6*f}function o(f){return 3*f}function a(f,c,m){return((r(c,m)*f+n(c,m))*f+o(c))*f}function u(f,c,m){return 3*r(c,m)*f*f+2*n(c,m)*f+o(c)}function s(f,c,m,I,v){var h,d,S=0;do d=c+(m-c)/2,h=a(d,I,v)-f,h>0?m=d:c=d;while(Math.abs(h)>1e-7&&++S<10);return d}function i(f,c,m,I){for(var v=0;v<4;++v){var h=u(c,m,I);if(h===0)return c;var d=a(c,m,I)-f;c-=d/h}return c}function l(f,c,m,I){if(!(0<=f&&f<=1&&0<=m&&m<=1))return;var v=new Float32Array(e);if(f!==c||m!==I)for(var h=0;h<e;++h)v[h]=a(h*t,f,m);function d(S){for(var k=0,g=1,x=e-1;g!==x&&v[g]<=S;++g)k+=t;--g;var w=(S-v[g])/(v[g+1]-v[g]),b=k+w*t,A=u(b,f,m);return A>=.001?i(S,b,f,m):A===0?b:s(S,k,k+t,f,m)}return function(S){return f===c&&m===I||S===0||S===1?S:a(d(S),c,I)}}return l}(),ur=function(){var e={linear:function(){return function(n){return n}}},t={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var o,a=4;n<((o=Math.pow(2,--a))-1)/11;);return 1/Math.pow(4,3-a)-7.5625*Math.pow((o*3-2)/22-n,2)}},Elastic:function(n,o){n===void 0&&(n=1),o===void 0&&(o=.5);var a=D(n,1,10),u=D(o,.1,2);return function(s){return s===0||s===1?s:-a*Math.pow(2,10*(s-1))*Math.sin((s-1-u/(Math.PI*2)*Math.asin(1/a))*(Math.PI*2)/u)}}},r=["Quad","Cubic","Quart","Quint","Expo"];return r.forEach(function(n,o){t[n]=function(){return function(a){return Math.pow(a,o+2)}}}),Object.keys(t).forEach(function(n){var o=t[n];e["easeIn"+n]=o,e["easeOut"+n]=function(a,u){return function(s){return 1-o(a,u)(1-s)}},e["easeInOut"+n]=function(a,u){return function(s){return s<.5?o(a,u)(s*2)/2:1-o(a,u)(s*-2+2)/2}},e["easeOutIn"+n]=function(a,u){return function(s){return s<.5?(1-o(a,u)(1-s*2))/2:(o(a,u)(s*2-1)+1)/2}}}),e}();function fe(e,t){if(p.fnc(e))return e;var r=e.split("(")[0],n=ur[r],o=ar(e);switch(r){case"spring":return ir(e,t);case"cubicBezier":return ae(Vn,o);case"steps":return ae(Fn,o);default:return ae(n,o)}}function sr(e){try{var t=document.querySelectorAll(e);return t}catch{return}}function kt(e,t){for(var r=e.length,n=arguments.length>=2?arguments[1]:void 0,o=[],a=0;a<r;a++)if(a in e){var u=e[a];t.call(n,u,a,e)&&o.push(u)}return o}function Tt(e){return e.reduce(function(t,r){return t.concat(p.arr(r)?Tt(r):r)},[])}function Xe(e){return p.arr(e)?e:(p.str(e)&&(e=sr(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function le(e,t){return e.some(function(r){return r===t})}function ce(e){var t={};for(var r in e)t[r]=e[r];return t}function ie(e,t){var r=ce(e);for(var n in e)r[n]=t.hasOwnProperty(n)?t[n]:e[n];return r}function Et(e,t){var r=ce(e);for(var n in t)r[n]=p.und(e[n])?t[n]:e[n];return r}function zn(e){var t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?"rgba("+t[1]+",1)":e}function Hn(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=e.replace(t,function(s,i,l,f){return i+i+l+l+f+f}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r),o=parseInt(n[1],16),a=parseInt(n[2],16),u=parseInt(n[3],16);return"rgba("+o+","+a+","+u+",1)"}function Qn(e){var t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),r=parseInt(t[1],10)/360,n=parseInt(t[2],10)/100,o=parseInt(t[3],10)/100,a=t[4]||1;function u(m,I,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?m+(I-m)*6*v:v<1/2?I:v<2/3?m+(I-m)*(2/3-v)*6:m}var s,i,l;if(n==0)s=i=l=o;else{var f=o<.5?o*(1+n):o+n-o*n,c=2*o-f;s=u(c,f,r+1/3),i=u(c,f,r),l=u(c,f,r-1/3)}return"rgba("+s*255+","+i*255+","+l*255+","+a+")"}function Zn(e){if(p.rgb(e))return zn(e);if(p.hex(e))return Hn(e);if(p.hsl(e))return Qn(e)}function $(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function Kn(e){if(dt(e,"translate")||e==="perspective")return"px";if(dt(e,"rotate")||dt(e,"skew"))return"deg"}function ue(e,t){return p.fnc(e)?e(t.target,t.id,t.total):e}function L(e,t){return e.getAttribute(t)}function pe(e,t,r){var n=$(t);if(le([r,"deg","rad","turn"],n))return t;var o=Pt.CSS[t+r];if(!p.und(o))return o;var a=100,u=document.createElement(e.tagName),s=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;s.appendChild(u),u.style.position="absolute",u.style.width=a+r;var i=a/u.offsetWidth;s.removeChild(u);var l=i*parseFloat(t);return Pt.CSS[t+r]=l,l}function fr(e,t,r){if(t in e.style){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=e.style[t]||getComputedStyle(e).getPropertyValue(n)||"0";return r?pe(e,o,r):o}}function de(e,t){if(p.dom(e)&&!p.inp(e)&&(!p.nil(L(e,t))||p.svg(e)&&e[t]))return"attribute";if(p.dom(e)&&le($n,t))return"transform";if(p.dom(e)&&t!=="transform"&&fr(e,t))return"css";if(e[t]!=null)return"object"}function lr(e){if(p.dom(e)){for(var t=e.style.transform||"",r=/(\w+)\(([^)]*)\)/g,n=new Map,o;o=r.exec(t);)n.set(o[1],o[2]);return n}}function Jn(e,t,r,n){var o=dt(t,"scale")?1:0+Kn(t),a=lr(e).get(t)||o;return r&&(r.transforms.list.set(t,a),r.transforms.last=t),n?pe(e,a,n):a}function me(e,t,r,n){switch(de(e,t)){case"transform":return Jn(e,t,n,r);case"css":return fr(e,t,r);case"attribute":return L(e,t);default:return e[t]||0}}function he(e,t){var r=/^(\*=|\+=|-=)/.exec(e);if(!r)return e;var n=$(e)||0,o=parseFloat(t),a=parseFloat(e.replace(r[0],""));switch(r[0][0]){case"+":return o+a+n;case"-":return o-a+n;case"*":return o*a+n}}function cr(e,t){if(p.col(e))return Zn(e);if(/\s/g.test(e))return e;var r=$(e),n=r?e.substr(0,e.length-r.length):e;return t?n+t:n}function ge(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Yn(e){return Math.PI*2*L(e,"r")}function Gn(e){return L(e,"width")*2+L(e,"height")*2}function Xn(e){return ge({x:L(e,"x1"),y:L(e,"y1")},{x:L(e,"x2"),y:L(e,"y2")})}function pr(e){for(var t=e.points,r=0,n,o=0;o<t.numberOfItems;o++){var a=t.getItem(o);o>0&&(r+=ge(n,a)),n=a}return r}function to(e){var t=e.points;return pr(e)+ge(t.getItem(t.numberOfItems-1),t.getItem(0))}function dr(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return Yn(e);case"rect":return Gn(e);case"line":return Xn(e);case"polyline":return pr(e);case"polygon":return to(e)}}function eo(e){var t=dr(e);return e.setAttribute("stroke-dasharray",t),t}function ro(e){for(var t=e.parentNode;p.svg(t)&&p.svg(t.parentNode);)t=t.parentNode;return t}function mr(e,t){var r=t||{},n=r.el||ro(e),o=n.getBoundingClientRect(),a=L(n,"viewBox"),u=o.width,s=o.height,i=r.viewBox||(a?a.split(" "):[0,0,u,s]);return{el:n,viewBox:i,x:i[0]/1,y:i[1]/1,w:u,h:s,vW:i[2],vH:i[3]}}function no(e,t){var r=p.str(e)?sr(e)[0]:e,n=t||100;return function(o){return{property:o,el:r,svg:mr(r),totalLength:dr(r)*(n/100)}}}function oo(e,t,r){function n(f){f===void 0&&(f=0);var c=t+f>=1?t+f:0;return e.el.getPointAtLength(c)}var o=mr(e.el,e.svg),a=n(),u=n(-1),s=n(1),i=r?1:o.w/o.vW,l=r?1:o.h/o.vH;switch(e.property){case"x":return(a.x-o.x)*i;case"y":return(a.y-o.y)*l;case"angle":return Math.atan2(s.y-u.y,s.x-u.x)*180/Math.PI}}function tr(e,t){var r=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=cr(p.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(r)?n.match(r).map(Number):[0],strings:p.str(e)||t?n.split(r):[]}}function ye(e){var t=e?Tt(p.arr(e)?e.map(Xe):Xe(e)):[];return kt(t,function(r,n,o){return o.indexOf(r)===n})}function hr(e){var t=ye(e);return t.map(function(r,n){return{target:r,id:n,total:t.length,transforms:{list:lr(r)}}})}function ao(e,t){var r=ce(t);if(/^spring/.test(r.easing)&&(r.duration=ir(r.easing)),p.arr(e)){var n=e.length,o=n===2&&!p.obj(e[0]);o?e={value:e}:p.fnc(t.duration)||(r.duration=t.duration/n)}var a=p.arr(e)?e:[e];return a.map(function(u,s){var i=p.obj(u)&&!p.pth(u)?u:{value:u};return p.und(i.delay)&&(i.delay=s?0:t.delay),p.und(i.endDelay)&&(i.endDelay=s===a.length-1?t.endDelay:0),i}).map(function(u){return Et(u,r)})}function io(e){for(var t=kt(Tt(e.map(function(a){return Object.keys(a)})),function(a){return p.key(a)}).reduce(function(a,u){return a.indexOf(u)<0&&a.push(u),a},[]),r={},n=function(a){var u=t[a];r[u]=e.map(function(s){var i={};for(var l in s)p.key(l)?l==u&&(i.value=s[l]):i[l]=s[l];return i})},o=0;o<t.length;o++)n(o);return r}function uo(e,t){var r=[],n=t.keyframes;n&&(t=Et(io(n),t));for(var o in t)p.key(o)&&r.push({name:o,tweens:ao(t[o],e)});return r}function so(e,t){var r={};for(var n in e){var o=ue(e[n],t);p.arr(o)&&(o=o.map(function(a){return ue(a,t)}),o.length===1&&(o=o[0])),r[n]=o}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}function fo(e,t){var r;return e.tweens.map(function(n){var o=so(n,t),a=o.value,u=p.arr(a)?a[1]:a,s=$(u),i=me(t.target,e.name,s,t),l=r?r.to.original:i,f=p.arr(a)?a[0]:l,c=$(f)||$(i),m=s||c;return p.und(u)&&(u=l),o.from=tr(f,m),o.to=tr(he(u,f),m),o.start=r?r.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=fe(o.easing,o.duration),o.isPath=p.pth(a),o.isPathTargetInsideSVG=o.isPath&&p.svg(t.target),o.isColor=p.col(o.from.original),o.isColor&&(o.round=1),r=o,o})}var gr={css:function(e,t,r){return e.style[t]=r},attribute:function(e,t,r){return e.setAttribute(t,r)},object:function(e,t,r){return e[t]=r},transform:function(e,t,r,n,o){if(n.list.set(t,r),t===n.last||o){var a="";n.list.forEach(function(u,s){a+=s+"("+u+") "}),e.style.transform=a}}};function yr(e,t){var r=hr(e);r.forEach(function(n){for(var o in t){var a=ue(t[o],n),u=n.target,s=$(a),i=me(u,o,s,n),l=s||$(i),f=he(cr(a,l),i),c=de(u,o);gr[c](u,o,f,n.transforms,!0)}})}function lo(e,t){var r=de(e.target,t.name);if(r){var n=fo(t,e),o=n[n.length-1];return{type:r,property:t.name,animatable:e,tweens:n,duration:o.end,delay:n[0].delay,endDelay:o.endDelay}}}function co(e,t){return kt(Tt(e.map(function(r){return t.map(function(n){return lo(r,n)})})),function(r){return!p.und(r)})}function vr(e,t){var r=e.length,n=function(a){return a.timelineOffset?a.timelineOffset:0},o={};return o.duration=r?Math.max.apply(Math,e.map(function(a){return n(a)+a.duration})):t.duration,o.delay=r?Math.min.apply(Math,e.map(function(a){return n(a)+a.delay})):t.delay,o.endDelay=r?o.duration-Math.max.apply(Math,e.map(function(a){return n(a)+a.duration-a.endDelay})):t.endDelay,o}var er=0;function po(e){var t=ie(or,e),r=ie(se,e),n=uo(r,e),o=hr(e.targets),a=co(o,n),u=vr(a,r),s=er;return er++,Et(t,{id:s,children:[],animatables:o,animations:a,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}var R=[],xr=function(){var e;function t(){!e&&(!rr()||!j.suspendWhenDocumentHidden)&&R.length>0&&(e=requestAnimationFrame(r))}function r(o){for(var a=R.length,u=0;u<a;){var s=R[u];s.paused?(R.splice(u,1),a--):(s.tick(o),u++)}e=u>0?requestAnimationFrame(r):void 0}function n(){j.suspendWhenDocumentHidden&&(rr()?e=cancelAnimationFrame(e):(R.forEach(function(o){return o._onDocumentVisibility()}),xr()))}return typeof document<"u"&&document.addEventListener("visibilitychange",n),t}();function rr(){return!!document&&document.hidden}function j(e){e===void 0&&(e={});var t=0,r=0,n=0,o,a=0,u=null;function s(g){var x=window.Promise&&new Promise(function(w){return u=w});return g.finished=x,x}var i=po(e),l=s(i);function f(){var g=i.direction;g!=="alternate"&&(i.direction=g!=="normal"?"normal":"reverse"),i.reversed=!i.reversed,o.forEach(function(x){return x.reversed=i.reversed})}function c(g){return i.reversed?i.duration-g:g}function m(){t=0,r=c(i.currentTime)*(1/j.speed)}function I(g,x){x&&x.seek(g-x.timelineOffset)}function v(g){if(i.reversePlayback)for(var w=a;w--;)I(g,o[w]);else for(var x=0;x<a;x++)I(g,o[x])}function h(g){for(var x=0,w=i.animations,b=w.length;x<b;){var A=w[x],V=A.animatable,N=A.tweens,J=N.length-1,P=N[J];J&&(P=kt(N,function(Fr){return g<Fr.end})[0]||P);for(var vt=D(g-P.start-P.delay,0,P.duration)/P.duration,U=isNaN(vt)?1:P.easing(vt),xt=P.to.strings,Rt=P.round,Nt=[],$r=P.to.numbers.length,Y=void 0,rt=0;rt<$r;rt++){var nt=void 0,Ie=P.to.numbers[rt],Se=P.from.numbers[rt]||0;P.isPath?nt=oo(P.value,U*Ie,P.isPathTargetInsideSVG):nt=Se+U*(Ie-Se),Rt&&(P.isColor&&rt>2||(nt=Math.round(nt*Rt)/Rt)),Nt.push(nt)}var Ae=xt.length;if(!Ae)Y=Nt[0];else{Y=xt[0];for(var ot=0;ot<Ae;ot++){var jo=xt[ot],je=xt[ot+1],Mt=Nt[ot];isNaN(Mt)||(je?Y+=Mt+je:Y+=Mt+" ")}}gr[A.type](V.target,A.property,Y,V.transforms),A.currentValue=Y,x++}}function d(g){i[g]&&!i.passThrough&&i[g](i)}function S(){i.remaining&&i.remaining!==!0&&i.remaining--}function k(g){var x=i.duration,w=i.delay,b=x-i.endDelay,A=c(g);i.progress=D(A/x*100,0,100),i.reversePlayback=A<i.currentTime,o&&v(A),!i.began&&i.currentTime>0&&(i.began=!0,d("begin")),!i.loopBegan&&i.currentTime>0&&(i.loopBegan=!0,d("loopBegin")),A<=w&&i.currentTime!==0&&h(0),(A>=b&&i.currentTime!==x||!x)&&h(x),A>w&&A<b?(i.changeBegan||(i.changeBegan=!0,i.changeCompleted=!1,d("changeBegin")),d("change"),h(A)):i.changeBegan&&(i.changeCompleted=!0,i.changeBegan=!1,d("changeComplete")),i.currentTime=D(A,0,x),i.began&&d("update"),g>=x&&(r=0,S(),i.remaining?(t=n,d("loopComplete"),i.loopBegan=!1,i.direction==="alternate"&&f()):(i.paused=!0,i.completed||(i.completed=!0,d("loopComplete"),d("complete"),!i.passThrough&&"Promise"in window&&(u(),l=s(i)))))}return i.reset=function(){var g=i.direction;i.passThrough=!1,i.currentTime=0,i.progress=0,i.paused=!0,i.began=!1,i.loopBegan=!1,i.changeBegan=!1,i.completed=!1,i.changeCompleted=!1,i.reversePlayback=!1,i.reversed=g==="reverse",i.remaining=i.loop,o=i.children,a=o.length;for(var x=a;x--;)i.children[x].reset();(i.reversed&&i.loop!==!0||g==="alternate"&&i.loop===1)&&i.remaining++,h(i.reversed?i.duration:0)},i._onDocumentVisibility=m,i.set=function(g,x){return yr(g,x),i},i.tick=function(g){n=g,t||(t=n),k((n+(r-t))*j.speed)},i.seek=function(g){k(c(g))},i.pause=function(){i.paused=!0,m()},i.play=function(){i.paused&&(i.completed&&i.reset(),i.paused=!1,R.push(i),m(),xr())},i.reverse=function(){f(),i.completed=!i.reversed,m()},i.restart=function(){i.reset(),i.play()},i.remove=function(g){var x=ye(g);_r(x,i)},i.reset(),i.autoplay&&i.play(),i}function nr(e,t){for(var r=t.length;r--;)le(e,t[r].animatable.target)&&t.splice(r,1)}function _r(e,t){var r=t.animations,n=t.children;nr(e,r);for(var o=n.length;o--;){var a=n[o],u=a.animations;nr(e,u),!u.length&&!a.children.length&&n.splice(o,1)}!r.length&&!n.length&&t.pause()}function mo(e){for(var t=ye(e),r=R.length;r--;){var n=R[r];_r(t,n)}}function ho(e,t){t===void 0&&(t={});var r=t.direction||"normal",n=t.easing?fe(t.easing):null,o=t.grid,a=t.axis,u=t.from||0,s=u==="first",i=u==="center",l=u==="last",f=p.arr(e),c=parseFloat(f?e[0]:e),m=f?parseFloat(e[1]):0,I=$(f?e[1]:e)||0,v=t.start||0+(f?c:0),h=[],d=0;return function(S,k,g){if(s&&(u=0),i&&(u=(g-1)/2),l&&(u=g-1),!h.length){for(var x=0;x<g;x++){if(!o)h.push(Math.abs(u-x));else{var w=i?(o[0]-1)/2:u%o[0],b=i?(o[1]-1)/2:Math.floor(u/o[0]),A=x%o[0],V=Math.floor(x/o[0]),N=w-A,J=b-V,P=Math.sqrt(N*N+J*J);a==="x"&&(P=-N),a==="y"&&(P=-J),h.push(P)}d=Math.max.apply(Math,h)}n&&(h=h.map(function(U){return n(U/d)*d})),r==="reverse"&&(h=h.map(function(U){return a?U<0?U*-1:-U:Math.abs(d-U)}))}var vt=f?(m-c)/d:c;return v+vt*(Math.round(h[k]*100)/100)+I}}function go(e){e===void 0&&(e={});var t=j(e);return t.duration=0,t.add=function(r,n){var o=R.indexOf(t),a=t.children;o>-1&&R.splice(o,1);function u(m){m.passThrough=!0}for(var s=0;s<a.length;s++)u(a[s]);var i=Et(r,ie(se,e));i.targets=i.targets||e.targets;var l=t.duration;i.autoplay=!1,i.direction=t.direction,i.timelineOffset=p.und(n)?l:he(n,l),u(t),t.seek(i.timelineOffset);var f=j(i);u(f),a.push(f);var c=vr(a,e);return t.delay=c.delay,t.endDelay=c.endDelay,t.duration=c.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t}j.version="3.2.1";j.speed=1;j.suspendWhenDocumentHidden=!0;j.running=R;j.remove=mo;j.get=me;j.set=yr;j.convertPx=pe;j.path=no;j.setDashoffset=eo;j.stagger=ho;j.timeline=go;j.easing=fe;j.penner=ur;j.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};var tt=j;var Or=0,Ir=Object.create(null),yo=["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","columns","counter-increment","counter-reset","flex","flex-grow","flex-positive","flex-shrink","flex-negative","flex-order","font-weight","grid-area","grid-column","grid-column-end","grid-column-span","grid-column-start","grid-row","grid-row-end","grid-row-span","grid-row-start","line-clamp","line-height","opacity","order","orphans","tab-size","widows","z-index","zoom","fill-opacity","flood-opacity","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width"];for(let e of yo)for(let t of["-webkit-","-ms-","-moz-","-o-",""])Ir[t+e]=!0;function ve(e,t){return e.replace(/&/g,t)}function wr(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^ms-/,"-ms-")}function vo(e){let t=5381,r=e.length;for(;r--;)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function xo(e,t){return e.indexOf("&")===-1?`${t} ${e}`:ve(e,t)}function br(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:e[2]-t[2]}function _o([e,t]){return typeof t=="number"&&t&&!Ir[e]?`${e}:${t}px`:`${e}:${String(t)}`}function Sr(e,t,r,n,o){let a=[],u=[];for(let h of Object.keys(n)){let d=n[h];if(h.charCodeAt(0)!==36&&d!=null)if(Array.isArray(d)){let S=wr(h);for(let k=0;k<d.length;k++){let g=d[k];g!=null&&a.push([S,g,k])}}else typeof d=="object"?u.push([h,d,0]):a.push([wr(h),d,0])}let s=!!n.$unique,i=n.$global?"":o,l=i?u:u.sort(br),f=a.sort(br).map(_o).join(";"),c=f,m=i,I=e,v=t;r.charCodeAt(0)===64?(I=[],v=[],i&&f&&v.push({selector:m,style:f,isUnique:s}),e.push({selector:r,rules:I,styles:v,style:i?"":f})):(m=i?r?xo(r,i):i:r,f&&t.push({selector:m,style:f,isUnique:s}));for(let[h,d]of l)c+=`|${h}#${Sr(I,v,h,d,m)}`;return c}function Ar(e,t,r,n,o){for(let{selector:a,style:u,isUnique:s}of r){let i=ve(a,o),l=new _e(u,s?(++Or).toString(36):n);l.add(new xe(i)),e.add(l)}for(let{selector:a,style:u,rules:s,styles:i}of t){let l=ve(a,o),f=new we(l,u,n);Ar(f,s,i,n,o),e.add(f)}}function jr(e){let t="";for(let r=0;r<e.length;r++)t+=e[r];return t}var mt=class e{constructor(t){this.changes=t,this.sheet=[],this.changeId=0,this._keys=[],this._children=Object.create(null),this._counters=Object.create(null)}add(t){let r=t.id,n=this._counters[r]||0,o=this._children[r]||t.clone();if(this._counters[r]=n+1,n===0)this._children[r]=o,this._keys.push(r),this.sheet.push(o.getStyles()),this.changeId++,this.changes&&this.changes.add(o,this._keys.length-1);else if(o instanceof e&&t instanceof e){let a=o.changeId;if(o.merge(t),o.changeId!==a){let u=this._keys.indexOf(r);this.sheet.splice(u,1,o.getStyles()),this.changeId++,this.changes&&this.changes.change(o,u,u)}}}remove(t){let r=t.id,n=this._counters[r];if(n){this._counters[r]=n-1;let o=this._children[r],a=this._keys.indexOf(r);if(n===1)delete this._counters[r],delete this._children[r],this._keys.splice(a,1),this.sheet.splice(a,1),this.changeId++,this.changes&&this.changes.remove(o,a);else if(o instanceof e&&t instanceof e){let u=o.changeId;o.unmerge(t),o.changeId!==u&&(this.sheet.splice(a,1,o.getStyles()),this.changeId++,this.changes&&this.changes.change(o,a,a))}}}values(){return this._keys.map(t=>this._children[t])}merge(t){for(let r of t.values())this.add(r);return this}unmerge(t){for(let r of t.values())this.remove(r);return this}clone(){return new e().merge(this)}},xe=class{constructor(t){this.selector=t}get id(){return`k:${this.selector}`}getStyles(){return this.selector}clone(){return this}},_e=class e extends mt{constructor(t,r){super(),this.style=t,this.pid=r}get id(){return`s:${this.pid}:${this.style}`}getStyles(){return`${this.sheet.join(",")}{${this.style}}`}clone(){return new e(this.style,this.pid).merge(this)}},we=class e extends mt{constructor(t,r,n){super(),this.rule=t,this.style=r,this.pid=n}get id(){return`r:${this.pid}:${this.rule}:${this.style}`}getStyles(){return`${this.rule}{${this.style}${jr(this.sheet)}}`}clone(){return new e(this.rule,this.style,this.pid).merge(this)}},be=class e extends mt{constructor(t,r){super(r),this.id=t}registerStyle(t){let r=[],n=[],o=Sr(r,n,"",t,".&"),a=`f${vo(o)}`;return Ar(this,r,n,a,a),a}getStyles(){return jr(this.sheet)}clone(){return new e(this.id,this.changes).merge(this)}};function Pr(e){return new be(`f${(++Or).toString(36)}`,e)}var qr=Zt([re,Yt(ee)]),wo=(e,...t)=>{let r=e,n=t;return{state:()=>r,setState:o=>{r=o,B(Jt,n)},subscribe:o=>n=Kt(o,n)}},ht=document,Oe=e=>ht.createElement(e),bo=e=>ht.createTextNode(e),Oo=e=>ht.head.appendChild(e),Ur=e=>ht.body.appendChild(e),T=(e,t,...r)=>{let n=Oe(e);return ne((o,a)=>n[a]=o,t),B(o=>{o&&n.appendChild(te(String,o)?bo(o):o)},r),n},et=e=>ht.getElementById(e),kr=e=>et(e).value,Ct=e=>et(e).disabled=!0,Tr=e=>{qr(et(e))&&et(e).offsetParent!=null&&et(e).focus()},gt=e=>"{{.Cfg.SuperTokensWebLibBase}}"+e,yt=e=>{let t=Oe("script");t.setAttribute("src",e),t.async=!1,Ur(t)};yt(gt("/website.js"));yt(gt("/supertokens.js"));yt(gt("/session.js"));yt(gt("/passwordless.js"));yt(gt("/emailverification.js"));var q=e=>{let t=Pr(),r=t.registerStyle(e),n=Oe("style");return n.textContent=t.getStyles(),Oo(n),r},Io=q({position:"absolute",top:"12px",right:"12px",zIndex:999,display:"flex",alignItems:"flex-start"}),Er=q({padding:"4px",cursor:"pointer",marginLeft:"12px",fontVariant:"small-caps"}),Cr=q({width:"32px",height:"32px",padding:"4px",border:0,cursor:"pointer",borderRadius:"16px",marginLeft:"12px"}),Rr=q({width:"24px",height:"24px"}),Nr=q({display:"flex",flexDirection:"column",input:{marginBottom:"10px"}}),Mr=q({textAlign:"center"}),Br=q({opacity:"0%"}),Dr=q({marginTop:"10px"}),Wr={display:"flex",alignItems:"center"},So=q(Wr),Ao=q(ct(Wr,{width:"32px",height:"32px",justifyContent:"center"})),Lr=e=>()=>{tt({targets:e,opacity:["0%","100%"],duration:1e3,easing:"easeInOutQuad",complete:()=>{tt({targets:e,opacity:["100%","0%"],duration:1e3,delay:2e3,easing:"easeInOutQuad",complete:()=>{tt.remove(e)}})}})};window.onload=()=>{let e=F("{{.Cfg.PlainUI}}","true"),t=w=>"{{.Cfg.APIBasePath}}"+w,r=()=>F("{{.LoggedIn}}","true"),n=()=>"{{.UserEmail}}",o=()=>"{{.UserID}}",a="st"+crypto.randomUUID(),u=wo({init:!0,label:"...",stState:"init"}),s=(w,b)=>w.setState(I(ct(w.state(),b))),i=w=>b=>{(b.key==="Enter"||b.keyCode===13)&&w()},l=()=>{globalThis.stAuth.sendOTP(kr(a+"email")),Ct(a+"email"),Ct(a+"emailButton")},f=()=>{globalThis.stAuth.verifyOTP(kr(a+"otp")),Ct(a+"otp"),Ct(a+"otpButton")},c=()=>{u.setState(ct(u.state(),{stState:"init",displayState:m.init()})),d.state("loggedOut")},m={init:()=>null,enterEmail:()=>T("div",{className:Nr},T("input",{id:a+"email",type:"text",placeholder:"your.email@address.com",onkeyup:i(l),className:Mr}),T("button",{id:a+"emailButton",onclick:l},"Request one-time code"),T("button",{className:Dr,onclick:c},"Close")),enterOTP:()=>T("div",{className:Nr},T("input",{id:a+"otp",type:"text",placeholder:"One-time code",onkeyup:i(f),className:Mr}),T("button",{id:a+"otpButton",onclick:f},"Verify code"),T("button",{className:Dr,onclick:c},"Close")),showEmail:()=>e?T("div",{className:So},T("div",{id:a+"userEmail",className:Br},n()),T("a",{href:"#",className:Er,onclick:Lr("#"+a+"userEmail")},"user")):T("div",{className:Ao},T("div",{id:a+"userEmail",className:Br},n()),T("button",{className:Cr,onclick:Lr("#"+a+"userEmail")},T("img",{className:Rr,src:r()?t("/person_outline.svg"):null})))},I=w=>({loggedOut:X,checkEmail:jt({displayState:m.enterOTP()}),wrongOTP:X,oldOTP:X,failedOTP:X,signUpSuccess:pt(()=>window.location.reload()),signInSuccess:pt(()=>window.location.reload()),loggedIn:jt({displayState:m.showEmail()}),logoutCompleted:pt(()=>window.location.reload())})[w.stState](w),v=()=>{u.state().stState==="loggedOut"?s(u,{displayState:m.enterEmail()}):u.state().stState==="loggedIn"&&globalThis.stAuth.logout()},h=()=>T("div",{id:a,className:Io,style:"opacity:"+(u.state().stState=="init"?0:100)+"%;"},u.state().displayState,e?T("a",{href:"#",className:Er,onclick:v},r()?"logout":"login"):T("button",{className:Cr,onclick:v},T("img",{className:Rr,src:t(r()?"/logout.svg":"/login.svg")})));u.subscribe(()=>{et(a).replaceWith(h()),Tr(a+"email"),Tr(a+"otp")}),Ur(h());let d={catch:(w,b)=>showError(w,b),state:(w,b)=>s(u,{stState:w,stData:b})},S=(w,b)=>d.catch(w+(b.isSuperTokensGeneralError?" (some other failure)":""),b);supertokens.init({appInfo:{apiDomain:"{{.Cfg.APIDomain}}",apiBasePath:"{{.Cfg.APIBasePath}}",appName:"{{.Cfg.AppName}}"},recipeList:[supertokensEmailVerification.init(),supertokensSession.init(),supertokensPasswordless.init()]});let k=async w=>{try{(await supertokensPasswordless.createCode({email:w})).status!="SIGN_IN_UP_NOT_ALLOWED"&&d.state("checkEmail")}catch(b){S("sendOTP",b)}},g=async w=>{try{let b=await supertokensPasswordless.consumeCode({userInputCode:w});b.status==="OK"?b.createdNewRecipeUser&&b.user.loginMethods.length===1?d.state("signUpSuccess",b.user.id):d.state("signInSuccess",b.user.id):b.status==="INCORRECT_USER_INPUT_CODE_ERROR"?d.state("wrongOTP"):b.status==="EXPIRED_USER_INPUT_CODE_ERROR"?d.state("oldOTP"):d.state("failedOTP")}catch(b){S("handleOTP",b)}},x=async()=>{await supertokensSession.signOut(),d.state("logoutCompleted")};globalThis.stAuth={sendOTP:k,verifyOTP:g,logout:x,isLoggedIn:r,userEmail:n,userID:o},qr(globalThis.authHooks)&&globalThis.authHooks.forEach(([w,b])=>{let A=d[w];d[w]=(V,N)=>{A(V,N),b(V,N)}}),r()?d.state("loggedIn",n()):d.state("loggedOut"),tt({targets:"#"+a,opacity:"100%",duration:1e3,easing:"easeInOutQuad",complete:()=>tt.remove("#"+a)})};})();


The raw file follows...


(()=>{function O(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _(e){return function t(r){return arguments.length===0||O(r)?t:e.apply(this,arguments)}}function y(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return O(r)?t:_(function(o){return e(r,o)});default:return O(r)&&O(n)?t:O(r)?_(function(o){return e(o,n)}):O(n)?_(function(o){return e(r,o)}):e(r,n)}}}function at(e,t){e=e||[],t=t||[];var r,n=e.length,o=t.length,a=[];for(r=0;r<n;)a[a.length]=e[r],r+=1;for(r=0;r<o;)a[a.length]=t[r],r+=1;return a}function z(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(r){return t.apply(this,arguments)};case 2:return function(r,n){return t.apply(this,arguments)};case 3:return function(r,n,o){return t.apply(this,arguments)};case 4:return function(r,n,o,a){return t.apply(this,arguments)};case 5:return function(r,n,o,a,u){return t.apply(this,arguments)};case 6:return function(r,n,o,a,u,s){return t.apply(this,arguments)};case 7:return function(r,n,o,a,u,s,i){return t.apply(this,arguments)};case 8:return function(r,n,o,a,u,s,i,l){return t.apply(this,arguments)};case 9:return function(r,n,o,a,u,s,i,l,f){return t.apply(this,arguments)};case 10:return function(r,n,o,a,u,s,i,l,f,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _t(e,t,r){return function(){for(var n=[],o=0,a=e,u=0,s=!1;u<t.length||o<arguments.length;){var i;u<t.length&&(!O(t[u])||o>=arguments.length)?i=t[u]:(i=arguments[o],o+=1),n[u]=i,O(i)?s=!0:a-=1,u+=1}return!s&&a<=0?r.apply(this,n):z(Math.max(0,a),_t(e,n,r))}}var Vr=y(function(t,r){return t===1?_(r):z(t,_t(t,[],r))}),H=Vr;function Bt(e){return function t(r,n,o){switch(arguments.length){case 0:return t;case 1:return O(r)?t:y(function(a,u){return e(r,a,u)});case 2:return O(r)&&O(n)?t:O(r)?y(function(a,u){return e(a,n,u)}):O(n)?y(function(a,u){return e(r,a,u)}):_(function(a){return e(r,n,a)});default:return O(r)&&O(n)&&O(o)?t:O(r)&&O(n)?y(function(a,u){return e(a,u,o)}):O(r)&&O(o)?y(function(a,u){return e(a,n,u)}):O(n)&&O(o)?y(function(a,u){return e(r,a,u)}):O(r)?_(function(a){return e(a,n,o)}):O(n)?_(function(a){return e(r,a,o)}):O(o)?_(function(a){return e(r,n,a)}):e(r,n,o)}}}var G=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Dt(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function Q(e,t,r){return function(){if(arguments.length===0)return r();var n=arguments[arguments.length-1];if(!G(n)){for(var o=0;o<e.length;){if(typeof n[e[o]]=="function")return n[e[o]].apply(n,Array.prototype.slice.call(arguments,0,-1));o+=1}if(Dt(n)){var a=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(n)}}return r.apply(this,arguments)}}var W={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function wt(e){for(var t=[],r;!(r=e.next()).done;)t.push(r.value);return t}function bt(e,t,r){for(var n=0,o=r.length;n<o;){if(e(t,r[n]))return!0;n+=1}return!1}function Lt(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function M(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function zr(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:zr;var Pe=Object.prototype.toString,Hr=function(){return Pe.call(arguments)==="[object Arguments]"?function(t){return Pe.call(t)==="[object Arguments]"}:function(t){return M("callee",t)}}(),It=Hr;var Qr=!{toString:null}.propertyIsEnumerable("toString"),ke=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Te=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),Zr=function(t,r){for(var n=0;n<t.length;){if(t[n]===r)return!0;n+=1}return!1},Kr=typeof Object.keys=="function"&&!Te?_(function(t){return Object(t)!==t?[]:Object.keys(t)}):_(function(t){if(Object(t)!==t)return[];var r,n,o=[],a=Te&&It(t);for(r in t)M(r,t)&&(!a||r!=="length")&&(o[o.length]=r);if(Qr)for(n=ke.length-1;n>=0;)r=ke[n],M(r,t)&&!Zr(o,r)&&(o[o.length]=r),n-=1;return o}),E=Kr;var Jr=_(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),qt=Jr;function Ee(e,t,r,n){var o=wt(e),a=wt(t);function u(s,i){return it(s,i,r.slice(),n.slice())}return!bt(function(s,i){return!bt(u,i,s)},a,o)}function it(e,t,r,n){if(Ot(e,t))return!0;var o=qt(e);if(o!==qt(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&Lt(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&Ot(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Ot(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=r.length-1;a>=0;){if(r[a]===e)return n[a]===t;a-=1}switch(o){case"Map":return e.size!==t.size?!1:Ee(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size!==t.size?!1:Ee(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=E(e);if(u.length!==E(t).length)return!1;var s=r.concat([e]),i=n.concat([t]);for(a=u.length-1;a>=0;){var l=u[a];if(!(M(l,t)&&it(t[l],e[l],s,i)))return!1;a-=1}return!0}var Yr=y(function(t,r){return it(t,r,[],[])}),F=Yr;function Ut(e,t,r){var n,o;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(n=1/t;r<e.length;){if(o=e[r],o===0&&1/o===n)return r;r+=1}return-1}else if(t!==t){for(;r<e.length;){if(o=e[r],typeof o=="number"&&o!==o)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(t===null)return e.indexOf(t,r)}for(;r<e.length;){if(F(e[r],t))return r;r+=1}return-1}function Wt(e,t){return Ut(t,e,0)>=0}function Z(e,t){for(var r=0,n=t.length,o=Array(n);r<n;)o[r]=e(t[r]),r+=1;return o}function ut(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var st=function(t){return(t<10?"0":"")+t},Gr=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+st(t.getUTCMonth()+1)+"-"+st(t.getUTCDate())+"T"+st(t.getUTCHours())+":"+st(t.getUTCMinutes())+":"+st(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"},Ce=Gr;function $t(e){return function(){return!e.apply(this,arguments)}}function C(e,t,r){for(var n=0,o=r.length;n<o;)t=e(t,r[n]),n+=1;return t}function Ft(e,t){for(var r=0,n=t.length,o=[];r<n;)e(t[r])&&(o[o.length]=t[r]),r+=1;return o}function ft(e){return Object.prototype.toString.call(e)==="[object Object]"}var Xr=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=W.init,e.prototype["@@transducer/result"]=W.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.xf["@@transducer/step"](t,r):t},e}();function Vt(e){return function(t){return new Xr(e,t)}}var tn=y(Q(["fantasy-land/filter","filter"],Vt,function(e,t){return ft(t)?C(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{},E(t)):Ft(e,t)})),Re=tn;var en=y(function(t,r){return Re($t(t),r)}),Ne=en;function St(e,t){var r=function(u){var s=t.concat([e]);return Wt(u,s)?"<Circular>":St(u,s)},n=function(a,u){return Z(function(s){return ut(s)+": "+r(a[s])},u.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Z(r,e).join(", ")+"))";case"[object Array]":return"["+Z(r,e).concat(n(e,Ne(function(a){return/^\d+$/.test(a)},E(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):ut(Ce(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+r(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return typeof e=="object"?"new String("+r(e.valueOf())+")":ut(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var o=e.toString();if(o!=="[object Object]")return o}return"{"+n(e,E(e)).join(", ")+"}"}}var rn=_(function(t){return St(t,[])}),zt=rn;var nn=y(function(t,r){if(t===r)return r;function n(i,l){if(i>l!=l>i)return l>i?l:i}var o=n(t,r);if(o!==void 0)return o;var a=n(typeof t,typeof r);if(a!==void 0)return a===typeof t?t:r;var u=zt(t),s=n(u,zt(r));return s!==void 0&&s===u?t:r}),Me=nn;var on=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=W.init,e.prototype["@@transducer/result"]=W.result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,this.f(r))},e}(),an=function(t){return function(r){return new on(t,r)}},Be=an;var un=y(Q(["fantasy-land/map","map"],Be,function(t,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return H(r.length,function(){return t.call(this,r.apply(this,arguments))});case"[object Object]":return C(function(n,o){return n[o]=t(r[o]),n},{},E(r));default:return Z(t,r)}})),B=un;var De=Number.isInteger||function(t){return t<<0===t};function K(e){return Object.prototype.toString.call(e)==="[object String]"}var sn=y(function(t,r){var n=t<0?r.length+t:t;return K(r)?r.charAt(n):r[n]}),Le=sn;var fn=y(function(t,r){if(r!=null)return De(t)?Le(t,r):r[t]}),qe=fn;var ln=y(function(t,r){return B(qe(t),r)}),Ue=ln;var cn=_(function(t){return G(t)?!0:!t||typeof t!="object"||K(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1}),We=cn;var $e=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function lt(e,t,r){return function(o,a,u){if(We(u))return e(o,a,u);if(u==null)return a;if(typeof u["fantasy-land/reduce"]=="function")return t(o,a,u,"fantasy-land/reduce");if(u[$e]!=null)return r(o,a,u[$e]());if(typeof u.next=="function")return r(o,a,u);if(typeof u.reduce=="function")return t(o,a,u,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Ht(e,t,r){for(var n=0,o=r.length;n<o;){if(t=e["@@transducer/step"](t,r[n]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var pn=y(function(t,r){return z(t.length,function(){return t.apply(r,arguments)})}),Fe=pn;function dn(e,t,r){for(var n=r.next();!n.done;){if(t=e["@@transducer/step"](t,n.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function mn(e,t,r,n){return e["@@transducer/result"](r[n](Fe(e["@@transducer/step"],e),t))}var hn=lt(Ht,mn,dn),Ve=hn;var gn=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,r){return this.f(t,r)},e}();function Qt(e){return new gn(e)}var yn=Bt(function(e,t,r){return Ve(typeof e=="function"?Qt(e):e,t,r)}),ze=yn;var vn=_(function(t){return H(ze(Me,0,Ue("length",t)),function(){for(var r=0,n=t.length;r<n;){if(!t[r].apply(this,arguments))return!1;r+=1}return!0})}),Zt=vn;function xn(e,t,r){for(var n=r.next();!n.done;)t=e(t,n.value),n=r.next();return t}function _n(e,t,r,n){return r[n](e,t)}var wn=lt(C,_n,xn),He=wn;var bn=y(function(t,r){return typeof r["fantasy-land/ap"]=="function"?r["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(r):typeof t=="function"?function(n){return t(n)(r(n))}:He(function(n,o){return at(n,B(o,r))},[],t)}),Qe=bn;var On=y(function(t,r){return at(r,[t])}),Kt=On;var In=_(function(t){return t==null}),Ze=In;var Sn=y(function(t,r){var n=H(t,r);return H(t,function(){return C(Qe,B(n,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Ke=Sn;var An=_(function(t){return Ke(t.length,t)}),Je=An;var jn=_(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),Jt=jn;var Pn=_(function(t){return!t}),Ye=Pn;var kn=Je(Ye),Yt=kn;function Gt(e){return e}var Tn=_(Gt),X=Tn;function Xt(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var En=_(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():G(t)?[]:K(t)?"":ft(t)?{}:It(t)?function(){return arguments}():Xt(t)?t.constructor.from(""):void 0}),Ge=En;function Cn(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;r<n;){var o=arguments[r];if(o!=null)for(var a in o)M(a,o)&&(t[a]=o[a]);r+=1}return t}var At=typeof Object.assign=="function"?Object.assign:Cn;var Rn=y(function(t,r){return r instanceof t||r!=null&&(r.constructor===t||t.name==="Object"&&typeof r=="object")}),te=Rn;var Nn=_(function(t){return t!=null&&F(t,Ge(t))}),ee=Nn;var Mn=_(function(t){return!Ze(t)}),re=Mn;var Bn=y(function(t,r){return C(function(n,o){return n[o]=t(r[o],o,r),n},{},E(r))}),ne=Bn;var Dn=y(function(t,r){return At({},r,t)}),jt=Dn;var Ln=y(function(t,r){return At({},t,r)}),ct=Ln;var qn=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=W.init,e.prototype["@@transducer/result"]=W.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r),this.xf["@@transducer/step"](t,r)},e}();function oe(e){return function(t){return new qn(e,t)}}var Un=y(Q([],oe,function(t,r){return t(r),r})),pt=Un;var or={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},se={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},$n=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Pt={CSS:{},springs:{}};function D(e,t,r){return Math.min(Math.max(e,t),r)}function dt(e,t){return e.indexOf(t)>-1}function ae(e,t){return e.apply(null,t)}var p={arr:function(e){return Array.isArray(e)},obj:function(e){return dt(Object.prototype.toString.call(e),"Object")},pth:function(e){return p.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||p.svg(e)},str:function(e){return typeof e=="string"},fnc:function(e){return typeof e=="function"},und:function(e){return typeof e>"u"},nil:function(e){return p.und(e)||e===null},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return p.hex(e)||p.rgb(e)||p.hsl(e)},key:function(e){return!or.hasOwnProperty(e)&&!se.hasOwnProperty(e)&&e!=="targets"&&e!=="keyframes"}};function ar(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(r){return parseFloat(r)}):[]}function ir(e,t){var r=ar(e),n=D(p.und(r[0])?1:r[0],.1,100),o=D(p.und(r[1])?100:r[1],.1,100),a=D(p.und(r[2])?10:r[2],.1,100),u=D(p.und(r[3])?0:r[3],.1,100),s=Math.sqrt(o/n),i=a/(2*Math.sqrt(o*n)),l=i<1?s*Math.sqrt(1-i*i):0,f=1,c=i<1?(i*s+-u)/l:-u+s;function m(v){var h=t?t*v/1e3:v;return i<1?h=Math.exp(-h*i*s)*(f*Math.cos(l*h)+c*Math.sin(l*h)):h=(f+c*h)*Math.exp(-h*s),v===0||v===1?v:1-h}function I(){var v=Pt.springs[e];if(v)return v;for(var h=1/6,d=0,S=0;;)if(d+=h,m(d)===1){if(S++,S>=16)break}else S=0;var k=d*h*1e3;return Pt.springs[e]=k,k}return t?m:I}function Fn(e){return e===void 0&&(e=10),function(t){return Math.ceil(D(t,1e-6,1)*e)*(1/e)}}var Vn=function(){var e=11,t=1/(e-1);function r(f,c){return 1-3*c+3*f}function n(f,c){return 3*c-6*f}function o(f){return 3*f}function a(f,c,m){return((r(c,m)*f+n(c,m))*f+o(c))*f}function u(f,c,m){return 3*r(c,m)*f*f+2*n(c,m)*f+o(c)}function s(f,c,m,I,v){var h,d,S=0;do d=c+(m-c)/2,h=a(d,I,v)-f,h>0?m=d:c=d;while(Math.abs(h)>1e-7&&++S<10);return d}function i(f,c,m,I){for(var v=0;v<4;++v){var h=u(c,m,I);if(h===0)return c;var d=a(c,m,I)-f;c-=d/h}return c}function l(f,c,m,I){if(!(0<=f&&f<=1&&0<=m&&m<=1))return;var v=new Float32Array(e);if(f!==c||m!==I)for(var h=0;h<e;++h)v[h]=a(h*t,f,m);function d(S){for(var k=0,g=1,x=e-1;g!==x&&v[g]<=S;++g)k+=t;--g;var w=(S-v[g])/(v[g+1]-v[g]),b=k+w*t,A=u(b,f,m);return A>=.001?i(S,b,f,m):A===0?b:s(S,k,k+t,f,m)}return function(S){return f===c&&m===I||S===0||S===1?S:a(d(S),c,I)}}return l}(),ur=function(){var e={linear:function(){return function(n){return n}}},t={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var o,a=4;n<((o=Math.pow(2,--a))-1)/11;);return 1/Math.pow(4,3-a)-7.5625*Math.pow((o*3-2)/22-n,2)}},Elastic:function(n,o){n===void 0&&(n=1),o===void 0&&(o=.5);var a=D(n,1,10),u=D(o,.1,2);return function(s){return s===0||s===1?s:-a*Math.pow(2,10*(s-1))*Math.sin((s-1-u/(Math.PI*2)*Math.asin(1/a))*(Math.PI*2)/u)}}},r=["Quad","Cubic","Quart","Quint","Expo"];return r.forEach(function(n,o){t[n]=function(){return function(a){return Math.pow(a,o+2)}}}),Object.keys(t).forEach(function(n){var o=t[n];e["easeIn"+n]=o,e["easeOut"+n]=function(a,u){return function(s){return 1-o(a,u)(1-s)}},e["easeInOut"+n]=function(a,u){return function(s){return s<.5?o(a,u)(s*2)/2:1-o(a,u)(s*-2+2)/2}},e["easeOutIn"+n]=function(a,u){return function(s){return s<.5?(1-o(a,u)(1-s*2))/2:(o(a,u)(s*2-1)+1)/2}}}),e}();function fe(e,t){if(p.fnc(e))return e;var r=e.split("(")[0],n=ur[r],o=ar(e);switch(r){case"spring":return ir(e,t);case"cubicBezier":return ae(Vn,o);case"steps":return ae(Fn,o);default:return ae(n,o)}}function sr(e){try{var t=document.querySelectorAll(e);return t}catch{return}}function kt(e,t){for(var r=e.length,n=arguments.length>=2?arguments[1]:void 0,o=[],a=0;a<r;a++)if(a in e){var u=e[a];t.call(n,u,a,e)&&o.push(u)}return o}function Tt(e){return e.reduce(function(t,r){return t.concat(p.arr(r)?Tt(r):r)},[])}function Xe(e){return p.arr(e)?e:(p.str(e)&&(e=sr(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function le(e,t){return e.some(function(r){return r===t})}function ce(e){var t={};for(var r in e)t[r]=e[r];return t}function ie(e,t){var r=ce(e);for(var n in e)r[n]=t.hasOwnProperty(n)?t[n]:e[n];return r}function Et(e,t){var r=ce(e);for(var n in t)r[n]=p.und(e[n])?t[n]:e[n];return r}function zn(e){var t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?"rgba("+t[1]+",1)":e}function Hn(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=e.replace(t,function(s,i,l,f){return i+i+l+l+f+f}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r),o=parseInt(n[1],16),a=parseInt(n[2],16),u=parseInt(n[3],16);return"rgba("+o+","+a+","+u+",1)"}function Qn(e){var t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),r=parseInt(t[1],10)/360,n=parseInt(t[2],10)/100,o=parseInt(t[3],10)/100,a=t[4]||1;function u(m,I,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?m+(I-m)*6*v:v<1/2?I:v<2/3?m+(I-m)*(2/3-v)*6:m}var s,i,l;if(n==0)s=i=l=o;else{var f=o<.5?o*(1+n):o+n-o*n,c=2*o-f;s=u(c,f,r+1/3),i=u(c,f,r),l=u(c,f,r-1/3)}return"rgba("+s*255+","+i*255+","+l*255+","+a+")"}function Zn(e){if(p.rgb(e))return zn(e);if(p.hex(e))return Hn(e);if(p.hsl(e))return Qn(e)}function $(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function Kn(e){if(dt(e,"translate")||e==="perspective")return"px";if(dt(e,"rotate")||dt(e,"skew"))return"deg"}function ue(e,t){return p.fnc(e)?e(t.target,t.id,t.total):e}function L(e,t){return e.getAttribute(t)}function pe(e,t,r){var n=$(t);if(le([r,"deg","rad","turn"],n))return t;var o=Pt.CSS[t+r];if(!p.und(o))return o;var a=100,u=document.createElement(e.tagName),s=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;s.appendChild(u),u.style.position="absolute",u.style.width=a+r;var i=a/u.offsetWidth;s.removeChild(u);var l=i*parseFloat(t);return Pt.CSS[t+r]=l,l}function fr(e,t,r){if(t in e.style){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=e.style[t]||getComputedStyle(e).getPropertyValue(n)||"0";return r?pe(e,o,r):o}}function de(e,t){if(p.dom(e)&&!p.inp(e)&&(!p.nil(L(e,t))||p.svg(e)&&e[t]))return"attribute";if(p.dom(e)&&le($n,t))return"transform";if(p.dom(e)&&t!=="transform"&&fr(e,t))return"css";if(e[t]!=null)return"object"}function lr(e){if(p.dom(e)){for(var t=e.style.transform||"",r=/(\w+)\(([^)]*)\)/g,n=new Map,o;o=r.exec(t);)n.set(o[1],o[2]);return n}}function Jn(e,t,r,n){var o=dt(t,"scale")?1:0+Kn(t),a=lr(e).get(t)||o;return r&&(r.transforms.list.set(t,a),r.transforms.last=t),n?pe(e,a,n):a}function me(e,t,r,n){switch(de(e,t)){case"transform":return Jn(e,t,n,r);case"css":return fr(e,t,r);case"attribute":return L(e,t);default:return e[t]||0}}function he(e,t){var r=/^(\*=|\+=|-=)/.exec(e);if(!r)return e;var n=$(e)||0,o=parseFloat(t),a=parseFloat(e.replace(r[0],""));switch(r[0][0]){case"+":return o+a+n;case"-":return o-a+n;case"*":return o*a+n}}function cr(e,t){if(p.col(e))return Zn(e);if(/\s/g.test(e))return e;var r=$(e),n=r?e.substr(0,e.length-r.length):e;return t?n+t:n}function ge(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Yn(e){return Math.PI*2*L(e,"r")}function Gn(e){return L(e,"width")*2+L(e,"height")*2}function Xn(e){return ge({x:L(e,"x1"),y:L(e,"y1")},{x:L(e,"x2"),y:L(e,"y2")})}function pr(e){for(var t=e.points,r=0,n,o=0;o<t.numberOfItems;o++){var a=t.getItem(o);o>0&&(r+=ge(n,a)),n=a}return r}function to(e){var t=e.points;return pr(e)+ge(t.getItem(t.numberOfItems-1),t.getItem(0))}function dr(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return Yn(e);case"rect":return Gn(e);case"line":return Xn(e);case"polyline":return pr(e);case"polygon":return to(e)}}function eo(e){var t=dr(e);return e.setAttribute("stroke-dasharray",t),t}function ro(e){for(var t=e.parentNode;p.svg(t)&&p.svg(t.parentNode);)t=t.parentNode;return t}function mr(e,t){var r=t||{},n=r.el||ro(e),o=n.getBoundingClientRect(),a=L(n,"viewBox"),u=o.width,s=o.height,i=r.viewBox||(a?a.split(" "):[0,0,u,s]);return{el:n,viewBox:i,x:i[0]/1,y:i[1]/1,w:u,h:s,vW:i[2],vH:i[3]}}function no(e,t){var r=p.str(e)?sr(e)[0]:e,n=t||100;return function(o){return{property:o,el:r,svg:mr(r),totalLength:dr(r)*(n/100)}}}function oo(e,t,r){function n(f){f===void 0&&(f=0);var c=t+f>=1?t+f:0;return e.el.getPointAtLength(c)}var o=mr(e.el,e.svg),a=n(),u=n(-1),s=n(1),i=r?1:o.w/o.vW,l=r?1:o.h/o.vH;switch(e.property){case"x":return(a.x-o.x)*i;case"y":return(a.y-o.y)*l;case"angle":return Math.atan2(s.y-u.y,s.x-u.x)*180/Math.PI}}function tr(e,t){var r=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=cr(p.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(r)?n.match(r).map(Number):[0],strings:p.str(e)||t?n.split(r):[]}}function ye(e){var t=e?Tt(p.arr(e)?e.map(Xe):Xe(e)):[];return kt(t,function(r,n,o){return o.indexOf(r)===n})}function hr(e){var t=ye(e);return t.map(function(r,n){return{target:r,id:n,total:t.length,transforms:{list:lr(r)}}})}function ao(e,t){var r=ce(t);if(/^spring/.test(r.easing)&&(r.duration=ir(r.easing)),p.arr(e)){var n=e.length,o=n===2&&!p.obj(e[0]);o?e={value:e}:p.fnc(t.duration)||(r.duration=t.duration/n)}var a=p.arr(e)?e:[e];return a.map(function(u,s){var i=p.obj(u)&&!p.pth(u)?u:{value:u};return p.und(i.delay)&&(i.delay=s?0:t.delay),p.und(i.endDelay)&&(i.endDelay=s===a.length-1?t.endDelay:0),i}).map(function(u){return Et(u,r)})}function io(e){for(var t=kt(Tt(e.map(function(a){return Object.keys(a)})),function(a){return p.key(a)}).reduce(function(a,u){return a.indexOf(u)<0&&a.push(u),a},[]),r={},n=function(a){var u=t[a];r[u]=e.map(function(s){var i={};for(var l in s)p.key(l)?l==u&&(i.value=s[l]):i[l]=s[l];return i})},o=0;o<t.length;o++)n(o);return r}function uo(e,t){var r=[],n=t.keyframes;n&&(t=Et(io(n),t));for(var o in t)p.key(o)&&r.push({name:o,tweens:ao(t[o],e)});return r}function so(e,t){var r={};for(var n in e){var o=ue(e[n],t);p.arr(o)&&(o=o.map(function(a){return ue(a,t)}),o.length===1&&(o=o[0])),r[n]=o}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}function fo(e,t){var r;return e.tweens.map(function(n){var o=so(n,t),a=o.value,u=p.arr(a)?a[1]:a,s=$(u),i=me(t.target,e.name,s,t),l=r?r.to.original:i,f=p.arr(a)?a[0]:l,c=$(f)||$(i),m=s||c;return p.und(u)&&(u=l),o.from=tr(f,m),o.to=tr(he(u,f),m),o.start=r?r.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=fe(o.easing,o.duration),o.isPath=p.pth(a),o.isPathTargetInsideSVG=o.isPath&&p.svg(t.target),o.isColor=p.col(o.from.original),o.isColor&&(o.round=1),r=o,o})}var gr={css:function(e,t,r){return e.style[t]=r},attribute:function(e,t,r){return e.setAttribute(t,r)},object:function(e,t,r){return e[t]=r},transform:function(e,t,r,n,o){if(n.list.set(t,r),t===n.last||o){var a="";n.list.forEach(function(u,s){a+=s+"("+u+") "}),e.style.transform=a}}};function yr(e,t){var r=hr(e);r.forEach(function(n){for(var o in t){var a=ue(t[o],n),u=n.target,s=$(a),i=me(u,o,s,n),l=s||$(i),f=he(cr(a,l),i),c=de(u,o);gr[c](u,o,f,n.transforms,!0)}})}function lo(e,t){var r=de(e.target,t.name);if(r){var n=fo(t,e),o=n[n.length-1];return{type:r,property:t.name,animatable:e,tweens:n,duration:o.end,delay:n[0].delay,endDelay:o.endDelay}}}function co(e,t){return kt(Tt(e.map(function(r){return t.map(function(n){return lo(r,n)})})),function(r){return!p.und(r)})}function vr(e,t){var r=e.length,n=function(a){return a.timelineOffset?a.timelineOffset:0},o={};return o.duration=r?Math.max.apply(Math,e.map(function(a){return n(a)+a.duration})):t.duration,o.delay=r?Math.min.apply(Math,e.map(function(a){return n(a)+a.delay})):t.delay,o.endDelay=r?o.duration-Math.max.apply(Math,e.map(function(a){return n(a)+a.duration-a.endDelay})):t.endDelay,o}var er=0;function po(e){var t=ie(or,e),r=ie(se,e),n=uo(r,e),o=hr(e.targets),a=co(o,n),u=vr(a,r),s=er;return er++,Et(t,{id:s,children:[],animatables:o,animations:a,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}var R=[],xr=function(){var e;function t(){!e&&(!rr()||!j.suspendWhenDocumentHidden)&&R.length>0&&(e=requestAnimationFrame(r))}function r(o){for(var a=R.length,u=0;u<a;){var s=R[u];s.paused?(R.splice(u,1),a--):(s.tick(o),u++)}e=u>0?requestAnimationFrame(r):void 0}function n(){j.suspendWhenDocumentHidden&&(rr()?e=cancelAnimationFrame(e):(R.forEach(function(o){return o._onDocumentVisibility()}),xr()))}return typeof document<"u"&&document.addEventListener("visibilitychange",n),t}();function rr(){return!!document&&document.hidden}function j(e){e===void 0&&(e={});var t=0,r=0,n=0,o,a=0,u=null;function s(g){var x=window.Promise&&new Promise(function(w){return u=w});return g.finished=x,x}var i=po(e),l=s(i);function f(){var g=i.direction;g!=="alternate"&&(i.direction=g!=="normal"?"normal":"reverse"),i.reversed=!i.reversed,o.forEach(function(x){return x.reversed=i.reversed})}function c(g){return i.reversed?i.duration-g:g}function m(){t=0,r=c(i.currentTime)*(1/j.speed)}function I(g,x){x&&x.seek(g-x.timelineOffset)}function v(g){if(i.reversePlayback)for(var w=a;w--;)I(g,o[w]);else for(var x=0;x<a;x++)I(g,o[x])}function h(g){for(var x=0,w=i.animations,b=w.length;x<b;){var A=w[x],V=A.animatable,N=A.tweens,J=N.length-1,P=N[J];J&&(P=kt(N,function(Fr){return g<Fr.end})[0]||P);for(var vt=D(g-P.start-P.delay,0,P.duration)/P.duration,U=isNaN(vt)?1:P.easing(vt),xt=P.to.strings,Rt=P.round,Nt=[],$r=P.to.numbers.length,Y=void 0,rt=0;rt<$r;rt++){var nt=void 0,Ie=P.to.numbers[rt],Se=P.from.numbers[rt]||0;P.isPath?nt=oo(P.value,U*Ie,P.isPathTargetInsideSVG):nt=Se+U*(Ie-Se),Rt&&(P.isColor&&rt>2||(nt=Math.round(nt*Rt)/Rt)),Nt.push(nt)}var Ae=xt.length;if(!Ae)Y=Nt[0];else{Y=xt[0];for(var ot=0;ot<Ae;ot++){var jo=xt[ot],je=xt[ot+1],Mt=Nt[ot];isNaN(Mt)||(je?Y+=Mt+je:Y+=Mt+" ")}}gr[A.type](V.target,A.property,Y,V.transforms),A.currentValue=Y,x++}}function d(g){i[g]&&!i.passThrough&&i[g](i)}function S(){i.remaining&&i.remaining!==!0&&i.remaining--}function k(g){var x=i.duration,w=i.delay,b=x-i.endDelay,A=c(g);i.progress=D(A/x*100,0,100),i.reversePlayback=A<i.currentTime,o&&v(A),!i.began&&i.currentTime>0&&(i.began=!0,d("begin")),!i.loopBegan&&i.currentTime>0&&(i.loopBegan=!0,d("loopBegin")),A<=w&&i.currentTime!==0&&h(0),(A>=b&&i.currentTime!==x||!x)&&h(x),A>w&&A<b?(i.changeBegan||(i.changeBegan=!0,i.changeCompleted=!1,d("changeBegin")),d("change"),h(A)):i.changeBegan&&(i.changeCompleted=!0,i.changeBegan=!1,d("changeComplete")),i.currentTime=D(A,0,x),i.began&&d("update"),g>=x&&(r=0,S(),i.remaining?(t=n,d("loopComplete"),i.loopBegan=!1,i.direction==="alternate"&&f()):(i.paused=!0,i.completed||(i.completed=!0,d("loopComplete"),d("complete"),!i.passThrough&&"Promise"in window&&(u(),l=s(i)))))}return i.reset=function(){var g=i.direction;i.passThrough=!1,i.currentTime=0,i.progress=0,i.paused=!0,i.began=!1,i.loopBegan=!1,i.changeBegan=!1,i.completed=!1,i.changeCompleted=!1,i.reversePlayback=!1,i.reversed=g==="reverse",i.remaining=i.loop,o=i.children,a=o.length;for(var x=a;x--;)i.children[x].reset();(i.reversed&&i.loop!==!0||g==="alternate"&&i.loop===1)&&i.remaining++,h(i.reversed?i.duration:0)},i._onDocumentVisibility=m,i.set=function(g,x){return yr(g,x),i},i.tick=function(g){n=g,t||(t=n),k((n+(r-t))*j.speed)},i.seek=function(g){k(c(g))},i.pause=function(){i.paused=!0,m()},i.play=function(){i.paused&&(i.completed&&i.reset(),i.paused=!1,R.push(i),m(),xr())},i.reverse=function(){f(),i.completed=!i.reversed,m()},i.restart=function(){i.reset(),i.play()},i.remove=function(g){var x=ye(g);_r(x,i)},i.reset(),i.autoplay&&i.play(),i}function nr(e,t){for(var r=t.length;r--;)le(e,t[r].animatable.target)&&t.splice(r,1)}function _r(e,t){var r=t.animations,n=t.children;nr(e,r);for(var o=n.length;o--;){var a=n[o],u=a.animations;nr(e,u),!u.length&&!a.children.length&&n.splice(o,1)}!r.length&&!n.length&&t.pause()}function mo(e){for(var t=ye(e),r=R.length;r--;){var n=R[r];_r(t,n)}}function ho(e,t){t===void 0&&(t={});var r=t.direction||"normal",n=t.easing?fe(t.easing):null,o=t.grid,a=t.axis,u=t.from||0,s=u==="first",i=u==="center",l=u==="last",f=p.arr(e),c=parseFloat(f?e[0]:e),m=f?parseFloat(e[1]):0,I=$(f?e[1]:e)||0,v=t.start||0+(f?c:0),h=[],d=0;return function(S,k,g){if(s&&(u=0),i&&(u=(g-1)/2),l&&(u=g-1),!h.length){for(var x=0;x<g;x++){if(!o)h.push(Math.abs(u-x));else{var w=i?(o[0]-1)/2:u%o[0],b=i?(o[1]-1)/2:Math.floor(u/o[0]),A=x%o[0],V=Math.floor(x/o[0]),N=w-A,J=b-V,P=Math.sqrt(N*N+J*J);a==="x"&&(P=-N),a==="y"&&(P=-J),h.push(P)}d=Math.max.apply(Math,h)}n&&(h=h.map(function(U){return n(U/d)*d})),r==="reverse"&&(h=h.map(function(U){return a?U<0?U*-1:-U:Math.abs(d-U)}))}var vt=f?(m-c)/d:c;return v+vt*(Math.round(h[k]*100)/100)+I}}function go(e){e===void 0&&(e={});var t=j(e);return t.duration=0,t.add=function(r,n){var o=R.indexOf(t),a=t.children;o>-1&&R.splice(o,1);function u(m){m.passThrough=!0}for(var s=0;s<a.length;s++)u(a[s]);var i=Et(r,ie(se,e));i.targets=i.targets||e.targets;var l=t.duration;i.autoplay=!1,i.direction=t.direction,i.timelineOffset=p.und(n)?l:he(n,l),u(t),t.seek(i.timelineOffset);var f=j(i);u(f),a.push(f);var c=vr(a,e);return t.delay=c.delay,t.endDelay=c.endDelay,t.duration=c.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t}j.version="3.2.1";j.speed=1;j.suspendWhenDocumentHidden=!0;j.running=R;j.remove=mo;j.get=me;j.set=yr;j.convertPx=pe;j.path=no;j.setDashoffset=eo;j.stagger=ho;j.timeline=go;j.easing=fe;j.penner=ur;j.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};var tt=j;var Or=0,Ir=Object.create(null),yo=["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","columns","counter-increment","counter-reset","flex","flex-grow","flex-positive","flex-shrink","flex-negative","flex-order","font-weight","grid-area","grid-column","grid-column-end","grid-column-span","grid-column-start","grid-row","grid-row-end","grid-row-span","grid-row-start","line-clamp","line-height","opacity","order","orphans","tab-size","widows","z-index","zoom","fill-opacity","flood-opacity","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width"];for(let e of yo)for(let t of["-webkit-","-ms-","-moz-","-o-",""])Ir[t+e]=!0;function ve(e,t){return e.replace(/&/g,t)}function wr(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^ms-/,"-ms-")}function vo(e){let t=5381,r=e.length;for(;r--;)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function xo(e,t){return e.indexOf("&")===-1?`${t} ${e}`:ve(e,t)}function br(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:e[2]-t[2]}function _o([e,t]){return typeof t=="number"&&t&&!Ir[e]?`${e}:${t}px`:`${e}:${String(t)}`}function Sr(e,t,r,n,o){let a=[],u=[];for(let h of Object.keys(n)){let d=n[h];if(h.charCodeAt(0)!==36&&d!=null)if(Array.isArray(d)){let S=wr(h);for(let k=0;k<d.length;k++){let g=d[k];g!=null&&a.push([S,g,k])}}else typeof d=="object"?u.push([h,d,0]):a.push([wr(h),d,0])}let s=!!n.$unique,i=n.$global?"":o,l=i?u:u.sort(br),f=a.sort(br).map(_o).join(";"),c=f,m=i,I=e,v=t;r.charCodeAt(0)===64?(I=[],v=[],i&&f&&v.push({selector:m,style:f,isUnique:s}),e.push({selector:r,rules:I,styles:v,style:i?"":f})):(m=i?r?xo(r,i):i:r,f&&t.push({selector:m,style:f,isUnique:s}));for(let[h,d]of l)c+=`|${h}#${Sr(I,v,h,d,m)}`;return c}function Ar(e,t,r,n,o){for(let{selector:a,style:u,isUnique:s}of r){let i=ve(a,o),l=new _e(u,s?(++Or).toString(36):n);l.add(new xe(i)),e.add(l)}for(let{selector:a,style:u,rules:s,styles:i}of t){let l=ve(a,o),f=new we(l,u,n);Ar(f,s,i,n,o),e.add(f)}}function jr(e){let t="";for(let r=0;r<e.length;r++)t+=e[r];return t}var mt=class e{constructor(t){this.changes=t,this.sheet=[],this.changeId=0,this._keys=[],this._children=Object.create(null),this._counters=Object.create(null)}add(t){let r=t.id,n=this._counters[r]||0,o=this._children[r]||t.clone();if(this._counters[r]=n+1,n===0)this._children[r]=o,this._keys.push(r),this.sheet.push(o.getStyles()),this.changeId++,this.changes&&this.changes.add(o,this._keys.length-1);else if(o instanceof e&&t instanceof e){let a=o.changeId;if(o.merge(t),o.changeId!==a){let u=this._keys.indexOf(r);this.sheet.splice(u,1,o.getStyles()),this.changeId++,this.changes&&this.changes.change(o,u,u)}}}remove(t){let r=t.id,n=this._counters[r];if(n){this._counters[r]=n-1;let o=this._children[r],a=this._keys.indexOf(r);if(n===1)delete this._counters[r],delete this._children[r],this._keys.splice(a,1),this.sheet.splice(a,1),this.changeId++,this.changes&&this.changes.remove(o,a);else if(o instanceof e&&t instanceof e){let u=o.changeId;o.unmerge(t),o.changeId!==u&&(this.sheet.splice(a,1,o.getStyles()),this.changeId++,this.changes&&this.changes.change(o,a,a))}}}values(){return this._keys.map(t=>this._children[t])}merge(t){for(let r of t.values())this.add(r);return this}unmerge(t){for(let r of t.values())this.remove(r);return this}clone(){return new e().merge(this)}},xe=class{constructor(t){this.selector=t}get id(){return`k:${this.selector}`}getStyles(){return this.selector}clone(){return this}},_e=class e extends mt{constructor(t,r){super(),this.style=t,this.pid=r}get id(){return`s:${this.pid}:${this.style}`}getStyles(){return`${this.sheet.join(",")}{${this.style}}`}clone(){return new e(this.style,this.pid).merge(this)}},we=class e extends mt{constructor(t,r,n){super(),this.rule=t,this.style=r,this.pid=n}get id(){return`r:${this.pid}:${this.rule}:${this.style}`}getStyles(){return`${this.rule}{${this.style}${jr(this.sheet)}}`}clone(){return new e(this.rule,this.style,this.pid).merge(this)}},be=class e extends mt{constructor(t,r){super(r),this.id=t}registerStyle(t){let r=[],n=[],o=Sr(r,n,"",t,".&"),a=`f${vo(o)}`;return Ar(this,r,n,a,a),a}getStyles(){return jr(this.sheet)}clone(){return new e(this.id,this.changes).merge(this)}};function Pr(e){return new be(`f${(++Or).toString(36)}`,e)}var qr=Zt([re,Yt(ee)]),wo=(e,...t)=>{let r=e,n=t;return{state:()=>r,setState:o=>{r=o,B(Jt,n)},subscribe:o=>n=Kt(o,n)}},ht=document,Oe=e=>ht.createElement(e),bo=e=>ht.createTextNode(e),Oo=e=>ht.head.appendChild(e),Ur=e=>ht.body.appendChild(e),T=(e,t,...r)=>{let n=Oe(e);return ne((o,a)=>n[a]=o,t),B(o=>{o&&n.appendChild(te(String,o)?bo(o):o)},r),n},et=e=>ht.getElementById(e),kr=e=>et(e).value,Ct=e=>et(e).disabled=!0,Tr=e=>{qr(et(e))&&et(e).offsetParent!=null&&et(e).focus()},gt=e=>"{{.Cfg.SuperTokensWebLibBase}}"+e,yt=e=>{let t=Oe("script");t.setAttribute("src",e),t.async=!1,Ur(t)};yt(gt("/website.js"));yt(gt("/supertokens.js"));yt(gt("/session.js"));yt(gt("/passwordless.js"));yt(gt("/emailverification.js"));var q=e=>{let t=Pr(),r=t.registerStyle(e),n=Oe("style");return n.textContent=t.getStyles(),Oo(n),r},Io=q({position:"absolute",top:"12px",right:"12px",zIndex:999,display:"flex",alignItems:"flex-start"}),Er=q({padding:"4px",cursor:"pointer",marginLeft:"12px",fontVariant:"small-caps"}),Cr=q({width:"32px",height:"32px",padding:"4px",border:0,cursor:"pointer",borderRadius:"16px",marginLeft:"12px"}),Rr=q({width:"24px",height:"24px"}),Nr=q({display:"flex",flexDirection:"column",input:{marginBottom:"10px"}}),Mr=q({textAlign:"center"}),Br=q({opacity:"0%"}),Dr=q({marginTop:"10px"}),Wr={display:"flex",alignItems:"center"},So=q(Wr),Ao=q(ct(Wr,{width:"32px",height:"32px",justifyContent:"center"})),Lr=e=>()=>{tt({targets:e,opacity:["0%","100%"],duration:1e3,easing:"easeInOutQuad",complete:()=>{tt({targets:e,opacity:["100%","0%"],duration:1e3,delay:2e3,easing:"easeInOutQuad",complete:()=>{tt.remove(e)}})}})};window.onload=()=>{let e=F("{{.Cfg.PlainUI}}","true"),t=w=>"{{.Cfg.APIBasePath}}"+w,r=()=>F("{{.LoggedIn}}","true"),n=()=>"{{.UserEmail}}",o=()=>"{{.UserID}}",a="st"+crypto.randomUUID(),u=wo({init:!0,label:"...",stState:"init"}),s=(w,b)=>w.setState(I(ct(w.state(),b))),i=w=>b=>{(b.key==="Enter"||b.keyCode===13)&&w()},l=()=>{globalThis.stAuth.sendOTP(kr(a+"email")),Ct(a+"email"),Ct(a+"emailButton")},f=()=>{globalThis.stAuth.verifyOTP(kr(a+"otp")),Ct(a+"otp"),Ct(a+"otpButton")},c=()=>{u.setState(ct(u.state(),{stState:"init",displayState:m.init()})),d.state("loggedOut")},m={init:()=>null,enterEmail:()=>T("div",{className:Nr},T("input",{id:a+"email",type:"text",placeholder:"your.email@address.com",onkeyup:i(l),className:Mr}),T("button",{id:a+"emailButton",onclick:l},"Request one-time code"),T("button",{className:Dr,onclick:c},"Close")),enterOTP:()=>T("div",{className:Nr},T("input",{id:a+"otp",type:"text",placeholder:"One-time code",onkeyup:i(f),className:Mr}),T("button",{id:a+"otpButton",onclick:f},"Verify code"),T("button",{className:Dr,onclick:c},"Close")),showEmail:()=>e?T("div",{className:So},T("div",{id:a+"userEmail",className:Br},n()),T("a",{href:"#",className:Er,onclick:Lr("#"+a+"userEmail")},"user")):T("div",{className:Ao},T("div",{id:a+"userEmail",className:Br},n()),T("button",{className:Cr,onclick:Lr("#"+a+"userEmail")},T("img",{className:Rr,src:r()?t("/person_outline.svg"):null})))},I=w=>({loggedOut:X,checkEmail:jt({displayState:m.enterOTP()}),wrongOTP:X,oldOTP:X,failedOTP:X,signUpSuccess:pt(()=>window.location.reload()),signInSuccess:pt(()=>window.location.reload()),loggedIn:jt({displayState:m.showEmail()}),logoutCompleted:pt(()=>window.location.reload())})[w.stState](w),v=()=>{u.state().stState==="loggedOut"?s(u,{displayState:m.enterEmail()}):u.state().stState==="loggedIn"&&globalThis.stAuth.logout()},h=()=>T("div",{id:a,className:Io,style:"opacity:"+(u.state().stState=="init"?0:100)+"%;"},u.state().displayState,e?T("a",{href:"#",className:Er,onclick:v},r()?"logout":"login"):T("button",{className:Cr,onclick:v},T("img",{className:Rr,src:t(r()?"/logout.svg":"/login.svg")})));u.subscribe(()=>{et(a).replaceWith(h()),Tr(a+"email"),Tr(a+"otp")}),Ur(h());let d={catch:(w,b)=>showError(w,b),state:(w,b)=>s(u,{stState:w,stData:b})},S=(w,b)=>d.catch(w+(b.isSuperTokensGeneralError?" (some other failure)":""),b);supertokens.init({appInfo:{apiDomain:"{{.Cfg.APIDomain}}",apiBasePath:"{{.Cfg.APIBasePath}}",appName:"{{.Cfg.AppName}}"},recipeList:[supertokensEmailVerification.init(),supertokensSession.init(),supertokensPasswordless.init()]});let k=async w=>{try{(await supertokensPasswordless.createCode({email:w})).status!="SIGN_IN_UP_NOT_ALLOWED"&&d.state("checkEmail")}catch(b){S("sendOTP",b)}},g=async w=>{try{let b=await supertokensPasswordless.consumeCode({userInputCode:w});b.status==="OK"?b.createdNewRecipeUser&&b.user.loginMethods.length===1?d.state("signUpSuccess",b.user.id):d.state("signInSuccess",b.user.id):b.status==="INCORRECT_USER_INPUT_CODE_ERROR"?d.state("wrongOTP"):b.status==="EXPIRED_USER_INPUT_CODE_ERROR"?d.state("oldOTP"):d.state("failedOTP")}catch(b){S("handleOTP",b)}},x=async()=>{await supertokensSession.signOut(),d.state("logoutCompleted")};globalThis.stAuth={sendOTP:k,verifyOTP:g,logout:x,isLoggedIn:r,userEmail:n,userID:o},qr(globalThis.authHooks)&&globalThis.authHooks.forEach(([w,b])=>{let A=d[w];d[w]=(V,N)=>{A(V,N),b(V,N)}}),r()?d.state("loggedIn",n()):d.state("loggedOut"),tt({targets:"#"+a,opacity:"100%",duration:1e3,easing:"easeInOutQuad",complete:()=>tt.remove("#"+a)})};})();