(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-libs"],{"009a":function(e,t,n){var r=n("b3ad")("unscopables"),i=Array.prototype;void 0==i[r]&&n("1690")(i,r,{}),e.exports=function(e){i[r][e]=!0}},"00b4":function(e,t,n){"use strict";n("ac1f");var r=n("23e7"),i=n("c65b"),o=n("1626"),a=n("825a"),s=n("577e"),c=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),l=/./.test;r({target:"RegExp",proto:!0,forced:!c},{test:function(e){var t=a(this),n=s(e),r=t.exec;if(!o(r))return i(l,t,n);var c=i(r,t,n);return null!==c&&(a(c),!0)}})},"00ce":function(e,t,n){"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(D){c=null}var l=function(){throw new a},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(t){return l}}}():l,d=n("5156")(),f=n("0a36")(),p=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),h={},m="undefined"!==typeof Uint8Array&&p?p(Uint8Array):r,g={"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&p?p(p([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&d&&p?p((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&d&&p?p((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&p?p(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(p)try{null.error}catch(D){var v=p(p(D));g["%Error.prototype%"]=v}var b=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(n=p(i.prototype))}return g[t]=n,n},_={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n("0f7c"),w=n("9671"),x=y.call(Function.call,Array.prototype.concat),k=y.call(Function.apply,Array.prototype.splice),C=y.call(Function.call,String.prototype.replace),A=y.call(Function.call,String.prototype.slice),S=y.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,O=function(e){var t=A(e,0,1),n=A(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return C(e,E,(function(e,t,n,i){r[r.length]=n?C(i,T,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(w(_,r)&&(n=_[r],r="%"+n[0]+"%"),w(g,r)){var o=g[r];if(o===h&&(o=b(r)),"undefined"===typeof o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=O(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),s=o.name,l=o.value,u=!1,d=o.alias;d&&(r=d[0],k(n,x([0,1],d)));for(var f=1,p=!0;f=n.length){var b=c(l,h);p=!!b,l=p&&"get"in b&&!("originalValue"in b.get)?b.get:l[h]}else p=w(l,h),l=l[h];p&&!u&&(g[s]=l)}}return l}},"00d8":function(e,t){(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};e.exports=n})()},"00ee":function(e,t,n){"use strict";var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"01b4":function(e,t,n){"use strict";var r=function(){this.head=null,this.tail=null};r.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return null===t&&(this.tail=null),e.item}}},e.exports=r},"030f":function(e,t,n){(function(e){(function(){"use strict";var t=function(e){var t=typeof e;return null===e?"null":"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},n=function(e){return function(n){return t(n)===e}},r=function(e){return function(t){return typeof t===e}},i=function(e){return function(t){return e===t}},o=n("string"),a=n("object"),s=n("array"),c=i(null),l=r("boolean"),u=i(void 0),d=function(e){return null===e||void 0===e},f=function(e){return!d(e)},p=r("function"),h=r("number"),m=function(e,t){if(s(e)){for(var n=0,r=e.length;n-1},H=function(e,t){for(var n=0,r=e.length;n=0;n--){var r=e[n];t(r,n)}},Y=function(e,t){for(var n=[],r=[],i=0,o=e.length;i=0&&t=t.length&&e.substr(n,n+t.length)===t},je=function(e,t){return He(e,t)?Pe(e,t.length):e},ze=function(e,t){return Ue(e,t)?e:Ie(e,t)},qe=function(e,t){return-1!==e.indexOf(t)},He=function(e,t){return $e(e,t,0)},Ue=function(e,t){return $e(e,t,e.length-t.length)},We=function(e){return function(t){return t.replace(e,"")}},Ve=We(/^\s+|\s+$/g),Ge=function(e){return e.length>0},Ke=function(e){return!Ge(e)},Ye=function(e){return void 0!==e.style&&p(e.style.getPropertyValue)},Xe=function(e,t){var n=t||document,r=n.createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw new Error("HTML must have a single root node");return Ze(r.childNodes[0])},Qe=function(e,t){var n=t||document,r=n.createElement(e);return Ze(r)},Je=function(e,t){var n=t||document,r=n.createTextNode(e);return Ze(r)},Ze=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},et=function(e,t,n){return B.from(e.dom.elementFromPoint(t,n)).map(Ze)},tt={fromHtml:Xe,fromTag:Qe,fromText:Je,fromDom:Ze,fromPoint:et};"undefined"!==typeof window?window:Function("return this;")();var nt,rt=9,it=11,ot=1,at=3,st=function(e){var t=e.dom.nodeName;return t.toLowerCase()},ct=function(e){return e.dom.nodeType},lt=function(e){return function(t){return ct(t)===e}},ut=lt(ot),dt=lt(at),ft=lt(rt),pt=lt(it),ht=function(e){var t,n=!1;return function(){for(var r=[],i=0;i0&&t0}))},er=function(e){var t={},n=e.dom;if(Ye(n))for(var r=0;rr?t-r:0;return i};return{set:n,get:r,getOuter:i,aggregate:o,max:a}},or=ir("height",(function(e){var t=e.dom;return Bn(e)?t.getBoundingClientRect().height:t.offsetHeight})),ar=function(e){return or.get(e)},sr=function(e){return or.getOuter(e)},cr=function(e,t){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=or.max(e,t,n);Kn(e,"max-height",r+"px")},lr=function(e,t){var n=function(n,r){return lr(e+n,t+r)};return{left:e,top:t,translate:n}},ur=lr,dr=function(e){var t=e.getBoundingClientRect();return ur(t.left,t.top)},fr=function(e,t){return void 0!==e?e:void 0!==t?t:0},pr=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,i=t.documentElement;if(n===e.dom)return ur(n.offsetLeft,n.offsetTop);var o=fr(null===r||void 0===r?void 0:r.pageYOffset,i.scrollTop),a=fr(null===r||void 0===r?void 0:r.pageXOffset,i.scrollLeft),s=fr(i.clientTop,n.clientTop),c=fr(i.clientLeft,n.clientLeft);return hr(e).translate(a-c,o-s)},hr=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?ur(r.offsetLeft,r.offsetTop):Bn(e)?dr(t):ur(0,0)},mr=ir("width",(function(e){return e.dom.offsetWidth})),gr=function(e,t){return mr.set(e,t)},vr=function(e){return mr.get(e)},br=function(e){return mr.getOuter(e)},_r=function(e,t){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=mr.max(e,t,n);Kn(e,"max-width",r+"px")},yr=function(e,t,n,r,i,o,a){return{target:e,x:t,y:n,stop:r,prevent:i,kill:o,raw:a}},wr=function(e){var t=tt.fromDom(Fn(e).getOr(e.target)),n=function(){return e.stopPropagation()},r=function(){return e.preventDefault()},i=b(r,n);return yr(t,e.clientX,e.clientY,n,r,i,e)},xr=function(e,t){return function(n){e(n)&&t(wr(n))}},kr=function(e,t,n,r,i){var o=xr(n,r);return e.dom.addEventListener(t,o,i),{unbind:k(Sr,e,t,o,i)}},Cr=function(e,t,n,r){return kr(e,t,n,r,!1)},Ar=function(e,t,n,r){return kr(e,t,n,r,!0)},Sr=function(e,t,n,r){e.dom.removeEventListener(t,n,r)},Er=function(e,t){var n=vn(e);n.each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},Tr=function(e,t){var n=yn(e);n.fold((function(){var n=vn(e);n.each((function(e){Rr(e,t)}))}),(function(e){Er(e,t)}))},Or=function(e,t){var n=kn(e);n.fold((function(){Rr(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},Rr=function(e,t){e.dom.appendChild(t.dom)},Dr=function(e,t,n){xn(e,n).fold((function(){Rr(e,t)}),(function(e){Er(e,t)}))},Lr=function(e,t){G(t,(function(t){Er(e,t)}))},Mr=function(e,t){G(t,(function(t){Rr(e,t)}))},Fr=function(e){e.dom.textContent="",G(wn(e),(function(e){Nr(e)}))},Nr=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Br=function(e){var t=wn(e);t.length>0&&Lr(e,t),Nr(e)},Ir=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return ur(n,r)},Pr=function(e,t,n){var r=void 0!==n?n.dom:document,i=r.defaultView;i&&i.scrollTo(e,t)},$r=function(e){var t=void 0===e?window:e;return tn().browser.isFirefox()?B.none():B.from(t["visualViewport"])},jr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},zr=function(e){var t=void 0===e?window:e,n=t.document,r=Ir(tt.fromDom(n));return $r(t).fold((function(){var e=t.document.documentElement,n=e.clientWidth,i=e.clientHeight;return jr(r.left,r.top,n,i)}),(function(e){return jr(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)}))},qr=function(e,t){var n=e.view(t);return n.fold(y([]),(function(t){var n=e.owner(t),r=qr(e,n);return[t].concat(r)}))},Hr=function(e,t){var n=t.owner(e),r=qr(t,n);return B.some(r)},Ur=function(e){var t,n=e.dom===document?B.none():B.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement);return n.map(tt.fromDom)},Wr=function(e){return pn(e)},Vr=Object.freeze({__proto__:null,view:Ur,owner:Wr}),Gr=function(e){var t=tt.fromDom(document),n=Ir(t),r=Hr(e,Vr);return r.fold(k(pr,e),(function(t){var r=hr(e),i=Q(t,(function(e,t){var n=hr(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return ur(i.left+r.left+n.left,i.top+r.top+n.top)}))},Kr=function(e,t,n){return{point:e,width:t,height:n}},Yr=function(e,t,n,r){return{x:e,y:t,width:n,height:r}},Xr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qr=function(e){var t=pr(e),n=br(e),r=sr(e);return Xr(t.left,t.top,n,r)},Jr=function(e){var t=Gr(e),n=br(e),r=sr(e);return Xr(t.left,t.top,n,r)},Zr=function(){return zr(window)},ei=function(e){var t=function(t){return ei(e)},n=function(t){return ei(e)},r=function(t){return ei(t(e))},i=function(t){return ei(e)},o=function(t){t(e)},a=function(t){return t(e)},s=function(t,n){return n(e)},c=function(t){return t(e)},l=function(t){return t(e)},u=function(){return B.some(e)};return{isValue:E,isError:S,getOr:y(e),getOrThunk:y(e),getOrDie:y(e),or:t,orThunk:n,fold:s,map:r,mapError:i,each:o,bind:a,exists:c,forall:l,toOptional:u}},ti=function(e){var t=function(e){return e()},n=function(){return A(String(e))()},r=w,i=function(e){return e()},o=function(t){return ti(e)},a=function(t){return ti(t(e))},s=function(t){return ti(e)},c=function(t,n){return t(e)};return{isValue:S,isError:E,getOr:w,getOrThunk:t,getOrDie:n,or:r,orThunk:i,fold:c,map:o,mapError:a,each:g,bind:s,exists:S,forall:E,toOptional:B.none}},ni=function(e,t){return e.fold((function(){return ti(t)}),ei)},ri={value:ei,error:ti,fromOption:ni};(function(e){e[e["Error"]=0]="Error",e[e["Value"]=1]="Value"})(nt||(nt={}));var ii=function(e,t,n){return e.stype===nt.Error?t(e.serror):n(e.svalue)},oi=function(e){var t=[],n=[];return G(e,(function(e){ii(e,(function(e){return n.push(e)}),(function(e){return t.push(e)}))})),{values:t,errors:n}},ai=function(e,t){return e.stype===nt.Error?{stype:nt.Error,serror:t(e.serror)}:e},si=function(e,t){return e.stype===nt.Value?{stype:nt.Value,svalue:t(e.svalue)}:e},ci=function(e,t){return e.stype===nt.Value?t(e.svalue):e},li=function(e,t){return e.stype===nt.Error?t(e.serror):e},ui=function(e){return{stype:nt.Value,svalue:e}},di=function(e){return{stype:nt.Error,serror:e}},fi=function(e){return ii(e,ri.error,ri.value)},pi=function(e){return e.fold(di,ui)},hi={fromResult:pi,toResult:fi,svalue:ui,partition:oi,serror:di,bind:ci,bindError:li,map:si,mapError:ai,fold:ii},mi=function(e,t,n,r){return{tag:"field",key:e,newKey:t,presence:n,prop:r}},gi=function(e,t){return{tag:"custom",newKey:e,instantiator:t}},vi=function(e,t,n){switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},bi=function(e,t){return t},_i=function(e,t){var n=a(e)&&a(t);return n?wi(e,t):t},yi=function(e){return function(){for(var t=[],n=0;n0?hi.svalue(wi(t,xi.apply(void 0,e))):hi.svalue(t)},Ri=function(e){return b(hi.serror,ne)(e)},Di=function(e,t){var n=hi.partition(e);return n.errors.length>0?Ri(n.errors):Oi(n.values,t)},Li=function(e){var t=hi.partition(e);return t.errors.length>0?Ri(t.errors):hi.svalue(t.values)},Mi={consolidateObj:Di,consolidateArr:Li},Fi=function(e){return a(e)&&me(e).length>100?" removed due to size":JSON.stringify(e,null,2)},Ni=function(e){var t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:y("... (only showing first ten failures)")}]):e;return V(t,(function(e){return"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()}))},Bi=function(e,t){return hi.serror([{path:e,getErrorInfo:t}])},Ii=function(e,t,n){return Bi(e,(function(){return'Could not find valid *required* value for "'+t+'" in '+Fi(n)}))},Pi=function(e,t){return Bi(e,(function(){return'Choice schema did not contain choice key: "'+t+'"'}))},$i=function(e,t,n){return Bi(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Fi(t)}))},ji=function(e,t){return Bi(e,(function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"}))},zi=function(e,t){return Bi(e,y(t))},qi=function(e){var t=function(t,n){return hi.bindError(e(n),(function(e){return zi(t,e)}))},n=y("val");return{extract:t,toString:n}},Hi=qi(hi.svalue),Ui=function(e,t,n,r){return Se(t,n).fold((function(){return Ii(e,n,t)}),r)},Wi=function(e,t,n,r){var i=Se(e,t).getOrThunk((function(){return n(e)}));return r(i)},Vi=function(e,t,n){return n(Se(e,t))},Gi=function(e,t,n,r){var i=Se(e,t).map((function(t){return!0===t?n(e):t}));return r(i)},Ki=function(e,t,n,r,i){var o=function(e){return i.extract(t.concat([r]),e)},a=function(e){return e.fold((function(){return hi.svalue(B.none())}),(function(e){var n=i.extract(t.concat([r]),e);return hi.map(n,B.some)}))};switch(e.tag){case"required":return Ui(t,n,r,o);case"defaultedThunk":return Wi(n,r,e.process,o);case"option":return Vi(n,r,a);case"defaultedOptionThunk":return Gi(n,r,e.process,a);case"mergeWithThunk":return Wi(n,r,y({}),(function(t){var r=wi(e.process(n),t);return o(r)}))}},Yi=function(e,t,n){for(var r={},i=[],o=0,a=n;o0?hi.serror(i):hi.svalue(r)},Xi=function(e){var t=function(t,n){return e().extract(t,n)},n=function(){return e().toString()};return{extract:t,toString:n}},Qi=function(e){return me(xe(e,f))},Ji=function(e){var t=Zi(e),n=Q(e,(function(e,t){return vi(t,(function(t){var n;return wi(e,(n={},n[t]=!0,n))}),y(e))}),{}),r=function(e,r){var i=l(r)?[]:Qi(r),o=X(i,(function(e){return!Te(n,e)}));return 0===o.length?t.extract(e,r):ji(e,o)};return{extract:r,toString:t.toString}},Zi=function(e){var t=function(t,n){return Yi(t,n,e)},n=function(){var t=V(e,(function(e){return vi(e,(function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))}));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:n}},eo=function(e){var t=function(t,n){var r=V(n,(function(n,r){return e.extract(t.concat(["["+r+"]"]),n)}));return Mi.consolidateArr(r)},n=function(){return"array("+e.toString()+")"};return{extract:t,toString:n}},to=function(e){var t=function(t,n){for(var r=[],i=0,o=e;i0?ga(n.errors):ma(n.values,t)},ba=function(e){return p(e)?e:S},_a=function(e,t,n){var r=e.dom,i=ba(n);while(r.parentNode){r=r.parentNode;var o=tt.fromDom(r),a=t(o);if(a.isSome())return a;if(i(o))break}return B.none()},ya=function(e,t,n){var r=t(e),i=ba(n);return r.orThunk((function(){return i(e)?B.none():_a(e,t,i)}))},wa=function(e,t){return ln(e.element,t.event.target)},xa={can:E,abort:S,run:g},ka=function(e){if(!Te(e,"can")&&!Te(e,"abort")&&!Te(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return O(O({},xa),e)},Ca=function(e,t){return function(){for(var n=[],r=0;r1?X(t[n],(function(t){return H(e,(function(e){return e.name===t}))})).join(" > "):e[0].name;return pa(n,Fc(i,o))}))}));return va(n,{})},Vc="alloy.base.behaviour",Gc=Zi([So("dom","dom",ki(),Zi([Oo("tag"),Ko("styles",{}),Ko("classes",[]),Ko("attributes",{}),jo("value"),jo("innerHtml")])),Oo("components"),Oo("uid"),Ko("events",{}),Ko("apis",{}),So("eventOrder","eventOrder",Ti((sa={},sa[ts()]=["disabling",Vc,"toggling","typeaheadevents"],sa[Qa()]=[Vc,"focusing","keying"],sa[ss()]=[Vc,"disabling","toggling","representing"],sa[qa()]=[Vc,"representing","streaming","invalidating"],sa[ps()]=[Vc,"representing","item-events","tooltipping"],sa[Ma()]=["focusing",Vc,"item-type-events"],sa[Oa()]=["focusing",Vc,"item-type-events"],sa[Ia()]=["item-type-events","tooltipping"],sa[es()]=["receiving","reflecting","tooltipping"],sa)),oo()),jo("domModification")]),Kc=function(e){return yo("custom.definition",Gc,e)},Yc=function(e){return O(O({},e.dom),{uid:e.uid,domChildren:V(e.components,(function(e){return e.element}))})},Xc=function(e){return e.domModification.fold((function(){return Rc({})}),Rc)},Qc=function(e){return e.events},Jc=function(e,t){var n=qn(e,t);return void 0===n||""===n?[]:n.split(" ")},Zc=function(e,t,n){var r=Jc(e,t),i=r.concat([n]);return jn(e,t,i.join(" ")),!0},el=function(e,t,n){var r=X(Jc(e,t),(function(e){return e!==n}));return r.length>0?jn(e,t,r.join(" ")):Wn(e,t),!1},tl=function(e){return void 0!==e.dom.classList},nl=function(e){return Jc(e,"class")},rl=function(e,t){return Zc(e,"class",t)},il=function(e,t){return el(e,"class",t)},ol=function(e,t){tl(e)?e.dom.classList.add(t):rl(e,t)},al=function(e){var t=tl(e)?e.dom.classList:nl(e);0===t.length&&Wn(e,"class")},sl=function(e,t){if(tl(e)){var n=e.dom.classList;n.remove(t)}else il(e,t);al(e)},cl=function(e,t){return tl(e)&&e.dom.classList.contains(t)},ll=function(e,t){G(t,(function(t){ol(e,t)}))},ul=function(e,t){G(t,(function(t){sl(e,t)}))},dl=function(e,t){return ie(t,(function(t){return cl(e,t)}))},fl=function(e){return e.dom.value},pl=function(e,t){if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},hl=function(e){var t=tt.fromTag(e.tag);zn(t,e.attributes),ll(t,e.classes),Yn(t,e.styles),e.innerHtml.each((function(e){return Ks(t,e)}));var n=e.domChildren;return Mr(t,n),e.value.each((function(e){pl(t,e)})),e.uid,uc(t,e.uid),t},ml=function(e){var t=Se(e,"behaviours").getOr({});return re(me(t),(function(e){var n=t[e];return f(n)?[n.me]:[]}))},gl=function(e,t){return Sc(e,t)},vl=function(e){var t=ml(e);return gl(e,t)},bl=function(e,t,n){var r=Yc(e),i=Xc(e),o={"alloy.base.modification":i},a=t.length>0?Lc(n,o,t,r):i;return Dc(r,a)},_l=function(e,t,n){var r={"alloy.base.behaviour":Qc(e)};return zc(n,e.eventOrder,t,r).getOrDie()},yl=function(e){var t=function(){return _},n=ia(mc),r=wo(Kc(e)),i=vl(e),o=Ec(i),a=Tc(i),s=bl(r,o,a),c=hl(s),l=_l(r,o,a),u=ia(r.components),d=function(e){n.set(e)},f=function(){n.set(hc(t))},h=function(){var e=wn(c),t=re(e,(function(e){return n.get().getByDom(e).fold((function(){return[]}),ce)}));u.set(t)},m=function(t){var n=a,r=p(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))};return r()},g=function(e){return p(a[e.name()])},v=function(){return r.apis},b=function(e){return a[e]().map((function(e){return e.state.readState()})).getOr("not enabled")},_={uid:e.uid,getSystem:n.get,config:m,hasConfigured:g,spec:e,readState:b,getApis:v,connect:d,disconnect:f,element:c,syncComponents:h,components:u.get,events:l};return _},wl=function(e){var t=Se(e,"components").getOr([]);return V(t,El)},xl=function(e){var t=pc(e),n=t.events,r=R(t,["events"]),i=wl(r),o=O(O({},r),{events:O(O({},nc),n),components:i});return ri.value(yl(o))},kl=function(e){var t=tt.fromText(e);return Cl({element:t})},Cl=function(e){var t=xo("external.component",Ji([Oo("element"),jo("uid")]),e),n=ia(hc()),r=function(e){n.set(e)},i=function(){n.set(hc((function(){return a})))},o=t.uid.getOrThunk((function(){return fc("external")}));uc(t.element,o);var a={uid:o,getSystem:n.get,config:B.none,hasConfigured:S,connect:r,disconnect:i,getApis:function(){return{}},element:t.element,spec:e,readState:y("No state"),syncComponents:g,components:y([]),events:{}};return wc(a)},Al=fc,Sl=function(e){return Ee(e,"uid")},El=function(e){return xc(e).getOrThunk((function(){var t=Sl(e)?e:O({uid:Al("")},e);return xl(t).getOrDie()}))},Tl=wc;function Ol(e,t,n,r,i){return e(n,r)?B.some(n):p(i)&&i(n)?B.none():t(n,r,i)}var Rl,Dl=function(e,t,n){var r=e.dom,i=p(n)?n:S;while(r.parentNode){r=r.parentNode;var o=tt.fromDom(r);if(t(o))return B.some(o);if(i(o))break}return B.none()},Ll=function(e,t,n){var r=function(e,t){return t(e)};return Ol(r,Dl,e,t,n)},Ml=function(e,t){var n=function(e){return t(tt.fromDom(e))},r=ee(e.dom.childNodes,n);return r.map(tt.fromDom)},Fl=function(e,t){var n=function(e){for(var r=0;r-1}));return t.bind((function(e){var t=qn(e,"id"),n=On(e);return Pl(n,'[aria-owns="'+t+'"]')}))},zl=function(){var e=ic("aria-owns"),t=function(t){jn(t,"aria-owns",e)},n=function(e){Wn(e,"aria-owns")};return{id:e,link:t,unlink:n}},ql=function(e,t){return jl(t).exists((function(t){return Hl(e,t)}))},Hl=function(e,t){return Nl(t,(function(t){return ln(t,e.element)}),S)||ql(e,t)},Ul="unknown";(function(e){e[e["STOP"]=0]="STOP",e[e["NORMAL"]=1]="NORMAL",e[e["LOGGING"]=2]="LOGGING"})(Rl||(Rl={}));var Wl=ia({}),Vl=function(e,t){var n=[];(new Date).getTime();return{logEventCut:function(e,t,r){n.push({outcome:"cut",target:t,purpose:r})},logEventStopped:function(e,t,r){n.push({outcome:"stopped",target:t,purpose:r})},logNoParent:function(e,t,r){n.push({outcome:"no-parent",target:t,purpose:r})},logEventNoHandlers:function(e,t){n.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(e,t,r){n.push({outcome:"response",purpose:r,target:t})},write:function(){(new Date).getTime();q(["mousemove","mouseover","mouseout",ss()],e)}}},Gl=function(e,t,n){var r=Se(Wl.get(),e).orThunk((function(){var t=me(Wl.get());return he(t,(function(t){return e.indexOf(t)>-1?B.some(Wl.get()[t]):B.none()}))})).getOr(Rl.NORMAL);switch(r){case Rl.NORMAL:return n(Jl());case Rl.LOGGING:var i=Vl(e,t),o=n(i);return i.write(),o;case Rl.STOP:return!0}},Kl=["alloy/data/Fields","alloy/debugging/Debugging"],Yl=function(){var e=new Error;if(void 0!==e.stack){var t=e.stack.split("\n");return ee(t,(function(e){return e.indexOf("alloy")>0&&!H(Kl,(function(t){return e.indexOf(t)>-1}))})).getOr(Ul)}return Ul},Xl={logEventCut:g,logEventStopped:g,logNoParent:g,logEventNoHandlers:g,logEventResponse:g,write:g},Ql=function(e,t,n){return Gl(e,t,n)},Jl=y(Xl),Zl=y([Oo("menu"),Oo("selectedMenu")]),eu=y([Oo("item"),Oo("selectedItem")]);y(Zi(eu().concat(Zl())));var tu=y(Zi(eu())),nu=Io("initSize",[Oo("numColumns"),Oo("numRows")]),ru=function(){return Ro("markers",tu())},iu=function(){return Io("markers",[Oo("backgroundMenu")].concat(Zl()).concat(eu()))},ou=function(e){return Io("markers",V(e,Oo))},au=function(e,t,n){return Yl(),So(t,t,n,vo((function(e){return ri.value((function(){for(var t=[],n=0;nr?n:i=n&&a<=i,p=s>=r&&s<=o,h=f&&p,m=c<=i&&c>=n,g=l<=o&&l>=r,v=m&&g,b=Math.min(u,a>=n?i-a:c-n),_=Math.min(d,s>=r?o-s:l-r);return{originInBounds:h,sizeInBounds:v,visibleW:b,visibleH:_}},Yd=function(e,t){var n=t.x,r=t.y,i=t.right,o=t.bottom,a=e.x,s=e.y,c=e.width,l=e.height,u=Math.max(n,i-c),d=Math.max(r,o-l),f=Tu(a,n,u),p=Tu(s,r,d),h=Math.min(f+c,i)-f,m=Math.min(p+l,o)-p;return Xr(f,p,h,m)},Xd=function(e,t,n){var r=y(t.bottom-n.y),i=y(n.bottom-t.y),o=vu(e,i,i,r),a=y(t.right-n.x),s=y(n.right-t.x),c=bu(e,s,s,a);return{maxWidth:c,maxHeight:o}},Qd=function(e,t,n,r){var i=e.bubble,o=i.offset,a=Du(r,e.restriction,o),s=e.x+o.left,c=e.y+o.top,l=Xr(s,c,t,n),u=Kd(l,a),d=u.originInBounds,f=u.sizeInBounds,p=u.visibleW,h=u.visibleH,m=d&&f,g=m?l:Yd(l,a),v=g.width>0&&g.height>0,b=Xd(e.direction,g,r),_=b.maxWidth,y=b.maxHeight,w={rect:g,maxHeight:y,maxWidth:_,direction:e.direction,placement:e.placement,classes:{on:i.classesOn,off:i.classesOff},layout:e.label,testY:c};return m||e.alwaysFit?Gd.fit(w):Gd.nofit(w,p,h,v)},Jd=function(e,t,n,r,i,o){var a=r.width,s=r.height,c=function(t,c,l,u,d){var f=t(n,r,i,e,o),p=Qd(f,a,s,o);return p.fold(y(p),(function(e,t,n,r){var i=d===r?n>u||t>l:!d&&r;return i?p:Gd.nofit(c,l,u,d)}))},l=J(t,(function(e,t){var n=k(c,t);return e.fold(y(e),n)}),Gd.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:_u(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1));return l.fold(w,w)},Zd=function(e){var t=ia(B.none()),n=function(){return t.get().each(e)},r=function(){n(),t.set(B.none())},i=function(){return t.get().isSome()},o=function(){return t.get()},a=function(e){n(),t.set(B.some(e))};return{clear:r,isSet:i,get:o,set:a}},ef=function(){return Zd((function(e){return e.destroy()}))},tf=function(){return Zd((function(e){return e.unbind()}))},nf=function(){var e=ef(),t=function(t){return e.get().each(t)};return O(O({},e),{run:t})},rf=function(){var e=Zd(g),t=function(t){return e.get().each(t)};return O(O({},e),{on:t})},of=E,af=function(e,t,n){return Cr(e,t,of,n)},sf=function(e,t,n){return Ar(e,t,of,n)},cf=wr,lf=["top","bottom","right","left"],uf="data-alloy-transition-timer",df=function(e,t){return dl(e,t.classes)},ff=function(e,t,n){return n.exists((function(n){var r=e.mode;return"all"===r||n[r]!==t[r]}))},pf=function(e,t){var n=function(e){return parseFloat(e).toFixed(3)};return Ce(t,(function(t,r){var i=e[r].map(n),o=t.map(n);return!Re(i,o)})).isSome()},hf=function(e){var t=function(t){var n=Qn(e,t),r=o(n)?n.split(/\s*,\s*/):[];return X(r,Ge)},n=function(e){if(o(e)&&/^[\d.]+/.test(e)){var t=parseFloat(e);return Ue(e,"ms")?t:1e3*t}return 0},r=t("transition-delay"),i=t("transition-duration");return J(i,(function(e,t,i){var o=n(r[i])+n(t);return Math.max(e,o)}),0)},mf=function(e,t){var n,r=tf(),i=tf(),o=function(t){var n,r=null!==(n=t.raw.pseudoElement)&&void 0!==n?n:"";return ln(t.target,e)&&Ke(r)&&q(lf,t.raw.propertyName)},a=function(a){if(d(a)||o(a)){r.clear(),i.clear();var s=null===a||void 0===a?void 0:a.raw.type;(d(s)||s===Va())&&(clearTimeout(n),Wn(e,uf),ul(e,t.classes))}},s=function(){r.set(af(e,Va(),a)),i.set(af(e,Wa(),a))};if("ontransitionstart"in e.dom)var c=af(e,Ga(),(function(e){o(e)&&(c.unbind(),s())}));else s();var l=hf(e);requestAnimationFrame((function(){n=setTimeout(a,l+17),jn(e,uf,n)}))},gf=function(e,t){ll(e,t.classes),Hn(e,uf).each((function(t){clearTimeout(parseInt(t,10)),Wn(e,uf)})),mf(e,t)},vf=function(e,t,n,r,i,o){var a=ff(r,i,o);if(a||df(e,r)){Kn(e,"position",n.position);var s=Fd(t,e),c=Md(t,O(O({},i),{rect:s})),l=se(lf,(function(e){return c[e]}));pf(n,l)&&(Xn(e,l),a&&gf(e,r),rr(e))}else ul(e,r.classes)},bf=function(e){return{width:br(e),height:sr(e)}},_f=function(e,t,n,r){nr(t,"max-height"),nr(t,"max-width");var i=bf(t);return Jd(t,r.preference,e,i,n,r.bounds)},yf=function(e,t){var n=t.classes;ul(e,n.off),ll(e,n.on)},wf=function(e,t,n){var r=n.maxHeightFunction;r(e,t.maxHeight)},xf=function(e,t,n){var r=n.maxWidthFunction;r(e,t.maxWidth)},kf=function(e,t,n){var r=Md(n.origin,t);n.transition.each((function(i){vf(e,n.origin,r,i,t,n.lastPlacement)})),Rd(e,r)},Cf=function(e,t){Ud(e,t.placement)},Af=function(e,t){cr(e,Math.floor(t))},Sf=y((function(e,t){Af(e,t),Yn(e,{"overflow-x":"hidden","overflow-y":"auto"})})),Ef=y((function(e,t){Af(e,t)})),Tf=function(e,t,n){return void 0===e[t]?n:e[t]},Of=function(e,t,n,r,i,o,a,s){var c=Tf(a,"maxHeightFunction",Sf()),l=Tf(a,"maxWidthFunction",g),u=e.anchorBox,d=e.origin,f={bounds:Nd(d,o),origin:d,preference:r,maxHeightFunction:c,maxWidthFunction:l,lastPlacement:i,transition:s};return Rf(u,t,n,f)},Rf=function(e,t,n,r){var i=_f(e,t,n,r);return kf(t,i,r),Cf(t,i),yf(t,i),wf(t,i,r),xf(t,i,r),{layout:i.layout,placement:i.placement}},Df=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Lf=function(e,t,n,r){void 0===r&&(r=1);var i=e*r,o=t*r,a=function(e){return Se(n,e).getOr([])},s=function(e,t,n){var r=ae(Df,n);return{offset:ur(e,t),classesOn:re(n,a),classesOff:re(r,a)}};return{southeast:function(){return s(-e,t,["top","alignLeft"])},southwest:function(){return s(e,t,["top","alignRight"])},south:function(){return s(-e/2,t,["top","alignCentre"])},northeast:function(){return s(-e,-t,["bottom","alignLeft"])},northwest:function(){return s(e,-t,["bottom","alignRight"])},north:function(){return s(-e/2,-t,["bottom","alignCentre"])},east:function(){return s(e,-t/2,["valignCentre","left"])},west:function(){return s(-e,-t/2,["valignCentre","right"])},insetNortheast:function(){return s(i,o,["top","alignLeft","inset"])},insetNorthwest:function(){return s(-i,o,["top","alignRight","inset"])},insetNorth:function(){return s(-i/2,o,["top","alignCentre","inset"])},insetSoutheast:function(){return s(i,-o,["bottom","alignLeft","inset"])},insetSouthwest:function(){return s(-i,-o,["bottom","alignRight","inset"])},insetSouth:function(){return s(-i/2,-o,["bottom","alignCentre","inset"])},insetEast:function(){return s(-i,-o/2,["valignCentre","right","inset"])},insetWest:function(){return s(i,-o/2,["valignCentre","left","inset"])}}},Mf=function(){return Lf(0,0,{})},Ff=w,Nf=function(e,t){return function(n){return"rtl"===Bf(n)?t:e}},Bf=function(e){return"rtl"===Qn(e,"direction")?"rtl":"ltr"};(function(e){e["TopToBottom"]="toptobottom",e["BottomToTop"]="bottomtotop"})(Pd||(Pd={}));var If="data-alloy-vertical-dir",Pf=function(e){return Nl(e,(function(e){return ut(e)&&qn(e,"data-alloy-vertical-dir")===Pd.BottomToTop}))},$f=function(){return Vo("layouts",[Oo("onLtr"),Oo("onRtl"),jo("onBottomLtr"),jo("onBottomRtl")])},jf=function(e,t,n,r,i,o,a){var s=a.map(Pf).getOr(!1),c=t.layouts.map((function(t){return t.onLtr(e)})),l=t.layouts.map((function(t){return t.onRtl(e)})),u=s?t.layouts.bind((function(t){return t.onBottomLtr.map((function(t){return t(e)}))})).or(c).getOr(i):c.getOr(n),d=s?t.layouts.bind((function(t){return t.onBottomRtl.map((function(t){return t(e)}))})).or(l).getOr(o):l.getOr(r),f=Nf(u,d);return f(e)},zf=function(e,t,n){var r=t.hotspot,i=Fd(n,r.element),o=jf(e.element,t,Zu(),ed(),Qu(),Ju(),B.some(t.hotspot.element));return B.some(Ff({anchorBox:i,bubble:t.bubble.getOr(Mf()),overrides:t.overrides,layouts:o,placer:B.none()}))},qf=[Oo("hotspot"),jo("bubble"),Ko("overrides",{}),$f(),du("placement",zf)],Hf=function(e,t,n){var r=Bd(n,t.x,t.y),i=Xr(r.left,r.top,t.width,t.height),o=jf(e.element,t,Yu(),Xu(),Yu(),Xu(),B.none());return B.some(Ff({anchorBox:i,bubble:t.bubble,overrides:t.overrides,layouts:o,placer:B.none()}))},Uf=[Oo("x"),Oo("y"),Ko("height",0),Ko("width",0),Ko("bubble",Mf()),Ko("overrides",{}),$f(),du("placement",Hf)],Wf=aa.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Vf=function(e){return e.fold(w,(function(e,t,n){return e.translate(-t,-n)}))},Gf=function(e){return e.fold(w,w)},Kf=function(e){return J(e,(function(e,t){return e.translate(t.left,t.top)}),ur(0,0))},Yf=function(e){var t=V(e,Vf);return Kf(t)},Xf=function(e){var t=V(e,Gf);return Kf(t)},Qf=Wf.screen,Jf=Wf.absolute,Zf=function(e,t,n){var r=gn(n.root).dom,i=function(t){var n=pn(t),r=pn(e.element);return ln(n,r)};return B.from(r.frameElement).map(tt.fromDom).filter(i).map(pr)},ep=function(e,t,n){var r=pn(e.element),i=Ir(r),o=Zf(e,t,n).getOr(i);return Jf(o,i.left,i.top)},tp=function(e,t,n,r){var i=Qf(ur(e,t));return B.some(Kr(i,n,r))},np=function(e,t,n,r,i){return e.map((function(e){var o=[t,e.point],a=Id(r,(function(){return Xf(o)}),(function(){return Xf(o)}),(function(){return Yf(o)})),s=Yr(a.left,a.top,e.width,e.height),c=n.showAbove?Qu():Zu(),l=n.showAbove?Ju():ed(),u=jf(i,n,c,l,c,l,B.none());return Ff({anchorBox:s,bubble:n.bubble.getOr(Mf()),overrides:n.overrides,layouts:u,placer:B.none()})}))},rp=function(e,t,n){var r=ep(e,n,t);return t.node.filter(Bn).bind((function(i){var o=i.dom.getBoundingClientRect(),a=tp(o.left,o.top,o.width,o.height),s=t.node.getOr(e.element);return np(a,r,t,n,s)}))},ip=[Oo("node"),Oo("root"),jo("bubble"),$f(),Ko("overrides",{}),Ko("showAbove",!1),du("placement",rp)],op="\ufeff",ap=" ",sp=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},cp={create:sp},lp=aa.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),up=function(e,t,n,r){return e.fold(t,n,r)},dp=function(e){return e.fold(w,w,w)},fp=lp.before,pp=lp.on,hp=lp.after,mp={before:fp,on:pp,after:hp,cata:up,getStart:dp},gp=aa.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),vp=function(e){return gp.exact(e.start,e.soffset,e.finish,e.foffset)},bp=function(e){return e.match({domRange:function(e){return tt.fromDom(e.startContainer)},relative:function(e,t){return mp.getStart(e)},exact:function(e,t,n,r){return e}})},_p=gp.domRange,yp=gp.relative,wp=gp.exact,xp=function(e){var t=bp(e);return gn(t)},kp=cp.create,Cp={domRange:_p,relative:yp,exact:wp,exactFromRange:vp,getWin:xp,range:kp},Ap=function(e,t){t.fold((function(t){e.setStartBefore(t.dom)}),(function(t,n){e.setStart(t.dom,n)}),(function(t){e.setStartAfter(t.dom)}))},Sp=function(e,t){t.fold((function(t){e.setEndBefore(t.dom)}),(function(t,n){e.setEnd(t.dom,n)}),(function(t){e.setEndAfter(t.dom)}))},Ep=function(e,t,n){var r=e.document.createRange();return Ap(r,t),Sp(r,n),r},Tp=function(e,t,n,r,i){var o=e.document.createRange();return o.setStart(t.dom,n),o.setEnd(r.dom,i),o},Op=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Rp=function(e){var t=e.getClientRects(),n=t.length>0?t[0]:e.getBoundingClientRect();return n.width>0||n.height>0?B.some(n).map(Op):B.none()},Dp=function(e){var t=e.getBoundingClientRect();return t.width>0||t.height>0?B.some(t).map(Op):B.none()},Lp=aa.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Mp=function(e,t,n){return t(tt.fromDom(n.startContainer),n.startOffset,tt.fromDom(n.endContainer),n.endOffset)},Fp=function(e,t){return t.match({domRange:function(e){return{ltr:y(e),rtl:B.none}},relative:function(t,n){return{ltr:ht((function(){return Ep(e,t,n)})),rtl:ht((function(){return B.some(Ep(e,n,t))}))}},exact:function(t,n,r,i){return{ltr:ht((function(){return Tp(e,t,n,r,i)})),rtl:ht((function(){return B.some(Tp(e,r,i,t,n))}))}}})},Np=function(e,t){var n=t.ltr();if(n.collapsed){var r=t.rtl().filter((function(e){return!1===e.collapsed}));return r.map((function(e){return Lp.rtl(tt.fromDom(e.endContainer),e.endOffset,tt.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return Mp(e,Lp.ltr,n)}))}return Mp(e,Lp.ltr,n)},Bp=function(e,t){var n=Fp(e,t);return Np(e,n)},Ip=function(e,t){var n=Bp(e,t);return n.match({ltr:function(t,n,r,i){var o=e.document.createRange();return o.setStart(t.dom,n),o.setEnd(r.dom,i),o},rtl:function(t,n,r,i){var o=e.document.createRange();return o.setStart(r.dom,i),o.setEnd(t.dom,n),o}})};Lp.ltr,Lp.rtl;var Pp,$p=function(e,t){var n=function(n){if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return r(n).getOr("")},r=function(t){return e(t)?B.from(t.dom.nodeValue):B.none()},i=function(n,r){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:i}},jp=$p(dt,"text"),zp=function(e){return jp.get(e)},qp=function(e){return jp.getOption(e)},Hp=function(e){return"img"===st(e)?1:qp(e).fold((function(){return wn(e).length}),(function(e){return e.length}))},Up=function(e){return qp(e).filter((function(e){return 0!==e.trim().length||e.indexOf(ap)>-1})).isSome()},Wp=["img","br"],Vp=function(e){var t=Up(e);return t||q(Wp,st(e))},Gp=function(e){return Kp(e,Vp)},Kp=function(e,t){var n=function(e){for(var r=wn(e),i=r.length-1;i>=0;i--){var o=r[i];if(t(o))return B.some(o);var a=n(o);if(a.isSome())return a}return B.none()};return n(e)},Yp=function(e,t){return sn(t,e)},Xp=function(e,t,n,r){var i=pn(e),o=i.dom.createRange();return o.setStart(e.dom,t),o.setEnd(n.dom,r),o},Qp=function(e,t,n,r){var i=Xp(e,t,n,r),o=ln(e,n)&&t===r;return i.collapsed&&!o},Jp=function(e){return B.from(e.getSelection())},Zp=function(e){if(e.rangeCount>0){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return B.some(cp.create(tt.fromDom(t.startContainer),t.startOffset,tt.fromDom(n.endContainer),n.endOffset))}return B.none()},eh=function(e){if(null===e.anchorNode||null===e.focusNode)return Zp(e);var t=tt.fromDom(e.anchorNode),n=tt.fromDom(e.focusNode);return Qp(t,e.anchorOffset,n,e.focusOffset)?B.some(cp.create(t,e.anchorOffset,n,e.focusOffset)):Zp(e)},th=function(e){return Jp(e).filter((function(e){return e.rangeCount>0})).bind(eh)},nh=function(e,t){var n=Ip(e,t);return Rp(n)},rh=function(e,t){var n=Ip(e,t);return Dp(n)},ih=function(e,t){return{element:e,offset:t}},oh=function(e,t){var n=wn(e);if(0===n.length)return ih(e,t);if(t"})),oo()),xg=Eo("schema",(function(){return[jo("preprocess")]})),kg=Ko("defaults",y({})),Cg=Ko("overrides",y({})),Ag=Zi([bg,_g,yg,wg,kg,Cg]),Sg=Zi([bg,_g,yg,kg,Cg]),Eg=Zi([bg,_g,yg,wg,kg,Cg]),Tg=Zi([bg,xg,yg,Oo("unit"),wg,kg,Cg]),Og=function(e){return e.fold(B.some,B.none,B.some,B.some)},Rg=function(e){var t=function(e){return e.name};return e.fold(t,t,t,t)},Dg=function(e){return e.fold(w,w,w,w)},Lg=function(e,t){return function(n){var r=xo("Converting part type",t,n);return e(r)}},Mg=Lg(vg.required,Ag),Fg=Lg(vg.external,Sg),Ng=Lg(vg.optional,Eg),Bg=Lg(vg.group,Tg),Ig=y("entirety"),Pg=Object.freeze({__proto__:null,required:Mg,external:Fg,optional:Ng,group:Bg,asNamedPart:Og,name:Rg,asCommon:Dg,original:Ig}),$g=function(e,t,n,r){return wi(t.defaults(e,n,r),n,{uid:e.partUids[t.name]},t.overrides(e,n,r))},jg=function(e,t,n){var r={},i={};return G(n,(function(e){e.fold((function(e){r[e.pname]=hg(!0,(function(t,n,r){return e.factory.sketch($g(t,e,n,r))}))}),(function(e){var n=t.parts[e.name];i[e.name]=y(e.factory.sketch($g(t,e,n[Ig()]),n))}),(function(e){r[e.pname]=hg(!1,(function(t,n,r){return e.factory.sketch($g(t,e,n,r))}))}),(function(e){r[e.pname]=mg(!0,(function(t,n,r){var i=t[e.name];return V(i,(function(n){return e.factory.sketch(wi(e.defaults(t,n,r),n,e.overrides(t,n)))}))}))}))})),{internals:y(r),externals:y(i)}},zg=function(e,t){var n={};return G(t,(function(t){Og(t).each((function(t){var r=qg(e,t.pname);n[t.name]=function(n){var i=xo("Part: "+t.name+" in "+e,Zi(t.schema),n);return O(O({},r),{config:n,validated:i})}}))})),n},qg=function(e,t){return{uiType:gg(),owner:e,name:t}},Hg=function(e,t,n){return{uiType:gg(),owner:e,name:t,config:n,validated:{}}},Ug=function(e){return re(e,(function(e){return e.fold(B.none,B.some,B.none,B.none).map((function(e){return Io(e.name,e.schema.concat([fu(Ig())]))})).toArray()}))},Wg=function(e){return V(e,Rg)},Vg=function(e,t,n){return jg(e,t,n)},Gg=function(e,t,n){return pg(B.some(e),t,t.components,n)},Kg=function(e,t,n){var r=t.partUids[n];return e.getSystem().getByUid(r).toOptional()},Yg=function(e,t,n){return Kg(e,t,n).getOrDie("Could not find part: "+n)},Xg=function(e,t,n){var r={},i=t.partUids,o=e.getSystem();return G(n,(function(e){r[e]=y(o.getByUid(i[e]))})),r},Qg=function(e,t){var n=e.getSystem();return be(t.partUids,(function(e,t){return y(n.getByUid(e))}))},Jg=function(e){return me(e.partUids)},Zg=function(e,t,n){var r={},i=t.partUids,o=e.getSystem();return G(n,(function(e){r[e]=y(o.getByUid(i[e]).getOrDie())})),r},ev=function(e,t){var n=Wg(t);return ha(V(n,(function(t){return{key:t,value:e+"-"+t}})))},tv=function(e){return So("partUids","partUids",Ei((function(t){return ev(t.uid,e)})),oo())},nv=Object.freeze({__proto__:null,generate:zg,generateOne:Hg,schemas:Ug,names:Wg,substitutes:Vg,components:Gg,defaultUids:ev,defaultUidsSchema:tv,getAllParts:Qg,getAllPartNames:Jg,getPart:Kg,getPartOrDie:Yg,getParts:Xg,getPartsOrDie:Zg}),rv=function(e,t){var n=e.length>0?[Io("parts",e)]:[];return n.concat([Oo("uid"),Ko("dom",{}),Ko("components",[]),fu("originalSpec"),Ko("debug.sketcher",{})]).concat(t)},iv=function(e,t,n,r,i){var o=rv(r,i);return xo(e+" [SpecSchema]",Ji(o.concat(t)),n)},ov=function(e,t,n,r){var i=cv(r),o=iv(e,t,i,[],[]);return n(o,i)},av=function(e,t,n,r,i){var o=cv(i),a=Ug(n),s=tv(n),c=iv(e,t,o,a,[s]),l=Vg(e,c,n),u=Gg(e,c,l.internals());return r(c,u,o,l.externals())},sv=function(e){return Ee(e,"uid")},cv=function(e){return sv(e)?e:O(O({},e),{uid:fc("uid")})},lv=function(e){return void 0!==e.uid},uv=Ji([Oo("name"),Oo("factory"),Oo("configFields"),Ko("apis",{}),Ko("extraApis",{})]),dv=Ji([Oo("name"),Oo("factory"),Oo("configFields"),Oo("partFields"),Ko("apis",{}),Ko("extraApis",{})]),fv=function(e){var t=xo("Sketcher for "+e.name,uv,e),n=function(e){return ov(t.name,t.configFields,t.factory,e)},r=be(t.apis,kc),i=be(t.extraApis,(function(e,t){return bc(e,t)}));return O(O({name:t.name,configFields:t.configFields,sketch:n},r),i)},pv=function(e){var t=xo("Sketcher for "+e.name,dv,e),n=function(e){return av(t.name,t.configFields,t.partFields,t.factory,e)},r=zg(t.name,t.partFields),i=be(t.apis,kc),o=be(t.extraApis,(function(e,t){return bc(e,t)}));return O(O({name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:n,parts:r},i),o)},hv=function(e){return"input"===st(e)&&"radio"!==qn(e,"type")||"textarea"===st(e)},mv=function(e,t,n){return t.find(e)},gv=Object.freeze({__proto__:null,getCurrent:mv}),vv=[Oo("find")],bv=hd({fields:vv,name:"composing",apis:gv}),_v=["input","button","textarea","select"],yv=function(e,t,n){var r=t.disabled()?Tv:Ov;r(e,t)},wv=function(e,t){return!0===t.useNative&&q(_v,st(e.element))},xv=function(e){return Un(e.element,"disabled")},kv=function(e){jn(e.element,"disabled","disabled")},Cv=function(e){Wn(e.element,"disabled")},Av=function(e){return"true"===qn(e.element,"aria-disabled")},Sv=function(e){jn(e.element,"aria-disabled","true")},Ev=function(e){jn(e.element,"aria-disabled","false")},Tv=function(e,t,n){t.disableClass.each((function(t){ol(e.element,t)}));var r=wv(e,t)?kv:Sv;r(e),t.onDisabled(e)},Ov=function(e,t,n){t.disableClass.each((function(t){sl(e.element,t)}));var r=wv(e,t)?Cv:Ev;r(e),t.onEnabled(e)},Rv=function(e,t){return wv(e,t)?xv(e):Av(e)},Dv=function(e,t,n,r){var i=r?Tv:Ov;i(e,t)},Lv=Object.freeze({__proto__:null,enable:Ov,disable:Tv,isDisabled:Rv,onLoad:yv,set:Dv}),Mv=function(e,t){return Rc({classes:t.disabled()?t.disableClass.toArray():[]})},Fv=function(e,t){return Ts([Os(ts(),(function(t,n){return Rv(t,e)})),ad(e,t,yv)])},Nv=Object.freeze({__proto__:null,exhibit:Mv,events:Fv}),Bv=[ea("disabled",S),Ko("useNative",!0),jo("disableClass"),su("onDisabled"),su("onEnabled")],Iv=hd({fields:Bv,name:"disabling",active:Nv,apis:Lv}),Pv=function(e,t,n,r){var i=Yp(e.element,"."+t.highlightClass);G(i,(function(n){H(r,(function(e){return e.element===n}))||(sl(n,t.highlightClass),e.getSystem().getByDom(n).each((function(n){t.onDehighlight(e,n),xs(n,ws())})))}))},$v=function(e,t,n){return Pv(e,t,n,[])},jv=function(e,t,n,r){Vv(e,t,n,r)&&(sl(r.element,t.highlightClass),t.onDehighlight(e,r),xs(r,ws()))},zv=function(e,t,n,r){Pv(e,t,n,[r]),Vv(e,t,n,r)||(ol(r.element,t.highlightClass),t.onHighlight(e,r),xs(r,ys()))},qv=function(e,t,n){Yv(e,t).each((function(r){zv(e,t,n,r)}))},Hv=function(e,t,n){Xv(e,t).each((function(r){zv(e,t,n,r)}))},Uv=function(e,t,n,r){Kv(e,t,n,r).fold((function(e){throw e}),(function(r){zv(e,t,n,r)}))},Wv=function(e,t,n,r){var i=eb(e,t),o=ee(i,r);o.each((function(r){zv(e,t,n,r)}))},Vv=function(e,t,n,r){return cl(r.element,t.highlightClass)},Gv=function(e,t,n){return Pl(e.element,"."+t.highlightClass).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},Kv=function(e,t,n,r){var i=Yp(e.element,"."+t.itemClass);return B.from(i[r]).fold((function(){return ri.error(new Error("No element found with index "+r))}),e.getSystem().getByDom)},Yv=function(e,t,n){return Pl(e.element,"."+t.itemClass).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},Xv=function(e,t,n){var r=Yp(e.element,"."+t.itemClass),i=r.length>0?B.some(r[r.length-1]):B.none();return i.bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},Qv=function(e,t,n,r){var i=Yp(e.element,"."+t.itemClass),o=te(i,(function(e){return cl(e,t.highlightClass)}));return o.bind((function(t){var n=Eu(t,r,0,i.length-1);return e.getSystem().getByDom(i[n]).toOptional()}))},Jv=function(e,t,n){return Qv(e,t,n,-1)},Zv=function(e,t,n){return Qv(e,t,n,1)},eb=function(e,t,n){var r=Yp(e.element,"."+t.itemClass);return De(V(r,(function(t){return e.getSystem().getByDom(t).toOptional()})))},tb=Object.freeze({__proto__:null,dehighlightAll:$v,dehighlight:jv,highlight:zv,highlightFirst:qv,highlightLast:Hv,highlightAt:Uv,highlightBy:Wv,isHighlighted:Vv,getHighlighted:Gv,getFirst:Yv,getLast:Xv,getPrevious:Jv,getNext:Zv,getCandidates:eb}),nb=[Oo("highlightClass"),Oo("itemClass"),su("onHighlight"),su("onDehighlight")],rb=hd({fields:nb,name:"highlighting",apis:tb}),ib=[8],ob=[9],ab=[13],sb=[27],cb=[32],lb=[37],ub=[38],db=[39],fb=[40],pb=function(e,t,n){var r=oe(e.slice(0,t)),i=oe(e.slice(t+1));return ee(r.concat(i),n)},hb=function(e,t,n){var r=oe(e.slice(0,t));return ee(r,n)},mb=function(e,t,n){var r=e.slice(0,t),i=e.slice(t+1);return ee(i.concat(r),n)},gb=function(e,t,n){var r=e.slice(t+1);return ee(r,n)},vb=function(e){return function(t){var n=t.raw;return q(e,n.which)}},bb=function(e){return function(t){return ie(e,(function(e){return e(t)}))}},_b=function(e){var t=e.raw;return!0===t.shiftKey},yb=function(e){var t=e.raw;return!0===t.ctrlKey},wb=C(_b),xb=function(e,t){return{matches:e,classification:t}},kb=function(e,t){var n=ee(e,(function(e){return e.matches(t)}));return n.map((function(e){return e.classification}))},Cb=function(e,t,n){var r=t.exists((function(e){return n.exists((function(t){return ln(t,e)}))}));r||ks(e,gs(),{prevFocus:t,newFocus:n})},Ab=function(){var e=function(e){return Sd(e.element)},t=function(t,n){var r=e(t);t.getSystem().triggerFocus(n,t.element);var i=e(t);Cb(t,r,i)};return{get:e,set:t}},Sb=function(){var e=function(e){return rb.getHighlighted(e).map((function(e){return e.element}))},t=function(t,n){var r=e(t);t.getSystem().getByDom(n).fold(g,(function(e){rb.highlight(t,e)}));var i=e(t);Cb(t,r,i)};return{get:e,set:t}};(function(e){e["OnFocusMode"]="onFocus",e["OnEnterOrSpaceMode"]="onEnterOrSpace",e["OnApiMode"]="onApi"})(Pp||(Pp={}));var Eb=function(e,t,n,r,i){var o=function(){return e.concat([Ko("focusManager",Ab()),Yo("focusInside","onFocus",vo((function(e){return q(["onFocus","onEnterOrSpace","onApi"],e)?ri.value(e):ri.error("Invalid value for focusInside")}))),du("handler",c),du("state",t),du("sendFocusIn",i)])},a=function(e,t,n,r,i){var o=n(e,t,r,i);return kb(o,t.event).bind((function(n){return n(e,t,r,i)}))},s=function(e,t){var o=e.focusInside!==Pp.OnFocusMode?B.none():i(e).map((function(n){return Ls(Qa(),(function(r,i){n(r,e,t),i.stop()}))})),s=function(n,r){var o=vb(cb.concat(ab))(r.event);e.focusInside===Pp.OnEnterOrSpaceMode&&o&&wa(n,r)&&i(e).each((function(i){i(n,e,t),r.stop()}))},c=[Ls(ja(),(function(r,i){a(r,i,n,e,t).fold((function(){s(r,i)}),(function(e){i.stop()}))})),Ls(za(),(function(n,i){a(n,i,r,e,t).each((function(e){i.stop()}))}))];return Ts(o.toArray().concat(c))},c={schema:o,processKey:a,toEvents:s};return c},Tb=function(e){var t=[jo("onEscape"),jo("onEnter"),Ko("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ko("firstTabstop",0),Ko("useTabstopAt",E),jo("visibilitySelector")].concat([e]),n=function(e,t){var n=e.visibilitySelector.bind((function(e){return $l(t,e)})).getOr(t);return ar(n)>0},r=function(e,t){var r=Yp(e.element,t.selector),i=X(r,(function(e){return n(t,e)}));return B.from(i[t.firstTabstop])},i=function(e,t){return t.focusManager.get(e).bind((function(e){return $l(e,t.selector)}))},o=function(e,t){return n(e,t)&&e.useTabstopAt(t)},a=function(e,t,n){r(e,t).each((function(n){t.focusManager.set(e,n)}))},s=function(e,t,n,r,i){return i(t,n,(function(e){return o(r,e)})).fold((function(){return r.cyclic?B.some(!0):B.none()}),(function(t){return r.focusManager.set(e,t),B.some(!0)}))},c=function(e,t,n,r){var o=Yp(e.element,n.selector);return i(e,n).bind((function(t){var i=te(o,k(ln,t));return i.bind((function(t){return s(e,o,t,n,r)}))}))},l=function(e,t,n){var r=n.cyclic?pb:hb;return c(e,t,n,r)},u=function(e,t,n){var r=n.cyclic?mb:gb;return c(e,t,n,r)},d=function(e,t,n){return n.onEnter.bind((function(n){return n(e,t)}))},f=function(e,t,n){return n.onEscape.bind((function(n){return n(e,t)}))},p=y([xb(bb([_b,vb(ob)]),l),xb(vb(ob),u),xb(vb(sb),f),xb(bb([wb,vb(ab)]),d)]),h=y([]);return Eb(t,Cc.init,p,h,(function(){return B.some(a)}))},Ob=Tb(Eo("cyclic",S)),Rb=Tb(Eo("cyclic",E)),Db=function(e,t,n){return As(e,n,ts()),B.some(!0)},Lb=function(e,t,n){var r=hv(n)&&vb(cb)(t.event);return r?B.none():Db(e,t,n)},Mb=function(e,t){return B.some(!0)},Fb=[Ko("execute",Lb),Ko("useSpace",!1),Ko("useEnter",!0),Ko("useControlEnter",!1),Ko("useDown",!1)],Nb=function(e,t,n){return n.execute(e,t,e.element)},Bb=function(e,t,n,r){var i=n.useSpace&&!hv(e.element)?cb:[],o=n.useEnter?ab:[],a=n.useDown?fb:[],s=i.concat(o).concat(a);return[xb(vb(s),Nb)].concat(n.useControlEnter?[xb(bb([yb,vb(ab)]),Nb)]:[])},Ib=function(e,t,n,r){return n.useSpace&&!hv(e.element)?[xb(vb(cb),Mb)]:[]},Pb=Eb(Fb,Cc.init,Bb,Ib,(function(){return B.none()})),$b=function(){var e=rf(),t=function(t,n){e.set({numRows:t,numColumns:n})},n=function(){return e.get().map((function(e){return e.numRows}))},r=function(){return e.get().map((function(e){return e.numColumns}))};return Ac({readState:function(){return e.get().map((function(e){return{numRows:String(e.numRows),numColumns:String(e.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:t,getNumRows:n,getNumColumns:r})},jb=function(e){return e.state(e)},zb=Object.freeze({__proto__:null,flatgrid:$b,init:jb}),qb=function(e){return function(t,n,r,i){var o=e(t.element);return Vb(o,t,n,r,i)}},Hb=function(e,t){var n=Nf(e,t);return qb(n)},Ub=function(e,t){var n=Nf(t,e);return qb(n)},Wb=function(e){return function(t,n,r,i){return Vb(e,t,n,r,i)}},Vb=function(e,t,n,r,i){var o=r.focusManager.get(t).bind((function(n){return e(t.element,n,r,i)}));return o.map((function(e){return r.focusManager.set(t,e),!0}))},Gb=Wb,Kb=Wb,Yb=Wb,Xb=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Qb=function(e){return!Xb(e.dom)},Jb=function(e,t){return te(e,t).map((function(t){return{index:t,candidates:e}}))},Zb=function(e,t,n){var r=function(e){return ln(e,t)},i=Yp(e,n),o=X(i,Qb);return Jb(o,r)},e_=function(e,t){return te(e,(function(e){return ln(t,e)}))},t_=function(e,t,n,r){var i=Math.floor(t/n),o=t%n;return r(i,o).bind((function(t){var r=t.row*n+t.column;return r>=0&&r1?B.some(e.slice(1)):B.none()}))},h=function(e){return Se(n.get(),e)},m=function(e){return g(e).bind(Ww)},g=function(e){return Se(t.get(),e)},v=function(t){return Se(e.get(),t)},b=function(e){var t=i.get();return ae(me(t),e)},_=function(){return r.get().bind(m)},y=function(){return t.get()};return{setMenuBuilt:s,setContents:c,expand:f,refresh:h,collapse:p,lookupMenu:g,lookupItem:v,otherMenus:b,getPrimary:_,getMenus:y,clear:o,isClear:a,getTriggeringPath:d}},Ww=function(e){return"prepared"===e.type?B.some(e.menu):B.none()},Vw={init:Uw,extractPreparedMenu:Ww},Gw=function(e,t){var n,r=rf(),i=function(t,n,r){return be(r,(function(r,i){var o=function(){return jw.sketch(O(O({},r),{value:i,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:e.onHighlight,focusManager:e.fakeFocus?Sb():Ab()}))};return i===n?{type:"prepared",menu:t.getSystem().build(o())}:{type:"notbuilt",nbMenu:o}}))},o=Vw.init(),a=function(t){var n=i(t,e.data.primary,e.data.menus),r=l();return o.setContents(e.data.primary,n,e.data.expansions,r),o.getPrimary()},s=function(e){return eg.getValue(e).value},c=function(e,t,n){return he(t,(function(e){if(!e.getSystem().isConnected())return B.none();var t=rb.getCandidates(e);return ee(t,(function(e){return s(e)===n}))}))},l=function(t){return be(e.data.menus,(function(e,t){return re(e.items,(function(e){return"separator"===e.type?[]:[e.data.value]}))}))},u=function(e,t){rb.highlight(e,t),rb.getHighlighted(t).orThunk((function(){return rb.getFirst(t)})).each((function(t){As(e,t.element,ns())}))},d=function(e,t){return De(V(t,(function(t){return e.lookupMenu(t).bind((function(e){return"prepared"===e.type?B.some(e.menu):B.none()}))})))},f=function(t,n,r){var i=d(n,n.otherMenus(r));G(i,(function(n){ul(n.element,[e.markers.backgroundMenu]),e.stayInDom||$y.remove(t,n)}))},p=function(t){return r.get().getOrThunk((function(){var n={},i=Yp(t.element,"."+e.markers.item),o=X(i,(function(e){return"true"===qn(e,"aria-haspopup")}));return G(o,(function(e){t.getSystem().getByDom(e).each((function(e){var t=s(e);n[t]=e}))})),r.set(n),n}))},h=function(e,t){var n=p(e);ve(n,(function(e,n){var r=q(t,n);jn(e.element,"aria-expanded",r)}))},m=function(t,n,r){return B.from(r[0]).bind((function(i){return n.lookupMenu(i).bind((function(i){if("notbuilt"===i.type)return B.none();var o=i.menu,a=d(n,r.slice(1));return G(a,(function(t){ol(t.element,e.markers.backgroundMenu)})),Bn(o.element)||$y.append(t,Tl(o)),ul(o.element,[e.markers.backgroundMenu]),u(t,o),f(t,n,r),B.some(o)}))}))};(function(e){e[e["HighlightSubmenu"]=0]="HighlightSubmenu",e[e["HighlightParent"]=1]="HighlightParent"})(n||(n={}));var v=function(e,t,n){if("notbuilt"===n.type){var r=e.getSystem().build(n.nbMenu());return o.setMenuBuilt(t,r),r}return n.menu},b=function(t,r,i){if(void 0===i&&(i=n.HighlightSubmenu),r.hasConfigured(Iv)&&Iv.isDisabled(r))return B.some(r);var a=s(r);return o.expand(a).bind((function(a){return h(t,a),B.from(a[0]).bind((function(s){return o.lookupMenu(s).bind((function(c){var l=v(t,s,c);return Bn(l.element)||$y.append(t,Tl(l)),e.onOpenSubmenu(t,r,l,oe(a)),i===n.HighlightSubmenu?(rb.highlightFirst(l),m(t,o,a)):(rb.dehighlightAll(l),B.some(r))}))}))}))},_=function(t,n){var r=s(n);return o.collapse(r).bind((function(r){return h(t,r),m(t,o,r).map((function(r){return e.onCollapseMenu(t,n,r),r}))}))},y=function(e,t){var n=s(t);return o.refresh(n).bind((function(t){return h(e,t),m(e,o,t)}))},w=function(e,t){return hv(t.element)?B.none():b(e,t,n.HighlightSubmenu)},x=function(e,t){return hv(t.element)?B.none():_(e,t)},k=function(t,n){return _(t,n).orThunk((function(){return e.onEscape(t,n).map((function(){return t}))}))},C=function(t){return function(n,r){return $l(r.getSource(),"."+e.markers.item).bind((function(e){return n.getSystem().getByDom(e).toOptional().bind((function(e){return t(n,e).map(E)}))}))}},A=Ts([Ls(Pw(),(function(e,t){var n=t.event.item;o.lookupItem(s(n)).each((function(){var n=t.event.menu;rb.highlight(e,n);var r=s(t.event.item);o.refresh(r).each((function(t){return f(e,o,t)}))}))})),Ws((function(t,r){var i=r.event.target;t.getSystem().getByDom(i).each((function(r){var i=s(r);0===i.indexOf("collapse-item")&&_(t,r),b(t,r,n.HighlightSubmenu).fold((function(){e.onExecute(t,r)}),g)}))})),qs((function(t,n){a(t).each((function(n){$y.append(t,Tl(n)),e.onOpenMenu(t,n),e.highlightImmediately&&u(t,n)}))}))].concat(e.navigateOnHover?[Ls(xw(),(function(t,r){var i=r.event.item;y(t,i),b(t,i,n.HighlightParent),e.onHover(t,i)}))]:[])),S=function(e){return rb.getHighlighted(e).bind(rb.getHighlighted)},T=function(e){S(e).each((function(t){_(e,t)}))},R=function(e){o.getPrimary().each((function(t){u(e,t)}))},D=function(e){return B.from(e.components()[0]).filter((function(e){return"menu"===qn(e.element,"role")}))},L=function(t){var n=o.getPrimary().bind((function(e){return S(t).bind((function(e){var n=s(e),r=Ae(o.getMenus()),i=De(V(r,Vw.extractPreparedMenu));return o.getTriggeringPath(n,(function(e){return c(t,i,e)}))})).map((function(t){return{primary:e,triggeringPath:t}}))}));n.fold((function(){D(t).each((function(n){e.onRepositionMenu(t,n,[])}))}),(function(n){var r=n.primary,i=n.triggeringPath;e.onRepositionMenu(t,r,i)}))},M={collapseMenu:T,highlightPrimary:R,repositionMenus:L};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:rg(e.tmenuBehaviours,[Oy.config({mode:"special",onRight:C(w),onLeft:C(x),onEscape:C(k),focusIn:function(e,t){o.getPrimary().each((function(t){As(e,t.element,ns())}))}}),rb.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),bv.config({find:function(e){return rb.getHighlighted(e)}}),$y.config({})]),eventOrder:e.eventOrder,apis:M,events:A}},Kw=y("collapse-item"),Yw=function(e,t,n){return{primary:e,menus:t,expansions:n}},Xw=function(e,t){return{primary:e,menus:pa(e,t),expansions:{}}},Qw=function(e){return{value:ic(Kw()),meta:{text:e}}},Jw=fv({name:"TieredMenu",configFields:[uu("onExecute"),uu("onEscape"),lu("onOpenMenu"),lu("onOpenSubmenu"),su("onRepositionMenu"),su("onCollapseMenu"),Ko("highlightImmediately",!0),Io("data",[Oo("primary"),Oo("menus"),Oo("expansions")]),Ko("fakeFocus",!1),su("onHighlight"),su("onHover"),iu(),Oo("dom"),Ko("navigateOnHover",!0),Ko("stayInDom",!1),tg("tmenuBehaviours",[Oy,rb,bv,$y]),Ko("eventOrder",{})],apis:{collapseMenu:function(e,t){e.collapseMenu(t)},highlightPrimary:function(e,t){e.highlightPrimary(t)},repositionMenus:function(e,t){e.repositionMenus(t)}},factory:Gw,extraApis:{tieredData:Yw,singleData:Xw,collapseItem:Qw}}),Zw=function(e,t,n,r,i){var o=function(){return e.lazySink(t)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Zu()},onRtl:function(){return ed()}}}:{},s=function(e){return 2===e.length},c=function(e){return s(e)?a:{}};return Jw.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return bm.close(t),e.onEscape.map((function(e){return e(t)})),B.some(!0)},onExecute:function(){return B.some(!0)},onOpenMenu:function(e,t){Ph.positionWithinBounds(o().getOrDie(),t,n,i())},onOpenSubmenu:function(e,t,n,r){var i=o().getOrDie();Ph.position(i,n,{anchor:O({type:"submenu",item:t},c(r))})},onRepositionMenu:function(e,t,r){var a=o().getOrDie();Ph.positionWithinBounds(a,t,n,i()),G(r,(function(e){var t=c(e.triggeringPath);Ph.position(a,e.triggeredMenu,{anchor:O({type:"submenu",item:e.triggeringItem},t)})}))}})},ex=function(e,t){var n=function(t,n){var r=e.getRelated(t);return r.exists((function(e){return Hl(e,n)}))},r=function(e,t){bm.setContent(e,t)},i=function(e,t,n){o(e,t,n,B.none())},o=function(e,t,n,r){a(e,t,n,(function(){return r.map((function(e){return Qr(e)}))}))},a=function(t,n,r,i){var o=e.lazySink(t).getOrDie();bm.openWhileCloaked(t,n,(function(){return Ph.positionWithinBounds(o,t,r,i())})),eg.setValue(t,B.some({mode:"position",config:r,getBounds:i}))},s=function(e,t,n){c(e,t,n,B.none)},c=function(t,n,r,i){var o=Zw(e,t,n,r,i);bm.open(t,o),eg.setValue(t,B.some({mode:"menu",menu:o}))},l=function(e){bm.isOpen(e)&&(eg.setValue(e,B.none()),bm.close(e))},u=function(e){return bm.getState(e)},d=function(t){bm.isOpen(t)&&eg.getValue(t).each((function(n){switch(n.mode){case"menu":bm.getState(t).each(Jw.repositionMenus);break;case"position":var r=e.lazySink(t).getOrDie();Ph.positionWithinBounds(r,t,n.config,n.getBounds());break}}))},f={setContent:r,showAt:i,showWithin:o,showWithinBounds:a,showMenuAt:s,showMenuWithinBounds:c,hide:l,getContent:u,reposition:d,isOpen:bm.isOpen};return{uid:e.uid,dom:e.dom,behaviours:rg(e.inlineBehaviours,[bm.config({isPartOf:function(e,t,r){return Hl(t,r)||n(e,r)},getAttachPoint:function(t){return e.lazySink(t).getOrDie()},onOpen:function(t){e.onShow(t)},onClose:function(t){e.onHide(t)}}),eg.config({store:{mode:"memory",initialValue:B.none()}}),bd.config({channels:O(O({},km(O({isExtraPart:t.isExtraPart},e.fireDismissalEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})))),Am(O(O({},e.fireRepositionEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})),{doReposition:d})))})]),eventOrder:e.eventOrder,apis:f}},tx=fv({name:"InlineView",configFields:[Oo("lazySink"),su("onShow"),su("onHide"),Uo("onEscape"),tg("inlineBehaviours",[bm,eg,bd]),Vo("fireDismissalEventInstead",[Ko("event",hs())]),Vo("fireRepositionEventInstead",[Ko("event",ms())]),Ko("getRelated",B.none),Ko("isExtraPart",S),Ko("eventOrder",B.none)],factory:ex,apis:{showAt:function(e,t,n,r){e.showAt(t,n,r)},showWithin:function(e,t,n,r,i){e.showWithin(t,n,r,i)},showWithinBounds:function(e,t,n,r,i){e.showWithinBounds(t,n,r,i)},showMenuAt:function(e,t,n,r){e.showMenuAt(t,n,r)},showMenuWithinBounds:function(e,t,n,r,i){e.showMenuWithinBounds(t,n,r,i)},hide:function(e,t){e.hide(t)},isOpen:function(e,t){return e.isOpen(t)},getContent:function(e,t){return e.getContent(t)},setContent:function(e,t,n){e.setContent(t,n)},reposition:function(e,t){e.reposition(t)}}}),nx="layout-inset",rx=function(e){return e.x},ix=function(e,t){return e.x+e.width/2-t.width/2},ox=function(e,t){return e.x+e.width-t.width},ax=function(e){return e.y},sx=function(e,t){return e.y+e.height-t.height},cx=function(e,t){return e.y+e.height/2-t.height/2},lx=function(e,t,n){return hu(ox(e,t),sx(e,t),n.insetSouthwest(),xu(),"southwest",Ru(e,{right:0,bottom:3}),nx)},ux=function(e,t,n){return hu(rx(e),sx(e,t),n.insetSoutheast(),wu(),"southeast",Ru(e,{left:1,bottom:3}),nx)},dx=function(e,t,n){return hu(ox(e,t),ax(e),n.insetNorthwest(),yu(),"northwest",Ru(e,{right:0,top:2}),nx)},fx=function(e,t,n){return hu(rx(e),ax(e),n.insetNortheast(),_u(),"northeast",Ru(e,{left:1,top:2}),nx)},px=function(e,t,n){return hu(ix(e,t),ax(e),n.insetNorth(),ku(),"north",Ru(e,{top:2}),nx)},hx=function(e,t,n){return hu(ix(e,t),sx(e,t),n.insetSouth(),Cu(),"south",Ru(e,{bottom:3}),nx)},mx=function(e,t,n){return hu(ox(e,t),cx(e,t),n.insetEast(),Su(),"east",Ru(e,{right:0}),nx)},gx=function(e,t,n){return hu(rx(e),cx(e,t),n.insetWest(),Au(),"west",Ru(e,{left:1}),nx)},vx=function(e){switch(e){case"north":return px;case"northeast":return fx;case"northwest":return dx;case"south":return hx;case"southeast":return ux;case"southwest":return lx;case"east":return mx;case"west":return gx}},bx=function(e,t,n,r,i){var o=Wd(r).map(vx).getOr(px);return o(e,t,n,r,i)},_x=function(e){switch(e){case"north":return hx;case"northeast":return ux;case"northwest":return lx;case"south":return px;case"southeast":return fx;case"southwest":return dx;case"east":return gx;case"west":return mx}},yx=function(e,t,n,r,i){var o=Wd(r).map(_x).getOr(px);return o(e,t,n,r,i)},wx=tinymce.util.Tools.resolve("tinymce.util.Delay"),xx=function(e){var t=vw(e.action),n=e.dom.tag,r=function(t){return Se(e.dom,"attributes").bind((function(e){return Se(e,t)}))},i=function(){if("button"===n){var e=r("type").getOr("button"),t=r("role").map((function(e){return{role:e}})).getOr({});return O({type:e},t)}var i=r("role").getOr("button");return{role:i}};return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:ig.augment(e.buttonBehaviours,[Xy.config({}),Oy.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:i()},eventOrder:e.eventOrder}},kx=fv({name:"Button",factory:xx,configFields:[Ko("uid",void 0),Oo("dom"),Ko("components",[]),ig.field("buttonBehaviours",[Xy,Oy]),jo("action"),jo("role"),Ko("eventOrder",{})]}),Cx=function(e){var t=void 0!==e.dom.attributes?e.dom.attributes:[];return J(t,(function(e,t){var n;return"class"===t.name?e:O(O({},e),(n={},n[t.name]=t.value,n))}),{})},Ax=function(e){return Array.prototype.slice.call(e.dom.classList,0)},Sx=function(e){var t=tt.fromHtml(e),n=wn(t),r=Cx(t),i=Ax(t),o=0===n.length?{}:{innerHtml:Gs(t)};return O({tag:st(t),classes:i,attributes:r},o)},Ex=function(e){var t=lv(e)&&Te(e,"uid")?e.uid:fc("memento"),n=function(e){return e.getSystem().getByUid(t).getOrDie()},r=function(e){return e.getSystem().getByUid(t).toOptional()},i=function(){return O(O({},e),{uid:t})};return{get:n,getOpt:r,asSpec:i}};function Tx(e){return Tx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tx(e)}function Ox(e,t){return Ox=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ox(e,t)}function Rx(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Dx(e,t,n){return Dx=Rx()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),o=new i;return n&&Ox(o,n.prototype),o},Dx.apply(null,arguments)}function Lx(e){return Mx(e)||Fx(e)||Nx(e)||Ix()}function Mx(e){if(Array.isArray(e))return Bx(e)}function Fx(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Nx(e,t){if(e){if("string"===typeof e)return Bx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bx(e,t):void 0}}function Bx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i/gm),kk=Ux(/^data-[\-\w.\u00B7-\uFFFF]/),Ck=Ux(/^aria-[\-\w]+$/),Ak=Ux(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Sk=Ux(/^(?:\w+script|data):/i),Ek=Ux(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Tk=Ux(/^html$/i),Ok=function(){return"undefined"===typeof window?null:window},Rk=function(e,t){if("object"!==Tx(e)||"function"!==typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(o){return null}};function Dk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ok(),t=function(e){return Dk(e)};if(t.version="2.3.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,a=e.Node,s=e.Element,c=e.NodeFilter,l=e.NamedNodeMap,u=void 0===l?e.NamedNodeMap||e.MozNamedAttrMap:l,d=e.HTMLFormElement,f=e.DOMParser,p=e.trustedTypes,h=s.prototype,m=lk(h,"cloneNode"),g=lk(h,"nextSibling"),v=lk(h,"childNodes"),b=lk(h,"parentNode");if("function"===typeof o){var _=r.createElement("template");_.content&&_.content.ownerDocument&&(r=_.content.ownerDocument)}var y=Rk(p,n),w=y?y.createHTML(""):"",x=r,k=x.implementation,C=x.createNodeIterator,A=x.createDocumentFragment,S=x.getElementsByTagName,E=n.importNode,T={};try{T=ck(r).documentMode?r.documentMode:{}}catch(ze){}var O={};t.isSupported="function"===typeof b&&k&&"undefined"!==typeof k.createHTMLDocument&&9!==T;var R,D,L=wk,M=xk,F=kk,N=Ck,B=Sk,I=Ek,P=Ak,$=null,j=sk({},[].concat(Lx(uk),Lx(dk),Lx(fk),Lx(hk),Lx(gk))),z=null,q=sk({},[].concat(Lx(vk),Lx(bk),Lx(_k),Lx(yk))),H=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,W=null,V=!0,G=!0,K=!1,Y=!1,X=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ne=!0,re=!0,ie=!1,oe={},ae=null,se=sk({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ce=null,le=sk({},["audio","video","img","source","image","track"]),ue=null,de=sk({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",me=he,ge=!1,ve=["application/xhtml+xml","text/html"],be="text/html",_e=null,ye=r.createElement("form"),we=function(e){return e instanceof RegExp||e instanceof Function},xe=function(e){_e&&_e===e||(e&&"object"===Tx(e)||(e={}),e=ck(e),$="ALLOWED_TAGS"in e?sk({},e.ALLOWED_TAGS):j,z="ALLOWED_ATTR"in e?sk({},e.ALLOWED_ATTR):q,ue="ADD_URI_SAFE_ATTR"in e?sk(ck(de),e.ADD_URI_SAFE_ATTR):de,ce="ADD_DATA_URI_TAGS"in e?sk(ck(le),e.ADD_DATA_URI_TAGS):le,ae="FORBID_CONTENTS"in e?sk({},e.FORBID_CONTENTS):se,U="FORBID_TAGS"in e?sk({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?sk({},e.FORBID_ATTR):{},oe="USE_PROFILES"in e&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,ee=e.RETURN_DOM_FRAGMENT||!1,te=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||P,me=e.NAMESPACE||he,e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),R=R=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?be:e.PARSER_MEDIA_TYPE,D="application/xhtml+xml"===R?function(e){return e}:Jx,Y&&(G=!1),ee&&(Z=!0),oe&&($=sk({},Lx(gk)),z=[],!0===oe.html&&(sk($,uk),sk(z,vk)),!0===oe.svg&&(sk($,dk),sk(z,bk),sk(z,yk)),!0===oe.svgFilters&&(sk($,fk),sk(z,bk),sk(z,yk)),!0===oe.mathMl&&(sk($,hk),sk(z,_k),sk(z,yk))),e.ADD_TAGS&&($===j&&($=ck($)),sk($,e.ADD_TAGS)),e.ADD_ATTR&&(z===q&&(z=ck(z)),sk(z,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&sk(ue,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ae===se&&(ae=ck(ae)),sk(ae,e.FORBID_CONTENTS)),re&&($["#text"]=!0),X&&sk($,["html","head","body"]),$.table&&(sk($,["tbody"]),delete U.tbody),Hx&&Hx(e),_e=e)},ke=sk({},["mi","mo","mn","ms","mtext"]),Ce=sk({},["foreignobject","desc","title","annotation-xml"]),Ae=sk({},["title","style","font","a","script"]),Se=sk({},dk);sk(Se,fk),sk(Se,pk);var Ee=sk({},hk);sk(Ee,mk);var Te=function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var n=Jx(e.tagName),r=Jx(t.tagName);return e.namespaceURI===pe?t.namespaceURI===he?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===r||ke[r]):Boolean(Se[n]):e.namespaceURI===fe?t.namespaceURI===he?"math"===n:t.namespaceURI===pe?"math"===n&&Ce[r]:Boolean(Ee[n]):e.namespaceURI===he&&(!(t.namespaceURI===pe&&!Ce[r])&&(!(t.namespaceURI===fe&&!ke[r])&&(!Ee[n]&&(Ae[n]||!Se[n]))))},Oe=function(e){Qx(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(ze){try{e.outerHTML=w}catch(ze){e.remove()}}},Re=function(e,n){try{Qx(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(ze){Qx(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!z[e])if(Z||ee)try{Oe(n)}catch(ze){}else try{n.setAttribute(e,"")}catch(ze){}},De=function(e){var t,n;if(J)e=""+e;else{var i=Zx(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===R&&(e=''+e+"");var o=y?y.createHTML(e):e;if(me===he)try{t=(new f).parseFromString(o,R)}catch(ze){}if(!t||!t.documentElement){t=k.createDocument(me,"template",null);try{t.documentElement.innerHTML=ge?"":o}catch(ze){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),me===he?S.call(t,X?"html":"body")[0]:X?t.documentElement:a},Le=function(e){return C.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Me=function(e){return e instanceof d&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof u)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore)},Fe=function(e){return"object"===Tx(a)?e instanceof a:e&&"object"===Tx(e)&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},Ne=function(e,n,r){O[e]&&Yx(O[e],(function(e){e.call(t,n,r,_e)}))},Be=function(e){var n;if(Ne("beforeSanitizeElements",e,null),Me(e))return Oe(e),!0;if(rk(/[\u0080-\uFFFF]/,e.nodeName))return Oe(e),!0;var r=D(e.nodeName);if(Ne("uponSanitizeElement",e,{tagName:r,allowedTags:$}),e.hasChildNodes()&&!Fe(e.firstElementChild)&&(!Fe(e.content)||!Fe(e.content.firstElementChild))&&rk(/<[/\w]/g,e.innerHTML)&&rk(/<[/\w]/g,e.textContent))return Oe(e),!0;if("select"===r&&rk(/