UNPKG

511 kBJavaScriptView Raw
1!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=99)}([function(t,e,n){"use strict";function r(t){return t&&0===t.length}function i(t){return null==t?[]:Object.keys(t)}function o(t){for(var e=[],n=Object.keys(t),r=0;r<n.length;r++)e.push(t[n[r]]);return e}function s(t,e){for(var n=[],r=i(t),o=0;o<r.length;o++){var s=r[o];n.push(e.call(null,t[s],s))}return n}function a(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e.call(null,t[r],r));return n}function c(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Array.isArray(r)?e=e.concat(c(r)):e.push(r)}return e}function l(t){return r(t)?void 0:t[0]}function u(t){var e=t&&t.length;return e?t[e-1]:void 0}function p(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e.call(null,t[n],n);else{if(!I(t))throw Error("non exhaustive match");var r=i(t);for(n=0;n<r.length;n++){var o=r[n],s=t[o];e.call(null,s,o)}}}function h(t){return"string"==typeof t}function d(t){return void 0===t}function f(t){return t instanceof Function}function _(t,e){return void 0===e&&(e=1),t.slice(e,t.length)}function m(t,e){return void 0===e&&(e=1),t.slice(0,t.length-e)}function g(t,e){var n=[];if(Array.isArray(t))for(var r=0;r<t.length;r++){var i=t[r];e.call(null,i)&&n.push(i)}return n}function v(t,e){return g(t,(function(t){return!e(t)}))}function y(t,e){for(var n=Object.keys(t),r={},i=0;i<n.length;i++){var o=n[i],s=t[o];e(s)&&(r[o]=s)}return r}function b(t,e){return!!I(t)&&t.hasOwnProperty(e)}function w(t,e){return void 0!==x(t,(function(t){return t===e}))}function E(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e}function O(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function x(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(e.call(null,r))return r}}function T(t,e){for(var n=[],r=0;r<t.length;r++){var i=t[r];e.call(null,i)&&n.push(i)}return n}function A(t,e,n){for(var r=Array.isArray(t),s=r?t:o(t),a=r?[]:i(t),c=n,l=0;l<s.length;l++)c=e.call(null,c,s[l],r?l:a[l]);return c}function S(t){return v(t,(function(t){return null==t}))}function N(t,e){void 0===e&&(e=function(t){return t});var n=[];return A(t,(function(t,r){var i=e(r);return w(n,i)?t:(n.push(i),t.concat(r))}),[])}function C(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=[null].concat(e);return Function.bind.apply(t,r)}function k(t){return Array.isArray(t)}function L(t){return t instanceof RegExp}function I(t){return t instanceof Object}function R(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n))return!1;return!0}function j(t,e){return v(t,(function(t){return w(e,t)}))}function P(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}function M(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}function D(t,e){var n=E(t);return n.sort((function(t,n){return e(t)-e(n)})),n}function U(t,e){if(t.length!==e.length)throw Error("can't zipObject with different number of keys and values!");for(var n={},r=0;r<t.length;r++)n[t[r]]=e[r];return n}function F(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++)for(var o=e[r],s=i(o),a=0;a<s.length;a++){var c=s[a];t[c]=o[c]}return t}function B(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];if(!d(o))for(var s=i(o),a=0;a<s.length;a++){var c=s[a];b(t,c)||(t[c]=o[c])}}return t}function z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return B.apply(null,[{}].concat(t))}function H(t,e){var n={};return p(t,(function(t){var r=e(t),i=n[r];i?i.push(t):n[r]=[t]})),n}function q(t,e){for(var n=O(t),r=i(e),o=0;o<r.length;o++){var s=r[o],a=e[s];n[s]=a}return n}function W(){}function V(t){return t}function $(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(void 0!==r?r:void 0)}return e}function G(t){console&&console.error&&console.error("Error: "+t)}function K(t){console&&console.warn&&console.warn("Warning: "+t)}function Y(){return"function"==typeof Map}function X(t,e){e.forEach((function(e){var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(t.prototype,r,i):t.prototype[r]=e.prototype[r]}}))}))}function J(t){function e(){}e.prototype=t;var n=new e;function r(){return typeof n.bar}return r(),r(),t}function Z(t){return t[t.length-1]}function Q(t){var e=(new Date).getTime(),n=t();return{time:(new Date).getTime()-e,value:n}}n.d(e,"A",(function(){return r})),n.d(e,"G",(function(){return i})),n.d(e,"U",(function(){return o})),n.d(e,"J",(function(){return s})),n.d(e,"I",(function(){return a})),n.d(e,"t",(function(){return c})),n.d(e,"s",(function(){return l})),n.d(e,"H",(function(){return u})),n.d(e,"u",(function(){return p})),n.d(e,"E",(function(){return h})),n.d(e,"F",(function(){return d})),n.d(e,"B",(function(){return f})),n.d(e,"m",(function(){return _})),n.d(e,"n",(function(){return m})),n.d(e,"p",(function(){return g})),n.d(e,"P",(function(){return v})),n.d(e,"N",(function(){return y})),n.d(e,"w",(function(){return b})),n.d(e,"j",(function(){return w})),n.d(e,"g",(function(){return E})),n.d(e,"h",(function(){return O})),n.d(e,"q",(function(){return x})),n.d(e,"r",(function(){return T})),n.d(e,"O",(function(){return A})),n.d(e,"i",(function(){return S})),n.d(e,"T",(function(){return N})),n.d(e,"y",(function(){return k})),n.d(e,"D",(function(){return L})),n.d(e,"C",(function(){return I})),n.d(e,"o",(function(){return R})),n.d(e,"l",(function(){return j})),n.d(e,"Q",(function(){return P})),n.d(e,"x",(function(){return M})),n.d(e,"f",(function(){return F})),n.d(e,"k",(function(){return z})),n.d(e,"v",(function(){return H})),n.d(e,"K",(function(){return q})),n.d(e,"b",(function(){return W})),n.d(e,"a",(function(){return V})),n.d(e,"L",(function(){return $})),n.d(e,"c",(function(){return G})),n.d(e,"d",(function(){return K})),n.d(e,"z",(function(){return Y})),n.d(e,"e",(function(){return X})),n.d(e,"S",(function(){return J})),n.d(e,"M",(function(){return Z})),n.d(e,"R",(function(){return Q}))},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(20))},function(t,e,n){var r=n(1),i=n(65),o=n(3),s=n(50),a=n(69),c=n(101),l=i("wks"),u=r.Symbol,p=c?u:u&&u.withoutSetter||s;t.exports=function(t){return o(l,t)||(a&&o(u,t)?l[t]=u[t]:l[t]=p("Symbol."+t)),l[t]}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(6),i=n(8),o=n(21);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(4);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},,function(t,e,n){var r=n(6),i=n(67),o=n(10),s=n(33),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(o(t),e=s(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(9);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(81),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(15),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(1),i=n(100),o=n(63),s=n(5),a=n(2),c=a("iterator"),l=a("toStringTag"),u=o.values;for(var p in i){var h=r[p],d=h&&h.prototype;if(d){if(d[c]!==u)try{s(d,c,u)}catch(t){d[c]=u}if(d[l]||s(d,l,p),i[p])for(var f in o)if(d[f]!==o[f])try{s(d,f,o[f])}catch(t){d[f]=o[f]}}}},function(t,e,n){var r,i,o;"undefined"!=typeof self&&self,i=[],void 0===(o="function"==typeof(r=function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx},t.prototype.pattern=function(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");var e=this.disjunction();this.consumeChar("/");for(var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":a(n,"global");break;case"i":a(n,"ignoreCase");break;case"m":a(n,"multiLine");break;case"u":a(n,"unicode");break;case"y":a(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:e}},t.prototype.disjunction=function(){var t=[];for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t}},t.prototype.alternative=function(){for(var t=[];this.isTerm();)t.push(this.term());return{type:"Alternative",value:t}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}c(t);var e=this.disjunction();return this.consumeChar(")"),{type:t,value:e}}!function(){throw Error("Internal Error - Should never get here!")}()},t.prototype.quantifier=function(t){var e;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;c(e)}if(!0!==t||void 0!==e)return c(e),"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e},t.prototype.atom=function(){var t;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),c(t),this.isQuantifier()&&(t.quantifier=this.quantifier()),t},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[o("\n"),o("\r"),o("\u2028"),o("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},t.prototype.characterClassEscape=function(){var t,e=!1;switch(this.popChar()){case"d":t=l;break;case"D":t=l,e=!0;break;case"s":t=p;break;case"S":t=p,e=!0;break;case"w":t=u;break;case"W":t=u,e=!0}return c(t),{type:"Set",value:t,complement:e}},t.prototype.controlEscapeAtom=function(){var t;switch(this.popChar()){case"f":t=o("\f");break;case"n":t=o("\n");break;case"r":t=o("\r");break;case"t":t=o("\t");break;case"v":t=o("\v")}return c(t),{type:"Character",value:t}},t.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}},t.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:o("\0")}},t.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},t.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},t.prototype.identityEscapeAtom=function(){return{type:"Character",value:o(this.popChar())}},t.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:o(this.popChar())}}},t.prototype.characterClass=function(){var t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var n=this.classAtom();if("Character"===n.type&&this.isRangeDash()){this.consumeChar("-");var r=this.classAtom();if("Character"===r.type){if(r.value<n.value)throw Error("Range out of order in character class");t.push({from:n.value,to:r.value})}else s(n.value,t),t.push(o("-")),s(r.value,t)}else s(n.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}},t.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},t.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:o("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.group=function(){var t=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),t=!1;break;default:this.groupIdx++}var e=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:t,value:e};return t&&(n.idx=this.groupIdx),n},t.prototype.positiveInteger=function(){var t=this.popChar();if(!1===i.test(t))throw Error("Expecting a positive integer");for(;r.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)},t.prototype.integerIncludingZero=function(){var t=this.popChar();if(!1===r.test(t))throw Error("Expecting an integer");for(;r.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)},t.prototype.patternCharacter=function(){var t=this.popChar();switch(t){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:o(t)}}},t.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},t.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},t.prototype.isDigit=function(){return r.test(this.peekChar(0))},t.prototype.isClassAtom=function(t){switch(void 0===t&&(t=0),this.peekChar(t)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},t.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},t.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},t.prototype.isQuantifier=function(){var t=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(t)}},t.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.parseHexDigits=function(t){for(var e="",r=0;r<t;r++){var i=this.popChar();if(!1===n.test(i))throw Error("Expecting a HexDecimal digits");e+=i}return{type:"Character",value:parseInt(e,16)}},t.prototype.peekChar=function(t){return void 0===t&&(t=0),this.input[this.idx+t]},t.prototype.popChar=function(){var t=this.peekChar(0);return this.consumeChar(),t},t.prototype.consumeChar=function(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var e,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function o(t){return t.charCodeAt(0)}function s(t,e){void 0!==t.length?t.forEach((function(t){e.push(t)})):e.push(t)}function a(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function c(t){if(void 0===t)throw Error("Internal Error - Should never get here!")}var l=[];for(e=o("0");e<=o("9");e++)l.push(e);var u=[o("_")].concat(l);for(e=o("a");e<=o("z");e++)u.push(e);for(e=o("A");e<=o("Z");e++)u.push(e);var p=[o(" "),o("\f"),o("\n"),o("\r"),o("\t"),o("\v"),o("\t"),o("\xa0"),o("\u1680"),o("\u2000"),o("\u2001"),o("\u2002"),o("\u2003"),o("\u2004"),o("\u2005"),o("\u2006"),o("\u2007"),o("\u2008"),o("\u2009"),o("\u200a"),o("\u2028"),o("\u2029"),o("\u202f"),o("\u205f"),o("\u3000"),o("\ufeff")];function h(){}return h.prototype.visitChildren=function(t){for(var e in t){var n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(t){this.visit(t)}),this))}},h.prototype.visit=function(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)},h.prototype.visitPattern=function(t){},h.prototype.visitFlags=function(t){},h.prototype.visitDisjunction=function(t){},h.prototype.visitAlternative=function(t){},h.prototype.visitStartAnchor=function(t){},h.prototype.visitEndAnchor=function(t){},h.prototype.visitWordBoundary=function(t){},h.prototype.visitNonWordBoundary=function(t){},h.prototype.visitLookahead=function(t){},h.prototype.visitNegativeLookahead=function(t){},h.prototype.visitCharacter=function(t){},h.prototype.visitSet=function(t){},h.prototype.visitGroup=function(t){},h.prototype.visitGroupBackReference=function(t){},h.prototype.visitQuantifier=function(t){},{RegExpParser:t,BaseRegExpVisitor:h,VERSION:"0.4.0"}})?r.apply(e,i):r)||(t.exports=o)},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r,i,o,s=n(105),a=n(1),c=n(9),l=n(5),u=n(3),p=n(53),h=n(51),d=a.WeakMap;if(s){var f=new d,_=f.get,m=f.has,g=f.set;r=function(t,e){return g.call(f,t,e),e},i=function(t){return _.call(f,t)||{}},o=function(t){return m.call(f,t)}}else{var v=p("state");h[v]=!0,r=function(t,e){return l(t,v,e),e},i=function(t){return u(t,v)?t[v]:{}},o=function(t){return u(t,v)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(1),i=n(5),o=n(3),s=n(49),a=n(74),c=n(16),l=c.get,u=c.enforce,p=String(String).split("String");(t.exports=function(t,e,n,a){var c=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),u(n).source=p.join("string"==typeof e?e:"")),t!==r?(c?!h&&t[e]&&(l=!0):delete t[e],l?t[e]=n:i(t,e,n)):l?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},function(t,e,n){var r=n(31);t.exports=function(t){return Object(r(t))}},function(t,e,n){(function(e){n(13);const r=n(111).default,i=n(112).default;function o(t){return t&&"object"==typeof t&&!Array.isArray(t)}function s(t,...e){if(!e.length)return t;const n=e.shift();if(o(t)&&o(n))for(const e in n)o(n[e])?(t[e]||Object.assign(t,{[e]:{}}),s(t[e],n[e])):Object.assign(t,{[e]:n[e]});return s(t,...e)}t.exports.get_types=function(){return Object.keys(t.exports.get_config().types)},t.exports.get_type_config=function(e){const n={};if(t.exports.get_config().types[e]&&Object.assign(n,t.exports.get_config().types[e]),n.type){const e=t.exports.get_type_config(n.type);return Object.assign(e,n),e}return n},e.__PERSPECTIVE_CONFIG__=void 0,t.exports.override_config=function(t){e.__PERSPECTIVE_CONFIG__&&console.warn("Config already initialized!"),e.__PERSPECTIVE_CONFIG__=s(r,t)},t.exports.get_config=function(){return e.__PERSPECTIVE_CONFIG__||(e.__PERSPECTIVE_CONFIG__=s(r,"undefined"==typeof window?i():{types:{float:{filter_operator:"==",aggregate:"sum",format:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},string:{filter_operator:"==",aggregate:"count"},integer:{filter_operator:"==",aggregate:"sum",format:{}},boolean:{filter_operator:"==",aggregate:"count"},datetime:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric"},null_value:-1}}}||{})),e.__PERSPECTIVE_CONFIG__}}).call(this,n(20))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(143),i=n(146);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){t.exports={}},function(t,e,n){var r=n(1),i=n(54).f,o=n(5),s=n(17),a=n(49),c=n(106),l=n(108);t.exports=function(t,e){var n,u,p,h,d,f=t.target,_=t.global,m=t.stat;if(n=_?r:m?r[f]||a(f,{}):(r[f]||{}).prototype)for(u in e){if(h=e[u],p=t.noTargetGet?(d=i(n,u))&&d.value:n[u],!l(_?u:f+(m?".":"#")+u,t.forced)&&void 0!==p){if(typeof h==typeof p)continue;c(h,p)}(t.sham||p&&p.sham)&&o(h,"sham",!0),s(n,u,h,t)}}},function(t,e,n){var r=n(8).f,i=n(3),o=n(2)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(10),i=n(110);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var r=n(59),i=n(126),o=n(127),s="[object Null]",a="[object Undefined]",c=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:c&&c in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(48),i=n(31);t.exports=function(t){return r(i(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e,n){var r=n(9);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r,i=n(10),o=n(70),s=n(52),a=n(51),c=n(103),l=n(68),u=n(53),p=u("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;f=r?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=l("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F);for(var n=s.length;n--;)delete f.prototype[s[n]];return f()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=i(t),n=new h,h.prototype=null,n[p]=t):n=f(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(104),i=n(1),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},function(t,e,n){var r=n(3),i=n(18),o=n(53),s=n(109),a=o("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(133),i=n(134),o=n(135),s=n(136),a=n(137);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var r=n(82);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(22)(Object,"create");t.exports=r},function(t,e,n){var r=n(155);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(199),i=n(30),o=n(2)("toStringTag"),s="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:s?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){var r=n(42),i=n(23),o=n(2)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(206);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";n(13),n(56);const r=new WeakMap;let i=0;function o(t,e){return function(){let n,i=()=>{},o=Array.prototype.slice.call(arguments,0,arguments.length);for(let t=o.length-1;t>=0;t--)"function"==typeof o[t]&&(n=o.splice(t,1)[0]);const s=r.get(n);r.delete(n);let a={cmd:e||"view_method",name:this._name,method:t,args:o,subscribe:!0,callback_id:s};this._worker.post(a,n,i),this._worker.unsubscribe(e,n)}}function s(t,e){return function(){let n,o=()=>{},s=Array.prototype.slice.call(arguments,0,arguments.length);for(let t=s.length-1;t>=0;t--)"function"==typeof s[t]&&(n=s.splice(t,1)[0]);i++,r.set(n,i);let a={cmd:e||"view_method",name:this._name,method:t,args:s,subscribe:!0,callback_id:i};this._worker.post(a,n,o,!0)}}function a(t,e){return function(){var n=Array.prototype.slice.call(arguments,0,arguments.length);return new Promise(function(r,i){var o={cmd:e||"view_method",name:this._name,method:t,args:n,subscribe:!1};this._worker.post(o,r,i)}.bind(this))}}function c(t){let e=t;do{for(const n of Object.getOwnPropertyNames(e)){const e=t[n];"constructor"!==n&&"function"==typeof e&&(t[n]=e.bind(t))}}while(e=e!==Object&&Object.getPrototypeOf(e))}n(120);function l(t,e,n){this._worker=t,this._name=Math.random()+"";var r={cmd:"view",view_name:this._name,table_name:e,config:n};this._worker.post(r),c(this)}function u(t,e){this._worker=t,this._name=e}function p(t,e,n){this._worker=t;let r=n.name||Math.random()+"";if(this._name=r,c(this),e.to_arrow){var i={cmd:"table",name:r,args:[],options:n||{}};this._worker.post(i),e.to_arrow().then(t=>{var i={cmd:"table",name:r,args:[t],options:n||{}};this._worker.post(i),e.on_update(t=>{this.update(t.delta)},{mode:"row"})})}else{i={cmd:"table",name:r,args:[e],options:n||{}};this._worker.post(i)}}function h(t,e){this._worker=t,this._name=e}String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var i,o,s=0|e,a=Math.max(s>=0?s:r-Math.abs(s),0);for(;a<r;){if((i=n[a])===(o=t)||"number"==typeof i&&"number"==typeof o&&isNaN(i)&&isNaN(o))return!0;a++}return!1}}),u.prototype=l.prototype,l.prototype.get_config=a("get_config"),l.prototype.to_json=a("to_json"),l.prototype.to_arrow=a("to_arrow"),l.prototype.to_columns=a("to_columns"),l.prototype.to_csv=a("to_csv"),l.prototype.schema=a("schema"),l.prototype.computed_schema=a("computed_schema"),l.prototype.column_paths=a("column_paths"),l.prototype.num_columns=a("num_columns"),l.prototype.num_rows=a("num_rows"),l.prototype.set_depth=a("set_depth"),l.prototype.get_row_expanded=a("get_row_expanded"),l.prototype.expand=a("expand"),l.prototype.collapse=a("collapse"),l.prototype.delete=a("delete"),l.prototype.col_to_js_typed_array=a("col_to_js_typed_array"),l.prototype.on_update=s("on_update","view_method"),l.prototype.remove_update=o("remove_update","view_method"),l.prototype.on_delete=s("on_delete","view_method"),l.prototype.remove_delete=o("remove_delete","view_method"),p.prototype.type="table",h.prototype=p.prototype,p.prototype.view=function(t){return new l(this._worker,this._name,t)},p.prototype.make_port=a("make_port","table_method"),p.prototype.remove_port=a("remove_port","table_method"),p.prototype.compute=a("compute","table_method"),p.prototype.schema=a("schema","table_method"),p.prototype.computed_schema=a("computed_schema","table_method"),p.prototype.get_computation_input_types=a("get_computation_input_types","table_method"),p.prototype.get_computed_functions=a("get_computed_functions","table_method"),p.prototype.is_valid_filter=a("is_valid_filter","table_method"),p.prototype.size=a("size","table_method"),p.prototype.columns=a("columns","table_method"),p.prototype.clear=a("clear","table_method"),p.prototype.replace=a("replace","table_method"),p.prototype.delete=a("delete","table_method"),p.prototype.on_delete=s("on_delete","table_method"),p.prototype.remove=a("remove","table_method"),p.prototype.remove_delete=o("remove_delete","table_method"),p.prototype.update=function(t,e){return new Promise((n,r)=>{var i={name:this._name,cmd:"table_method",method:"update",args:[t,e||{}]};this._worker.post(i,n,r,!1)})},p.prototype.execute=function(t){var e={cmd:"table_execute",name:this._name,f:t.toString()};this._worker.post(e)},n.d(e,"a",(function(){return d}));class d{constructor(){this._initialized=!1,this._worker={initialized:{value:!1},transferable:!1,msg_id:0,handlers:{},messages:[]},c(this)}unsubscribe(t,e){for(let t of Object.keys(this._worker.handlers))this._worker.handlers[t].resolve===e&&delete this._worker.handlers[t]}post(t,e,n,r=!1){(e||n)&&(this._worker.handlers[++this._worker.msg_id]={resolve:e,reject:n,keep_alive:r}),t.id=this._worker.msg_id,this._worker.initialized.value?this.send(t):this._worker.messages.push(()=>this.send(t))}initialize_profile_thread(){this._worker.initialized.value?this.send({id:-1,cmd:"init_profile_thread"}):this._worker.messages.push(()=>this.send({id:-1,cmd:"init_profile_thread"}))}send(){throw new Error("send() not implemented")}open_table(t){return new h(this,t)}open_view(t){return new u(this,t)}_handle(t){if(!this._worker.initialized.value){if(!this._initialized&&"undefined"!=typeof document&&document&&void 0!==typeof window&&window){try{const t=document.createEvent("Event");t.initEvent("perspective-ready",!1,!0),window.dispatchEvent(t)}catch(t){}this._initialized=!0}const e=this._worker.messages;if(this._worker.initialized.value=!0,this._worker.messages=[],e)for(const t in e)e.hasOwnProperty(t)&&e[t]()}if(t.data.id){var e=this._worker.handlers[t.data.id];e&&(t.data.error?e.reject(t.data.error):e.resolve(t.data.data),e.keep_alive||delete this._worker.handlers[t.data.id])}}table(t,e){return new p(this,t,e||{})}terminate(){this._worker.terminate(),this._worker=void 0}}},function(t,e,n){var r=n(80);t.exports=r.publicPath(n.p)+"psp.async.wasm"},function(t,e,n){var r=n(4),i=n(30),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},function(t,e,n){var r=n(1),i=n(5);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r=n(65),i=n(50),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e,n){var r=n(6),i=n(76),o=n(21),s=n(29),a=n(33),c=n(3),l=n(67),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=s(t),e=a(e,!0),l)try{return u(t,e)}catch(t){}if(c(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){var r=n(72),i=n(52).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(114),i=n(10),o=n(18),s=n(12),a=n(15),c=n(31),l=n(118),u=n(119),p=Math.max,h=Math.min,d=Math.floor,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,_=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(t,e,n,r){var m=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=r.REPLACE_KEEPS_$0,v=m?"$":"$0";return[function(n,r){var i=c(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!m&&g||"string"==typeof r&&-1===r.indexOf(v)){var o=n(e,t,this,r);if(o.done)return o.value}var c=i(t),d=String(this),f="function"==typeof r;f||(r=String(r));var _=c.global;if(_){var b=c.unicode;c.lastIndex=0}for(var w=[];;){var E=u(c,d);if(null===E)break;if(w.push(E),!_)break;""===String(E[0])&&(c.lastIndex=l(d,s(c.lastIndex),b))}for(var O,x="",T=0,A=0;A<w.length;A++){E=w[A];for(var S=String(E[0]),N=p(h(a(E.index),d.length),0),C=[],k=1;k<E.length;k++)C.push(void 0===(O=E[k])?O:String(O));var L=E.groups;if(f){var I=[S].concat(C,N,d);void 0!==L&&I.push(L);var R=String(r.apply(void 0,I))}else R=y(S,d,N,C,L,r);N>=T&&(x+=d.slice(T,N)+R,T=N+S.length)}return x+d.slice(T)}];function y(t,n,r,i,s,a){var c=r+t.length,l=i.length,u=_;return void 0!==s&&(s=o(s),u=f),e.call(a,u,(function(e,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=s[o.slice(1,-1)];break;default:var u=+o;if(0===u)return e;if(u>l){var p=d(u/10);return 0===p?e:p<=l?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):e}a=i[u-1]}return void 0===a?"":a}))}}))},function(t,e,n){"use strict";var r,i,o=n(116),s=n(117),a=RegExp.prototype.exec,c=String.prototype.replace,l=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),p=s.UNSUPPORTED_Y||s.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(u||h||p)&&(l=function(t){var e,n,r,i,s=this,l=p&&s.sticky,d=o.call(s),f=s.source,_=0,m=t;return l&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),m=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(f="(?: "+f+")",m=" "+m,_++),n=new RegExp("^(?:"+f+")",d)),h&&(n=new RegExp("^"+f+"$(?!\\s)",d)),u&&(e=s.lastIndex),r=a.call(l?n:s,m),l?r?(r.input=r.input.slice(_),r[0]=r[0].slice(_),r.index=s.lastIndex,s.lastIndex+=r[0].length):s.lastIndex=0:u&&r&&(s.lastIndex=s.global?r.index+r[0].length:e),h&&r&&r.length>1&&c.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=l},function(t,e,n){var r=n(15),i=n(31),o=function(t){return function(e,n){var o,s,a=String(i(e)),c=r(n),l=a.length;return c<0||c>=l?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===l||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):o:t?a.slice(c,c+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,n){var r=n(11).Symbol;t.exports=r},function(t,e,n){var r=n(22)(n(11),"Map");t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";var r,i=n(91),o=n(6),s=n(1),a=n(9),c=n(3),l=n(42),u=n(5),p=n(17),h=n(8).f,d=n(36),f=n(26),_=n(2),m=n(50),g=s.Int8Array,v=g&&g.prototype,y=s.Uint8ClampedArray,b=y&&y.prototype,w=g&&d(g),E=v&&d(v),O=Object.prototype,x=O.isPrototypeOf,T=_("toStringTag"),A=m("TYPED_ARRAY_TAG"),S=i&&!!f&&"Opera"!==l(s.opera),N=!1,C={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},k=function(t){return a(t)&&c(C,l(t))};for(r in C)s[r]||(S=!1);if((!S||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},S))for(r in C)s[r]&&f(s[r],w);if((!S||!E||E===O)&&(E=w.prototype,S))for(r in C)s[r]&&f(s[r].prototype,E);if(S&&d(b)!==E&&f(b,E),o&&!c(E,T))for(r in N=!0,h(E,T,{get:function(){return a(this)?this[A]:void 0}}),C)s[r]&&u(s[r],A,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:S,TYPED_ARRAY_TAG:N&&A,aTypedArray:function(t){if(k(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(f){if(x.call(w,t))return t}else for(var e in C)if(c(C,r)){var n=s[e];if(n&&(t===n||x.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(o){if(n)for(var r in C){var i=s[r];i&&c(i.prototype,t)&&delete i.prototype[t]}E[t]&&!n||p(E,t,n?e:S&&v[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(o){if(f){if(n)for(r in C)(i=s[r])&&c(i,t)&&delete i[t];if(w[t]&&!n)return;try{return p(w,t,n?e:S&&g[t]||e)}catch(t){}}for(r in C)!(i=s[r])||i[t]&&!n||p(i,t,e)}},isView:function(t){var e=l(t);return"DataView"===e||c(C,e)},isTypedArray:k,TypedArray:w,TypedArrayPrototype:E}},function(t,e,n){"use strict";var r=n(29),i=n(64),o=n(23),s=n(16),a=n(75),c=s.set,l=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var r=n(2),i=n(34),o=n(8),s=r("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,n){var r=n(32),i=n(66);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(1),i=n(49),o=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=o},function(t,e,n){var r=n(6),i=n(4),o=n(68);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(1),i=n(9),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,n){var r=n(4);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){var r=n(6),i=n(8),o=n(10),s=n(71);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=s(e),a=r.length,c=0;a>c;)i.f(t,n=r[c++],e[n]);return t}},function(t,e,n){var r=n(72),i=n(52);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(3),i=n(29),o=n(102).indexOf,s=n(51);t.exports=function(t,e){var n,a=i(t),c=0,l=[];for(n in a)!r(s,n)&&r(a,n)&&l.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~o(l,n)||l.push(n));return l}},function(t,e,n){var r=n(15),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},function(t,e,n){var r=n(66),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},function(t,e,n){"use strict";var r=n(24),i=n(78),o=n(36),s=n(26),a=n(25),c=n(5),l=n(17),u=n(2),p=n(32),h=n(23),d=n(79),f=d.IteratorPrototype,_=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),g=function(){return this};t.exports=function(t,e,n,u,d,v,y){i(n,e,u);var b,w,E,O=function(t){if(t===d&&N)return N;if(!_&&t in A)return A[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},x=e+" Iterator",T=!1,A=t.prototype,S=A[m]||A["@@iterator"]||d&&A[d],N=!_&&S||O(d),C="Array"==e&&A.entries||S;if(C&&(b=o(C.call(new t)),f!==Object.prototype&&b.next&&(p||o(b)===f||(s?s(b,f):"function"!=typeof b[m]&&c(b,m,g)),a(b,x,!0,!0),p&&(h[x]=g))),"values"==d&&S&&"values"!==S.name&&(T=!0,N=function(){return S.call(this)}),p&&!y||A[m]===N||c(A,m,N),h[e]=N,d)if(w={values:O("values"),keys:v?N:O("keys"),entries:O("entries")},y)for(E in w)!_&&!T&&E in A||l(A,E,w[E]);else r({target:e,proto:!0,forced:_||T},w);return w}},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var r=n(79).IteratorPrototype,i=n(34),o=n(21),s=n(25),a=n(23),c=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),s(t,l,!1,!0),a[l]=c,t}},function(t,e,n){"use strict";var r,i,o,s=n(36),a=n(5),c=n(3),l=n(2),u=n(32),p=l("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),u||c(r,p)||a(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(t,e){var n=new function(){var t;try{throw new Error}catch(i){var e=i.stack.split("\n"),n=0;for(var r in e)if(e[r].match(/http[s]?:\/\//)){n=Number(r);break}t=e[n].match(/((http[s]?:\/\/.+\/)([^\/]+\.(js|html))).*?:/)}this.fullPath=function(){return t?t[1]:"undefined"!=typeof window?window.location.origin+window.location.pathname:""},this.path=function(){return t?t[2]:"undefined"!=typeof window?window.location.pathname:""},this.host=function(){var t=this.path().match(/.+?\/\/.+?\//);return t?t[0]:"undefined"!=typeof window?window.location.hostname:""},this.file=function(){return t?t[3]:""}};t.exports.host=n.host(),t.exports.path=n.path(),t.exports.isCrossOrigin=function(e){if(!(!e||!e.length)){var n=document.createElement("a");return n.href=e,!n.href.startsWith(window.location.origin)}return window.location.origin!==t.exports.host.slice(0,window.location.origin.length)},t.exports.publicPath=function(e){return!(!e||!e.length)?e:t.exports.path},t.exports.BlobWorker=function(t,e){var n=new Blob([t]),r=window.URL.createObjectURL(n),i=new Worker(r);e&&e(i)},t.exports.XHRWorker=function(e,n){var r=new XMLHttpRequest;r.addEventListener("load",(function(){t.exports.BlobWorker(r.responseText,n)}),r),r.open("get",e,!0),r.send()}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(20))},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(27),i=n(37),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==s||e==a||e==o||e==c}},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(147),i=n(154),o=n(156),s=n(157),a=n(158);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var r=n(159),i=n(162),o=n(163),s=1,a=2;t.exports=function(t,e,n,c,l,u){var p=n&s,h=t.length,d=e.length;if(h!=d&&!(p&&d>h))return!1;var f=u.get(t);if(f&&u.get(e))return f==e;var _=-1,m=!0,g=n&a?new r:void 0;for(u.set(t,e),u.set(e,t);++_<h;){var v=t[_],y=e[_];if(c)var b=p?c(y,v,_,e,t,u):c(v,y,_,t,e,u);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!i(e,(function(t,e){if(!o(g,e)&&(v===t||l(v,t,n,c,u)))return g.push(e)}))){m=!1;break}}else if(v!==y&&!l(v,y,n,c,u)){m=!1;break}}return u.delete(t),u.delete(e),m}},function(t,e,n){(function(t){var r=n(11),i=n(180),o=e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;t.exports=c}).call(this,n(88)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(182),i=n(183),o=n(184),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){var r=n(17);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(15),i=n(12);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length or index");return n}},function(t,e,n){var r=n(2),i=n(23),o=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},function(t,e,n){var r=n(4),i=n(2),o=n(32),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("http://a#\u0431").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";n.r(e);var r="6.5.0",i=n(0),o=n(14),s={},a=new o.RegExpParser;function c(t){var e=t.toString();if(s.hasOwnProperty(e))return s[e];var n=a.pattern(e);return s[e]=n,n}var l,u=(l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p="Complement Sets are not supported for first char optimization",h='Unable to use "first char" lexer optimizations:\n';function d(t,e){void 0===e&&(e=!1);try{var n=c(t);return function t(e,n,r){switch(e.type){case"Disjunction":for(var o=0;o<e.value.length;o++)t(e.value[o],n,r);break;case"Alternative":var s=e.value;for(o=0;o<s.length;o++){var a=s[o];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var c=a;switch(c.type){case"Character":f(c.value,n,r);break;case"Set":if(!0===c.complement)throw Error(p);Object(i.u)(c.value,(function(t){if("number"==typeof t)f(t,n,r);else{var e=t;if(!0===r)for(var i=e.from;i<=e.to;i++)f(i,n,r);else{for(i=e.from;i<=e.to&&i<D;i++)f(i,n,r);if(e.to>=D)for(var o=e.from>=D?e.from:D,s=e.to,a=U(o),c=U(s),l=a;l<=c;l++)n[l]=l}}}));break;case"Group":t(c.value,n,r);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==c.quantifier&&0===c.quantifier.atLeast;if("Group"===c.type&&!1===m(c)||"Group"!==c.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return Object(i.U)(n)}(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===p)e&&Object(i.d)(h+"\tUnable to optimize: < "+t.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i.c)(h+"\n\tFailed parsing: < "+t.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function f(t,e,n){var r=U(t);e[r]=r,!0===n&&function(t,e){var n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){var i=U(r.charCodeAt(0));e[i]=i}else{var o=n.toLowerCase();if(o!==n){i=U(o.charCodeAt(0));e[i]=i}}}(t,e)}function _(t,e){return Object(i.q)(t.value,(function(t){if("number"==typeof t)return Object(i.j)(e,t);var n=t;return void 0!==Object(i.q)(e,(function(t){return n.from<=t&&t<=n.to}))}))}function m(t){return!(!t.quantifier||0!==t.quantifier.atLeast)||!!t.value&&(Object(i.y)(t.value)?Object(i.o)(t.value,m):m(t.value))}var g=function(t){function e(e){var n=t.call(this)||this;return n.targetCharCodes=e,n.found=!1,n}return u(e,t),e.prototype.visitChildren=function(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}t.prototype.visitChildren.call(this,e)}},e.prototype.visitCharacter=function(t){Object(i.j)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?void 0===_(t,this.targetCharCodes)&&(this.found=!0):void 0!==_(t,this.targetCharCodes)&&(this.found=!0)},e}(o.BaseRegExpVisitor);function v(t,e){if(e instanceof RegExp){var n=c(e),r=new g(t);return r.visit(n),r.found}return void 0!==Object(i.q)(e,(function(e){return Object(i.j)(t,e.charCodeAt(0))}))}var y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b="PATTERN",w="defaultMode",E="modes",O="boolean"==typeof new RegExp("(?:)").sticky;function x(t,e){var n,r=(e=Object(i.k)(e,{useSticky:O,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(t,e){return e()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(i.A)(F)){F=new Array(65536);for(var t=0;t<65536;t++)F[t]=t>255?255+~~(t/255):t}}()})),r("Reject Lexer.NA",(function(){n=Object(i.P)(t,(function(t){return t[b]===J.NA}))}));var o,s,a,c,l,u,p,f,_,m,g,y=!1;r("Transform Patterns",(function(){y=!1,o=Object(i.I)(n,(function(t){var n=t[b];if(Object(i.D)(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||Object(i.j)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?e.useSticky?C(n):N(n):r[1]}if(Object(i.B)(n))return y=!0,{exec:n};if(Object(i.w)(n,"exec"))return y=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),s=new RegExp(o);return e.useSticky?C(s):N(s)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){s=Object(i.I)(n,(function(t){return t.tokenTypeIdx})),a=Object(i.I)(n,(function(t){var e=t.GROUP;if(e!==J.SKIPPED){if(Object(i.E)(e))return e;if(Object(i.F)(e))return!1;throw Error("non exhaustive match")}})),c=Object(i.I)(n,(function(t){var e=t.LONGER_ALT;if(e)return Object(i.x)(n,e)})),l=Object(i.I)(n,(function(t){return t.PUSH_MODE})),u=Object(i.I)(n,(function(t){return Object(i.w)(t,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var t=P(e.lineTerminatorCharacters);p=Object(i.I)(n,(function(t){return!1})),"onlyOffset"!==e.positionTracking&&(p=Object(i.I)(n,(function(e){return Object(i.w)(e,"LINE_BREAKS")?e.LINE_BREAKS:!1===j(e,t)?v(t,e.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){f=Object(i.I)(n,L),_=Object(i.I)(o,I),m=Object(i.O)(n,(function(t,e){var n=e.GROUP;return Object(i.E)(n)&&n!==J.SKIPPED&&(t[n]=[]),t}),{}),g=Object(i.I)(o,(function(t,e){return{pattern:o[e],longerAlt:c[e],canLineTerminator:p[e],isCustom:f[e],short:_[e],group:a[e],push:l[e],pop:u[e],tokenTypeIdx:s[e],tokenType:n[e]}}))}));var w=!0,E=[];return e.safeMode||r("First Char Optimization",(function(){E=Object(i.O)(n,(function(t,n,r){if("string"==typeof n.PATTERN){var o=U(n.PATTERN.charCodeAt(0));M(t,o,g[r])}else if(Object(i.y)(n.START_CHARS_HINT)){var s;Object(i.u)(n.START_CHARS_HINT,(function(e){var n=U("string"==typeof e?e.charCodeAt(0):e);s!==n&&(s=n,M(t,n,g[r]))}))}else if(Object(i.D)(n.PATTERN))if(n.PATTERN.unicode)w=!1,e.ensureOptimizations&&Object(i.c)(h+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var a=d(n.PATTERN,e.ensureOptimizations);Object(i.A)(a)&&(w=!1),Object(i.u)(a,(function(e){M(t,e,g[r])}))}else e.ensureOptimizations&&Object(i.c)(h+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),w=!1;return t}),[])})),r("ArrayPacking",(function(){E=Object(i.L)(E)})),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:E,hasCustom:y,canBeOptimized:w}}function T(t,e){var n=[],r=function(t){var e=Object(i.p)(t,(function(t){return!Object(i.w)(t,b)})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:K.MISSING_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(t);n=n.concat(r.errors);var s=function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return!(Object(i.D)(e)||Object(i.B)(e)||Object(i.w)(e,"exec")||Object(i.E)(e))})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:K.INVALID_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(r.valid),a=s.valid;return n=(n=(n=(n=(n=n.concat(s.errors)).concat(function(t){var e=[],n=Object(i.p)(t,(function(t){return Object(i.D)(t[b])}));return e=(e=(e=(e=(e=e.concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitEndAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=c(n),i=new e;return i.visit(r),i.found}catch(t){return A.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:K.EOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitStartAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=c(n),i=new e;return i.visit(r),i.found}catch(t){return S.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:K.SOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return e instanceof RegExp&&(e.multiline||e.global)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:K.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=[],n=Object(i.I)(t,(function(n){return Object(i.O)(t,(function(t,r){return n.PATTERN.source!==r.PATTERN.source||Object(i.j)(e,r)||r.PATTERN===J.NA?t:(e.push(r),t.push(r),t)}),[])}));n=Object(i.i)(n);var r=Object(i.p)(n,(function(t){return t.length>1}));return Object(i.I)(r,(function(t){var e=Object(i.I)(t,(function(t){return t.name}));return{message:"The same RegExp pattern ->"+Object(i.s)(t).PATTERN+"<-has been used in all of the following Token Types: "+e.join(", ")+" <-",type:K.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){return t[b].test("")}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:K.EMPTY_MATCH_PATTERN,tokenTypes:[t]}}))}(n))}(a))).concat(function(t){var e=Object(i.p)(t,(function(t){if(!Object(i.w)(t,"GROUP"))return!1;var e=t.GROUP;return e!==J.SKIPPED&&e!==J.NA&&!Object(i.E)(e)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:K.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}}))}(a))).concat(function(t,e){var n=Object(i.p)(t,(function(t){return void 0!==t.PUSH_MODE&&!Object(i.j)(e,t.PUSH_MODE)}));return Object(i.I)(n,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+t.PUSH_MODE+"<-which does not exist",type:K.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}}))}(a,e))).concat(function(t){var e=[],n=Object(i.O)(t,(function(t,e,n){var r,o=e.PATTERN;return o===J.NA?t:(Object(i.E)(o)?t.push({str:o,idx:n,tokenType:e}):Object(i.D)(o)&&(r=o,void 0===Object(i.q)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(t){return-1!==r.source.indexOf(t)})))&&t.push({str:o.source,idx:n,tokenType:e}),t)}),[]);return Object(i.u)(t,(function(t,r){Object(i.u)(n,(function(n){var o=n.str,s=n.idx,a=n.tokenType;if(r<s&&function(t,e){if(Object(i.D)(e)){var n=e.exec(t);return null!==n&&0===n.index}if(Object(i.B)(e))return e(t,0,[],{});if(Object(i.w)(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}(o,t.PATTERN)){var c="Token: ->"+a.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+t.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";e.push({message:c,type:K.UNREACHABLE_PATTERN,tokenTypes:[t,a]})}}))})),e}(a))}var A=/[^\\][\$]/;var S=/[^\\[][\^]|^\^/;function N(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}function C(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function k(t,e,n){var r=[],o=!1,s=Object(i.i)(Object(i.t)(Object(i.J)(t.modes,(function(t){return t})))),a=Object(i.P)(s,(function(t){return t[b]===J.NA})),c=P(n);return e&&Object(i.u)(a,(function(t){var e=j(t,c);if(!1!==e){var n={message:function(t,e){if(e.issue===K.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+t.name+"> Token Type\n\t Root cause: "+e.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===K.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+t.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(t,e),type:e.issue,tokenType:t};r.push(n)}else Object(i.w)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(o=!0):v(c,t.PATTERN)&&(o=!0)})),e&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:K.NO_LINE_BREAKS_FLAGS}),r}function L(t){var e=t.PATTERN;if(Object(i.D)(e))return!1;if(Object(i.B)(e))return!0;if(Object(i.w)(e,"exec"))return!0;if(Object(i.E)(e))return!1;throw Error("non exhaustive match")}function I(t){return!(!Object(i.E)(t)||1!==t.length)&&t.charCodeAt(0)}var R={test:function(t){for(var e=t.length,n=this.lastIndex;n<e;n++){var r=t.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===t.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function j(t,e){if(Object(i.w)(t,"LINE_BREAKS"))return!1;if(Object(i.D)(t.PATTERN)){try{v(e,t.PATTERN)}catch(t){return{issue:K.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(Object(i.E)(t.PATTERN))return!1;if(L(t))return{issue:K.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function P(t){return Object(i.I)(t,(function(t){return Object(i.E)(t)&&t.length>0?t.charCodeAt(0):t}))}function M(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var D=256;function U(t){return t<D?t:F[t]}var F=[];function B(t,e){var n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function z(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var H=1,q={};function W(t){var e=function(t){var e=Object(i.g)(t),n=t,r=!0;for(;r;){n=Object(i.i)(Object(i.t)(Object(i.I)(n,(function(t){return t.CATEGORIES}))));var o=Object(i.l)(n,e);e=e.concat(o),Object(i.A)(o)?r=!1:n=o}return e}(t);!function(t){Object(i.u)(t,(function(t){var e;V(t)||(q[H]=t,t.tokenTypeIdx=H++),$(t)&&!Object(i.y)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),$(t)||(t.CATEGORIES=[]),e=t,Object(i.w)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return Object(i.w)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){Object(i.u)(t,(function(t){!function t(e,n){Object(i.u)(e,(function(t){n.categoryMatchesMap[t.tokenTypeIdx]=!0})),Object(i.u)(n.CATEGORIES,(function(r){var o=e.concat(n);Object(i.j)(o,r)||t(o,r)}))}([],t)}))}(e),function(t){Object(i.u)(t,(function(t){t.categoryMatches=[],Object(i.u)(t.categoryMatchesMap,(function(e,n){t.categoryMatches.push(q[n].tokenTypeIdx)}))}))}(e),Object(i.u)(e,(function(t){t.isParent=t.categoryMatches.length>0}))}function V(t){return Object(i.w)(t,"tokenTypeIdx")}function $(t){return Object(i.w)(t,"CATEGORIES")}function G(t){return Object(i.w)(t,"tokenTypeIdx")}var K,Y={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,n,r,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+", skipped "+n+" characters."}};!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(K||(K={}));var X={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Y,traceInitPerf:!1,skipValidations:!1};Object.freeze(X);var J=function(){function t(t,e){var n=this;if(void 0===e&&(e=X),this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.K)(X,e);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,o=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===X.lineTerminatorsPattern)n.config.lineTerminatorsPattern=R;else if(n.config.lineTerminatorCharacters===X.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.y)(t)?((r={modes:{}}).modes[w]=Object(i.g)(t),r[w]=w):(o=!1,r=Object(i.h)(t))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(t,e,n){var r=[];return Object(i.w)(t,w)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+w+"> property in its definition\n",type:K.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i.w)(t,E)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+E+"> property in its definition\n",type:K.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i.w)(t,E)&&Object(i.w)(t,w)&&!Object(i.w)(t.modes,t.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a "+w+": <"+t.defaultMode+">which does not exist\n",type:K.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i.w)(t,E)&&Object(i.u)(t.modes,(function(t,e){Object(i.u)(t,(function(t,n){Object(i.F)(t)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+e+"> at index: <"+n+">\n",type:K.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(k(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.u)(r.modes,(function(t,e){r.modes[e]=Object(i.P)(t,(function(t){return Object(i.F)(t)}))}));var a=Object(i.G)(r.modes);if(Object(i.u)(r.modes,(function(t,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var o;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(T(t,a))})),Object(i.A)(n.lexerDefinitionErrors))&&(W(t),n.TRACE_INIT("analyzeTokenTypes",(function(){o=x(t,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=o.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=o.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.K)(n.emptyGroups,o.emptyGroups),n.hasCustom=o.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=o.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.A)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var c=Object(i.I)(n.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+c)}Object(i.u)(n.lexerDefinitionWarning,(function(t){Object(i.d)(t.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(O?(n.chopInput=i.a,n.match=n.matchWithTest):(n.updateLastIndex=i.b,n.match=n.matchWithExec),o&&(n.handleModes=i.b),!1===n.trackStartLines&&(n.computeNewColumn=i.a),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.b),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var t=Object(i.O)(n.canModeBeOptimized,(function(t,e,n){return!1===e&&t.push(n),t}),[]);if(e.ensureOptimizations&&!Object(i.A)(t))throw Error("Lexer Modes: < "+t.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){s={}})),n.TRACE_INIT("toFastProperties",(function(){Object(i.S)(n)}))}))}return t.prototype.tokenize=function(t,e){if(void 0===e&&(e=this.defaultMode),!Object(i.A)(this.lexerDefinitionErrors)){var n=Object(i.I)(this.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(t,e)},t.prototype.tokenizeInternal=function(t,e){var n,r,o,s,a,c,l,u,p,h,d,f,_,m,g,v,y,b=this,w=t,E=w.length,O=0,x=0,T=this.hasCustom?0:Math.floor(t.length/10),A=new Array(T),S=[],N=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0,k=(g=this.emptyGroups,v={},y=Object(i.G)(g),Object(i.u)(y,(function(t){var e=g[t];if(!Object(i.y)(e))throw Error("non exhaustive match");v[t]=[]})),v),L=this.trackStartLines,I=this.config.lineTerminatorsPattern,R=0,j=[],P=[],M=[],D=[];Object.freeze(D);var F=void 0;function B(){return j}function z(t){var e=U(t),n=P[e];return void 0===n?D:n}var H,q=function(t){if(1===M.length&&void 0===t.tokenType.PUSH_MODE){var e=b.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);S.push({offset:t.startOffset,line:void 0!==t.startLine?t.startLine:void 0,column:void 0!==t.startColumn?t.startColumn:void 0,length:t.image.length,message:e})}else{M.pop();var n=Object(i.H)(M);j=b.patternIdxToConfig[n],P=b.charCodeToPatternIdxToConfig[n],R=j.length;var r=b.canModeBeOptimized[n]&&!1===b.config.safeMode;F=P&&r?z:B}};function W(t){M.push(t),P=this.charCodeToPatternIdxToConfig[t],j=this.patternIdxToConfig[t],R=j.length,R=j.length;var e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;F=P&&e?z:B}for(W.call(this,e);O<E;){a=null;var V=w.charCodeAt(O),$=F(V),G=$.length;for(n=0;n<G;n++){var K=(H=$[n]).pattern;if(c=null,!1!==(it=H.short)?V===it&&(a=K):!0===H.isCustom?null!==(m=K.exec(w,O,A,k))?(a=m[0],void 0!==m.payload&&(c=m.payload)):a=null:(this.updateLastIndex(K,O),a=this.match(K,t,O)),null!==a){if(void 0!==(s=H.longerAlt)){var Y=j[s],X=Y.pattern;l=null,!0===Y.isCustom?null!==(m=X.exec(w,O,A,k))?(o=m[0],void 0!==m.payload&&(l=m.payload)):o=null:(this.updateLastIndex(X,O),o=this.match(X,t,O)),o&&o.length>a.length&&(a=o,c=l,H=Y)}break}}if(null!==a){if(u=a.length,void 0!==(p=H.group)&&(h=H.tokenTypeIdx,d=this.createTokenInstance(a,O,h,H.tokenType,N,C,u),this.handlePayload(d,c),!1===p?x=this.addToken(A,x,d):k[p].push(d)),t=this.chopInput(t,u),O+=u,C=this.computeNewColumn(C,u),!0===L&&!0===H.canLineTerminator){var J=0,Z=void 0,Q=void 0;I.lastIndex=0;do{!0===(Z=I.test(a))&&(Q=I.lastIndex-1,J++)}while(!0===Z);0!==J&&(N+=J,C=u-Q,this.updateTokenEndLineColumnLocation(d,p,Q,J,N,C,u))}this.handleModes(H,q,W,d)}else{for(var tt=O,et=N,nt=C,rt=!1;!rt&&O<E;)for(w.charCodeAt(O),t=this.chopInput(t,1),O++,r=0;r<R;r++){var it,ot=j[r];K=ot.pattern;if(!1!==(it=ot.short)?w.charCodeAt(O)===it&&(rt=!0):!0===ot.isCustom?rt=null!==K.exec(w,O,A,k):(this.updateLastIndex(K,O),rt=null!==K.exec(t)),!0===rt)break}f=O-tt,_=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,tt,f,et,nt),S.push({offset:tt,line:et,column:nt,length:f,message:_})}}return this.hasCustom||(A.length=x),{tokens:A,groups:k,errors:S}},t.prototype.handleModes=function(t,e,n,r){if(!0===t.pop){var i=t.push;e(r),void 0!==i&&n.call(this,i)}else void 0!==t.push&&n.call(this,t.push)},t.prototype.chopInput=function(t,e){return t.substring(e)},t.prototype.updateLastIndex=function(t,e){t.lastIndex=e},t.prototype.updateTokenEndLineColumnLocation=function(t,e,n,r,i,o,s){var a,c;void 0!==e&&(c=(a=n===s-1)?-1:0,1===r&&!0===a||(t.endLine=i+c,t.endColumn=o-1-c))},t.prototype.computeNewColumn=function(t,e){return t+e},t.prototype.createTokenInstance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return null},t.prototype.createOffsetOnlyToken=function(t,e,n,r){return{image:t,startOffset:e,tokenTypeIdx:n,tokenType:r}},t.prototype.createStartOnlyToken=function(t,e,n,r,i,o){return{image:t,startOffset:e,startLine:i,startColumn:o,tokenTypeIdx:n,tokenType:r}},t.prototype.createFullToken=function(t,e,n,r,i,o,s){return{image:t,startOffset:e,endOffset:e+s-1,startLine:i,endLine:i,startColumn:o,endColumn:o+s-1,tokenTypeIdx:n,tokenType:r}},t.prototype.addToken=function(t,e,n){return 666},t.prototype.addTokenUsingPush=function(t,e,n){return t.push(n),e},t.prototype.addTokenUsingMemberAccess=function(t,e,n){return t[e]=n,++e},t.prototype.handlePayload=function(t,e){},t.prototype.handlePayloadNoCustom=function(t,e){},t.prototype.handlePayloadWithCustom=function(t,e){null!==e&&(t.payload=e)},t.prototype.match=function(t,e,n){return null},t.prototype.matchWithTest=function(t,e,n){return!0===t.test(e)?e.substring(n,t.lastIndex):null},t.prototype.matchWithExec=function(t,e){var n=t.exec(e);return null!==n?n[0]:n},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+t+">");var r=Object(i.R)(e),o=r.time,s=r.value,a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+t+"> time: "+o+"ms"),this.traceInitIndent--,s}return e()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();function Z(t){return tt(t)?t.LABEL:t.name}function Q(t){return t.name}function tt(t){return Object(i.E)(t.LABEL)&&""!==t.LABEL}var et="parent",nt="categories",rt="label",it="group",ot="push_mode",st="pop_mode",at="longer_alt",ct="line_breaks",lt="start_chars_hint";function ut(t){return function(t){var e=t.pattern,n={};n.name=t.name,Object(i.F)(e)||(n.PATTERN=e);if(Object(i.w)(t,et))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(i.w)(t,nt)&&(n.CATEGORIES=t[nt]);W([n]),Object(i.w)(t,rt)&&(n.LABEL=t[rt]);Object(i.w)(t,it)&&(n.GROUP=t[it]);Object(i.w)(t,st)&&(n.POP_MODE=t[st]);Object(i.w)(t,ot)&&(n.PUSH_MODE=t[ot]);Object(i.w)(t,at)&&(n.LONGER_ALT=t[at]);Object(i.w)(t,ct)&&(n.LINE_BREAKS=t[ct]);Object(i.w)(t,lt)&&(n.START_CHARS_HINT=t[lt]);return n}(t)}var pt=ut({name:"EOF",pattern:J.NA});function ht(t,e,n,r,i,o,s,a){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:o,startColumn:s,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function dt(t,e){return B(t,e)}W([pt]);var ft=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(){function t(t){this.definition=t}return t.prototype.accept=function(t){t.visit(this),Object(i.u)(this.definition,(function(e){e.accept(t)}))},t}(),mt=function(t){function e(e){var n=t.call(this,[])||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(_t),gt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.orgText="",Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),vt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.ignoreAmbiguities=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),yt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),bt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),wt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),Et=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),Ot=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),xt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return ft(e,t),e}(_t),Tt=function(){function t(t){this.idx=1,Object(i.f)(this,Object(i.N)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function At(t){return Object(i.I)(t,St)}function St(t){function e(t){return Object(i.I)(t,St)}if(t instanceof mt)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof vt)return{type:"Flat",definition:e(t.definition)};if(t instanceof yt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof bt)return{type:"RepetitionMandatory",name:t.name,idx:t.idx,definition:e(t.definition)};if(t instanceof wt)return{type:"RepetitionMandatoryWithSeparator",name:t.name,idx:t.idx,separator:St(new Tt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ot)return{type:"RepetitionWithSeparator",name:t.name,idx:t.idx,separator:St(new Tt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Et)return{type:"Repetition",name:t.name,idx:t.idx,definition:e(t.definition)};if(t instanceof xt)return{type:"Alternation",name:t.name,idx:t.idx,definition:e(t.definition)};if(t instanceof Tt){var n={type:"Terminal",name:t.terminalType.name,label:Z(t.terminalType),idx:t.idx},r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Object(i.D)(r)?r.source:r),n}if(t instanceof gt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var Nt=function(){function t(){}return t.prototype.walk=function(t,e){var n=this;void 0===e&&(e=[]),Object(i.u)(t.definition,(function(r,o){var s=Object(i.m)(t.definition,o+1);if(r instanceof mt)n.walkProdRef(r,s,e);else if(r instanceof Tt)n.walkTerminal(r,s,e);else if(r instanceof vt)n.walkFlat(r,s,e);else if(r instanceof yt)n.walkOption(r,s,e);else if(r instanceof bt)n.walkAtLeastOne(r,s,e);else if(r instanceof wt)n.walkAtLeastOneSep(r,s,e);else if(r instanceof Ot)n.walkManySep(r,s,e);else if(r instanceof Et)n.walkMany(r,s,e);else{if(!(r instanceof xt))throw Error("non exhaustive match");n.walkOr(r,s,e)}}))},t.prototype.walkTerminal=function(t,e,n){},t.prototype.walkProdRef=function(t,e,n){},t.prototype.walkFlat=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkOption=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkAtLeastOne=function(t,e,n){var r=[new yt({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkAtLeastOneSep=function(t,e,n){var r=Ct(t,e,n);this.walk(t,r)},t.prototype.walkMany=function(t,e,n){var r=[new yt({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkManySep=function(t,e,n){var r=Ct(t,e,n);this.walk(t,r)},t.prototype.walkOr=function(t,e,n){var r=this,o=e.concat(n);Object(i.u)(t.definition,(function(t){var e=new vt({definition:[t]});r.walk(e,o)}))},t}();function Ct(t,e,n){return[new yt({definition:[new Tt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var kt=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case mt:return this.visitNonTerminal(e);case vt:return this.visitFlat(e);case yt:return this.visitOption(e);case bt:return this.visitRepetitionMandatory(e);case wt:return this.visitRepetitionMandatoryWithSeparator(e);case Ot:return this.visitRepetitionWithSeparator(e);case Et:return this.visitRepetition(e);case xt:return this.visitAlternation(e);case Tt:return this.visitTerminal(e);case gt:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitFlat=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}(),Lt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function It(t,e){return void 0===e&&(e=[]),!!(t instanceof yt||t instanceof Et||t instanceof Ot)||(t instanceof xt?Object(i.Q)(t.definition,(function(t){return It(t,e)})):!(t instanceof mt&&Object(i.j)(e,t))&&(t instanceof _t&&(t instanceof mt&&e.push(t),Object(i.o)(t.definition,(function(t){return It(t,e)})))))}function Rt(t){if(t instanceof mt)return"SUBRULE";if(t instanceof yt)return"OPTION";if(t instanceof xt)return"OR";if(t instanceof bt)return"AT_LEAST_ONE";if(t instanceof wt)return"AT_LEAST_ONE_SEP";if(t instanceof Ot)return"MANY_SEP";if(t instanceof Et)return"MANY";if(t instanceof Tt)return"CONSUME";throw Error("non exhaustive match")}var jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.separator="-",e.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},e}return Lt(e,t),e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var e=t.terminalType.name+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitNonTerminal=function(t){var e=t.nonTerminalName+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(kt),Pt=new jt;function Mt(t){if(t instanceof mt)return Mt(t.referencedRule);if(t instanceof Tt)return[t.terminalType];if(function(t){return t instanceof vt||t instanceof yt||t instanceof Et||t instanceof bt||t instanceof wt||t instanceof Ot||t instanceof Tt||t instanceof gt}(t))return function(t){var e,n=[],r=t.definition,o=0,s=r.length>o,a=!0;for(;s&&a;)e=r[o],a=It(e),n=n.concat(Mt(e)),o+=1,s=r.length>o;return Object(i.T)(n)}(t);if(function(t){return t instanceof xt}(t))return function(t){var e=Object(i.I)(t.definition,(function(t){return Mt(t)}));return Object(i.T)(Object(i.t)(e))}(t);throw Error("non exhaustive match")}var Dt="_~IN~_",Ut=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ft=function(t){function e(e){var n=t.call(this)||this;return n.topProd=e,n.follows={},n}return Ut(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,e,n){},e.prototype.walkProdRef=function(t,e,n){var r,i,o=(r=t.referencedRule,i=t.idx,r.name+i+Dt+this.topProd.name),s=e.concat(n),a=Mt(new vt({definition:s}));this.follows[o]=a},e}(Nt);function Bt(t,e,n){return n|e|t}var zt=24;function Ht(t,e,n,r){var i=r+1<<zt;return Bt(t,e,n)|i}var qt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Wt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset)}function Vt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function $t(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}var Gt=function(t){function e(e){var n=t.call(this)||this;return n.result=[],n.ruleIdx=e,n}return qt(e,t),e.prototype.collectNamedDSLMethod=function(t,e,n){if(!Object(i.F)(t.name)){var r=void 0;if(t instanceof yt||t instanceof Et||t instanceof bt||t instanceof xt)r=new e({definition:t.definition,idx:t.idx});else{if(!(t instanceof wt||t instanceof Ot))throw Error("non exhaustive match");r=new e({definition:t.definition,idx:t.idx,separator:t.separator})}var o=[r],s=Bt(this.ruleIdx,n,t.idx);this.result.push({def:o,key:s,name:t.name,orgProd:t})}},e.prototype.visitOption=function(t){this.collectNamedDSLMethod(t,yt,512)},e.prototype.visitRepetition=function(t){this.collectNamedDSLMethod(t,Et,768)},e.prototype.visitRepetitionMandatory=function(t){this.collectNamedDSLMethod(t,bt,1024)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.collectNamedDSLMethod(t,wt,1536)},e.prototype.visitRepetitionWithSeparator=function(t){this.collectNamedDSLMethod(t,Ot,1280)},e.prototype.visitAlternation=function(t){var e=this;this.collectNamedDSLMethod(t,xt,256);var n=t.definition.length>1;Object(i.u)(t.definition,(function(r,o){if(!Object(i.F)(r.name)){var s=r.definition;s=n?[new yt({definition:r.definition})]:r.definition;var a=Ht(e.ruleIdx,256,t.idx,o);e.result.push({def:s,key:a,name:r.name,orgProd:r})}}))},e}(kt);var Kt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Kt(e,t),e.prototype.walkTerminal=function(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var r=e.concat(n),i=new vt({definition:r});this.possibleTokTypes=Mt(i),this.found=!0}},e}(function(t){function e(e,n){var r=t.call(this)||this;return r.topProd=e,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Kt(e,t),e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.g)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.g)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(e,n){void 0===n&&(n=[]),this.found||t.prototype.walk.call(this,e,n)},e.prototype.walkProdRef=function(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}},e.prototype.updateExpectedNext=function(){Object(i.A)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(Nt)),Xt=function(t){function e(e,n){var r=t.call(this)||this;return r.topRule=e,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Kt(e,t),e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(Nt),Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kt(e,t),e.prototype.walkMany=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof Tt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkMany.call(this,e,n,r)},e}(Xt),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kt(e,t),e.prototype.walkManySep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof Tt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkManySep.call(this,e,n,r)},e}(Xt),Qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kt(e,t),e.prototype.walkAtLeastOne=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof Tt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOne.call(this,e,n,r)},e}(Xt),te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kt(e,t),e.prototype.walkAtLeastOneSep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof Tt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOneSep.call(this,e,n,r)},e}(Xt);function ee(t,e,n){void 0===n&&(n=[]),n=Object(i.g)(n);var r=[],o=0;function s(s){var a=ee(s.concat(Object(i.m)(t,o+1)),e,n);return r.concat(a)}for(;n.length<e&&o<t.length;){var a=t[o];if(a instanceof vt)return s(a.definition);if(a instanceof mt)return s(a.definition);if(a instanceof yt)r=s(a.definition);else{if(a instanceof bt)return s(c=a.definition.concat([new Et({definition:a.definition})]));if(a instanceof wt)return s(c=[new vt({definition:a.definition}),new Et({definition:[new Tt({terminalType:a.separator})].concat(a.definition)})]);if(a instanceof Ot){var c=a.definition.concat([new Et({definition:[new Tt({terminalType:a.separator})].concat(a.definition)})]);r=s(c)}else if(a instanceof Et){c=a.definition.concat([new Et({definition:a.definition})]);r=s(c)}else{if(a instanceof xt)return Object(i.u)(a.definition,(function(t){r=s(t.definition)})),r;if(!(a instanceof Tt))throw Error("non exhaustive match");n.push(a.terminalType)}}o++}return r.push({partialPath:n,suffixDef:Object(i.m)(t,o)}),r}function ne(t,e,n,r){var o=["EXIT_NONE_TERMINAL"],s=!1,a=e.length,c=a-r-1,l=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Object(i.A)(u);){var p=u.pop();if("EXIT_ALTERNATIVE"!==p){var h=p.def,d=p.idx,f=p.ruleStack,_=p.occurrenceStack;if(!Object(i.A)(h)){var m=h[0];if("EXIT_NONE_TERMINAL"===m){var g={idx:d,def:Object(i.m)(h),ruleStack:Object(i.n)(f),occurrenceStack:Object(i.n)(_)};u.push(g)}else if(m instanceof Tt)if(d<a-1){var v=d+1;if(n(e[v],m.terminalType)){g={idx:v,def:Object(i.m)(h),ruleStack:f,occurrenceStack:_};u.push(g)}}else{if(d!==a-1)throw Error("non exhaustive match");l.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:f,occurrenceStack:_}),s=!0}else if(m instanceof mt){var y=Object(i.g)(f);y.push(m.nonTerminalName);var b=Object(i.g)(_);b.push(m.idx);g={idx:d,def:m.definition.concat(o,Object(i.m)(h)),ruleStack:y,occurrenceStack:b};u.push(g)}else if(m instanceof yt){var w={idx:d,def:Object(i.m)(h),ruleStack:f,occurrenceStack:_};u.push(w),u.push("EXIT_ALTERNATIVE");var E={idx:d,def:m.definition.concat(Object(i.m)(h)),ruleStack:f,occurrenceStack:_};u.push(E)}else if(m instanceof bt){var O=new Et({definition:m.definition,idx:m.idx});g={idx:d,def:m.definition.concat([O],Object(i.m)(h)),ruleStack:f,occurrenceStack:_};u.push(g)}else if(m instanceof wt){var x=new Tt({terminalType:m.separator});O=new Et({definition:[x].concat(m.definition),idx:m.idx}),g={idx:d,def:m.definition.concat([O],Object(i.m)(h)),ruleStack:f,occurrenceStack:_};u.push(g)}else if(m instanceof Ot){w={idx:d,def:Object(i.m)(h),ruleStack:f,occurrenceStack:_};u.push(w),u.push("EXIT_ALTERNATIVE");x=new Tt({terminalType:m.separator});var T=new Et({definition:[x].concat(m.definition),idx:m.idx});E={idx:d,def:m.definition.concat([T],Object(i.m)(h)),ruleStack:f,occurrenceStack:_};u.push(E)}else if(m instanceof Et){w={idx:d,def:Object(i.m)(h),ruleStack:f,occurrenceStack:_};u.push(w),u.push("EXIT_ALTERNATIVE");T=new Et({definition:m.definition,idx:m.idx}),E={idx:d,def:m.definition.concat([T],Object(i.m)(h)),ruleStack:f,occurrenceStack:_};u.push(E)}else if(m instanceof xt)for(var A=m.definition.length-1;A>=0;A--){var S={idx:d,def:m.definition[A].definition.concat(Object(i.m)(h)),ruleStack:f,occurrenceStack:_};u.push(S),u.push("EXIT_ALTERNATIVE")}else if(m instanceof vt)u.push({idx:d,def:m.definition.concat(Object(i.m)(h)),ruleStack:f,occurrenceStack:_});else{if(!(m instanceof gt))throw Error("non exhaustive match");u.push(re(m,d,f,_))}}}else s&&Object(i.H)(u).idx<=c&&u.pop()}return l}function re(t,e,n,r){var o=Object(i.g)(n);o.push(t.name);var s=Object(i.g)(r);return s.push(1),{idx:e,def:t.definition,ruleStack:o,occurrenceStack:s}}var ie,oe=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(ie||(ie={}));var se=function(t){function e(e,n,r){var i=t.call(this)||this;return i.topProd=e,i.targetOccurrence=n,i.targetProdType=r,i}return oe(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},e.prototype.checkIsTarget=function(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)},e.prototype.walkOption=function(e,n,r){this.checkIsTarget(e,ie.OPTION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOne=function(e,n,r){this.checkIsTarget(e,ie.REPETITION_MANDATORY,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOneSep=function(e,n,r){this.checkIsTarget(e,ie.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkMany=function(e,n,r){this.checkIsTarget(e,ie.REPETITION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkManySep=function(e,n,r){this.checkIsTarget(e,ie.REPETITION_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e}(Nt),ae=function(t){function e(e,n,r){var i=t.call(this)||this;return i.targetOccurrence=e,i.targetProdType=n,i.targetRef=r,i.result=[],i}return oe(e,t),e.prototype.checkIsTarget=function(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)},e.prototype.visitOption=function(t){this.checkIsTarget(t,ie.OPTION)},e.prototype.visitRepetition=function(t){this.checkIsTarget(t,ie.REPETITION)},e.prototype.visitRepetitionMandatory=function(t){this.checkIsTarget(t,ie.REPETITION_MANDATORY)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.checkIsTarget(t,ie.REPETITION_MANDATORY_WITH_SEPARATOR)},e.prototype.visitRepetitionWithSeparator=function(t){this.checkIsTarget(t,ie.REPETITION_WITH_SEPARATOR)},e.prototype.visitAlternation=function(t){this.checkIsTarget(t,ie.ALTERNATION)},e}(kt);function ce(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=[];return e}function le(t){for(var e=[""],n=0;n<t.length;n++){for(var r=t[n],i=[],o=0;o<e.length;o++){var s=e[o];i.push(s+"_"+r.tokenTypeIdx);for(var a=0;a<r.categoryMatches.length;a++){var c="_"+r.categoryMatches[a];i.push(s+c)}}e=i}return e}function ue(t,e,n){for(var r=0;r<t.length;r++)if(r!==n)for(var i=t[r],o=0;o<e.length;o++){if(!0===i[e[o]])return!1}return!0}function pe(t,e){for(var n=Object(i.I)(t,(function(t){return ee([t],1)})),r=ce(n.length),o=Object(i.I)(n,(function(t){var e={};return Object(i.u)(t,(function(t){var n=le(t.partialPath);Object(i.u)(n,(function(t){e[t]=!0}))})),e})),s=n,a=1;a<=e;a++){var c=s;s=ce(c.length);for(var l=function(t){for(var n=c[t],l=0;l<n.length;l++){var u=n[l].partialPath,p=n[l].suffixDef,h=le(u);if(ue(o,h,t)||Object(i.A)(p)||u.length===e){var d=r[t];if(!1===fe(d,u)){d.push(u);for(var f=0;f<h.length;f++){var _=h[f];o[t][_]=!0}}}else{var m=ee(p,a+1,u);s[t]=s[t].concat(m),Object(i.u)(m,(function(e){var n=le(e.partialPath);Object(i.u)(n,(function(e){o[t][e]=!0}))}))}}},u=0;u<c.length;u++)l(u)}return r}function he(t,e,n,r){var i=new ae(t,ie.ALTERNATION,r);return e.accept(i),pe(i.result,n)}function de(t,e,n,r){var i=new ae(t,n);e.accept(i);var o=i.result,s=new se(e,t,n).startWalking();return pe([new vt({definition:o}),new vt({definition:s})],r)}function fe(t,e){t:for(var n=0;n<t.length;n++){var r=t[n];if(r.length===e.length){for(var i=0;i<r.length;i++){var o=e[i],s=r[i];if(!1===(o===s||void 0!==s.categoryMatchesMap[o.tokenTypeIdx]))continue t}return!0}}return!1}function _e(t){return Object(i.o)(t,(function(t){return Object(i.o)(t,(function(t){return Object(i.o)(t,(function(t){return Object(i.A)(t.categoryMatches)}))}))}))}var me=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function ge(t,e,n,r,o,s){var a=i.I(t,(function(t){return function(t,e){var n=new be;t.accept(n);var r=n.allProductions,o=i.v(r,ve),s=i.N(o,(function(t){return t.length>1}));return i.I(i.U(s),(function(n){var r=i.s(n),o=e.buildDuplicateFoundError(t,n),s=Rt(r),a={message:o,type:On.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:s,occurrence:r.idx},c=ye(r);return c&&(a.parameter=c),a}))}(t,o)})),c=i.I(t,(function(t){return function t(e,n,r,o){void 0===o&&(o=[]);var s=[],a=function t(e){var n=[];if(i.A(e))return n;var r=i.s(e);if(r instanceof mt)n.push(r.referencedRule);else if(r instanceof vt||r instanceof yt||r instanceof bt||r instanceof wt||r instanceof Ot||r instanceof Et)n=n.concat(t(r.definition));else if(r instanceof xt)n=i.t(i.I(r.definition,(function(e){return t(e.definition)})));else if(!(r instanceof Tt))throw Error("non exhaustive match");var o=It(r),s=e.length>1;if(o&&s){var a=i.m(e);return n.concat(t(a))}return n}(n.definition);if(i.A(a))return[];var c=e.name;i.j(a,e)&&s.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:o}),type:On.LEFT_RECURSION,ruleName:c});var l=i.l(a,o.concat([e])),u=i.I(l,(function(n){var s=i.g(o);return s.push(n),t(e,n,r,s)}));return s.concat(i.t(u))}(t,t,o)})),l=[],u=[],p=[];Object(i.o)(c,i.A)&&(l=Object(i.I)(t,(function(t){return function(t,e){var n=new Oe;t.accept(n);var r=n.alternations;return i.O(r,(function(n,r){var o=i.n(r.definition),s=i.I(o,(function(n,o){var s=ne([n],[],null,1);return i.A(s)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:o}),type:On.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:o+1}:null}));return n.concat(i.i(s))}),[])}(t,o)})),u=Object(i.I)(t,(function(t){return function(t,e,n,r){var o=new Oe;t.accept(o);var s=o.alternations,a=n[t.name];a&&(s=Object(i.P)(s,(function(t){return a[Rt(t)+(0===t.idx?"":t.idx)]})));return s=Object(i.P)(s,(function(t){return!0===t.ignoreAmbiguities})),i.O(s,(function(n,o){var s=o.idx,a=o.maxLookahead||e,c=he(s,t,a,o),l=function(t,e,n,r){var o=[],s=Object(i.O)(t,(function(n,r,s){return!0===e.definition[s].ignoreAmbiguities?n:(Object(i.u)(r,(function(r){var a=[s];Object(i.u)(t,(function(t,n){s!==n&&fe(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!fe(o,r)&&(o.push(r),n.push({alts:a,path:r}))})),n)}),[]);return i.I(s,(function(t){var o=Object(i.I)(t.alts,(function(t){return t+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:o,prefixPath:t.path}),type:On.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:[t.alts]}}))}(c,o,t,r),u=function(t,e,n,r){var o=[],s=Object(i.O)(t,(function(t,e,n){var r=Object(i.I)(e,(function(t){return{idx:n,path:t}}));return t.concat(r)}),[]);return Object(i.u)(s,(function(t){if(!0!==e.definition[t.idx].ignoreAmbiguities){var a=t.idx,c=t.path,l=Object(i.r)(s,(function(t){return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx<a&&(n=t.path,r=c,n.length<r.length&&Object(i.o)(n,(function(t,e){var n=r[e];return t===n||n.categoryMatchesMap[t.tokenTypeIdx]})));var n,r})),u=Object(i.I)(l,(function(t){var i=[t.idx+1,a+1],o=0===e.idx?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:On.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}}));o=o.concat(u)}})),o}(c,o,t,r);return n.concat(l,u)}),[])}(t,e,r,o)})),p=function(t,e,n){var r=[];return Object(i.u)(t,(function(t){var o=new xe;t.accept(o);var s=o.allProductions;Object(i.u)(s,(function(o){var s=function(t){if(t instanceof yt)return ie.OPTION;if(t instanceof Et)return ie.REPETITION;if(t instanceof bt)return ie.REPETITION_MANDATORY;if(t instanceof wt)return ie.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Ot)return ie.REPETITION_WITH_SEPARATOR;if(t instanceof xt)return ie.ALTERNATION;throw Error("non exhaustive match")}(o),a=o.maxLookahead||e,c=de(o.idx,t,s,a)[0];if(Object(i.A)(Object(i.t)(c))){var l=n.buildEmptyRepetitionError({topLevelRule:t,repetition:o});r.push({message:l,type:On.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}}))})),r}(t,e,o));var h=function(t,e,n){var r=[],o=Object(i.I)(e,(function(t){return t.name}));return Object(i.u)(t,(function(t){var e=t.name;if(Object(i.j)(o,e)){var s=n.buildNamespaceConflictError(t);r.push({message:s,type:On.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}})),r}(t,n,o),d=i.I(n,(function(t){return function(t,e){var n=[];t.name.match(we)||n.push({message:e.buildTokenNameError({tokenType:t,expectedPattern:we}),type:On.INVALID_TOKEN_NAME});return n}(t,o)})),f=function(t,e){var n=[];return Object(i.u)(t,(function(t){var r=new Gt("");t.accept(r);var o=Object(i.I)(r.result,(function(t){return t.orgProd}));n.push(Object(i.I)(o,(function(n){return function(t,e,n){var r,i=[];e.name.match(Ee)||(r=n.buildInvalidNestedRuleNameError(t,e),i.push({message:r,type:On.INVALID_NESTED_RULE_NAME,ruleName:t.name}));return i}(t,n,e)})))})),Object(i.t)(n)}(t,o),_=function(t,e){var n=[];return Object(i.u)(t,(function(t){var r=new Gt("");t.accept(r);var o=Object(i.v)(r.result,(function(t){return t.name})),s=Object(i.N)(o,(function(t){return t.length>1}));Object(i.u)(Object(i.U)(s),(function(r){var o=Object(i.I)(r,(function(t){return t.orgProd})),s=e.buildDuplicateNestedRuleNameError(t,o);n.push({message:s,type:On.DUPLICATE_NESTED_NAME,ruleName:t.name})}))})),n}(t,o),m=Object(i.I)(t,(function(t){return function(t,e){var n=new Oe;t.accept(n);var r=n.alternations;return i.O(r,(function(n,r){return r.definition.length>255&&n.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:On.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}),n}),[])}(t,o)})),g=Object(i.I)(t,(function(t){return function(t,e){var n=[],r=t.name;r.match(we)||n.push({message:e.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:we}),type:On.INVALID_RULE_NAME,ruleName:r});return n}(t,o)})),v=Object(i.I)(t,(function(e){return function(t,e,n,r){var o=[];if(Object(i.O)(e,(function(e,n){return n.name===t.name?e+1:e}),0)>1){var s=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});o.push({message:s,type:On.DUPLICATE_RULE_NAME,ruleName:t.name})}return o}(e,t,s,o)}));return i.t(a.concat(d,f,_,p,c,l,u,h,m,g,v))}function ve(t){return Rt(t)+"_#_"+t.idx+"_#_"+ye(t)}function ye(t){return t instanceof Tt?t.terminalType.name:t instanceof mt?t.nonTerminalName:""}var be=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return me(e,t),e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(kt),we=/^[a-zA-Z_]\w*$/,Ee=new RegExp(we.source.replace("^","^\\$"));var Oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.alternations=[],e}return me(e,t),e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(kt);var xe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return me(e,t),e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(kt);var Te={buildMismatchTokenMessage:function(t){var e=t.expected,n=t.actual;t.previous,t.ruleName;return"Expecting "+(tt(e)?"--\x3e "+Z(e)+" <--":"token of type --\x3e "+e.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant;t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,n=t.actual,r=(t.previous,t.customUserDescription),o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");if(r)return"Expecting: "+r+o;var s=Object(i.O)(e,(function(t,e){return t.concat(e)}),[]),a=Object(i.I)(s,(function(t){return"["+Object(i.I)(t,(function(t){return Z(t)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(i.I)(a,(function(t,e){return" "+(e+1)+". "+t})).join("\n"))+o},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,n=t.actual,r=t.customUserDescription,o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");return r?"Expecting: "+r+o:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(i.I)(e,(function(t){return"["+Object(i.I)(t,(function(t){return Z(t)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(Te);var Ae={buildRuleNotFoundError:function(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"}},Se={buildDuplicateFoundError:function(t,e){var n,r=t.name,o=Object(i.s)(e),s=o.idx,a=Rt(o),c=(n=o)instanceof Tt?n.terminalType.name:n instanceof mt?n.nonTerminalName:"",l="->"+a+(s>0?s:"")+"<- "+(c?"with argument: ->"+c+"<-":"")+"\n appears more than once ("+e.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return l=(l=l.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(t,e){return"Invalid nested rule name: ->"+e.name+"<- inside rule: ->"+t.name+"<-\nit must match the pattern: ->"+Ee.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(t,e){return"Duplicate nested rule name: ->"+Object(i.s)(e).name+"<- inside rule: ->"+t.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(t){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return Z(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return Z(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx,r="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(t){var e=Rt(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),"The repetition <"+e+"> within Rule <"+t.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(t){return"Invalid Grammar Token name: ->"+t.tokenType.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(t){return"Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+"> in <OR"+t.alternation.idx+"> inside <"+t.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(t){return"An Alternation cannot have more than 256 alternatives:\n<OR"+t.alternation.idx+"> inside <"+t.topLevelRule.name+"> Rule.\n has "+(t.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(t){var e=t.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+e+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(e+" --\x3e "+i.I(t.leftRecursionPath,(function(t){return t.name})).concat([e]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(t){return"Invalid grammar rule name: ->"+t.topLevelRule.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(t){return"Duplicate definition, rule: ->"+(t.topLevelRule instanceof gt?t.topLevelRule.name:t.topLevelRule)+"<- is already defined in the grammar: ->"+t.grammarName+"<-"}},Ne=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ce=function(t){function e(e,n){var r=t.call(this)||this;return r.nameToTopRule=e,r.errMsgProvider=n,r.errors=[],r}return Ne(e,t),e.prototype.resolveRefs=function(){var t=this;Object(i.u)(Object(i.U)(this.nameToTopRule),(function(e){t.currTopLevel=e,e.accept(t)}))},e.prototype.visitNonTerminal=function(t){var e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:On.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(kt);function ke(t){t=Object(i.k)(t,{errMsgProvider:Ae});var e,n,r,o={};return Object(i.u)(t.rules,(function(t){o[t.name]=t})),e=o,n=t.errMsgProvider,(r=new Ce(e,n)).resolveRefs(),r.errors}function Le(t){return ge((t=Object(i.k)(t,{errMsgProvider:Se,ignoredIssues:{}})).rules,t.maxLookahead,t.tokenTypes,t.ignoredIssues,t.errMsgProvider,t.grammarName)}function Ie(t){Object(i.u)(t.rules,(function(t){var e=new jt;t.accept(e),Object(i.u)(e.dslMethods,(function(t){Object(i.u)(t,(function(t,e){t.idx=e+1}))}))}))}var Re="MismatchedTokenException",je="NoViableAltException",Pe="EarlyExitException",Me="NotAllInputParsedException",De=[Re,je,Pe,Me];function Ue(t){return Object(i.j)(De,t.name)}function Fe(t,e,n){this.name=Re,this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function Be(t,e,n){this.name=je,this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function ze(t,e){this.name=Me,this.message=t,this.token=e,this.resyncedTokens=[]}function He(t,e,n){this.name=Pe,this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(De),Fe.prototype=Error.prototype,Be.prototype=Error.prototype,ze.prototype=Error.prototype,He.prototype=Error.prototype;var qe={},We="InRuleRecoveryException";function Ve(t){this.name=We,this.message=t}Ve.prototype=Error.prototype;var $e=function(){function t(){}return t.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i.w)(t,"recoveryEnabled")?t.recoveryEnabled:xn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Ge)},t.prototype.getTokenToInsert=function(t){var e=ht(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e},t.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},t.prototype.tryInRepetitionRecovery=function(t,e,n,r){for(var o=this,s=this.findReSyncTokenType(),a=this.exportLexerState(),c=[],l=!1,u=this.LA(1),p=this.LA(1),h=function(){var t=o.LA(0),e=new Fe(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:t,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));e.resyncedTokens=Object(i.n)(c),o.SAVE_ERROR(e)};!l;){if(this.tokenMatcher(p,r))return void h();if(n.call(this))return h(),void t.apply(this,e);this.tokenMatcher(p,s)?l=!0:(p=this.SKIP_TOKEN(),this.addToResyncTokens(p,c))}this.importLexerState(a)},t.prototype.shouldInRepetitionRecoveryBeTried=function(t,e,n){return!1!==n&&(void 0!==t&&void 0!==e&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))))},t.prototype.getFollowsForInRuleRecovery=function(t,e){var n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)},t.prototype.tryInRuleRecovery=function(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Ve("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)},t.prototype.canRecoverWithSingleTokenInsertion=function(t,e){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(Object(i.A)(e))return!1;var r=this.LA(1);return void 0!==Object(i.q)(e,(function(t){return n.tokenMatcher(r,t)}))},t.prototype.canRecoverWithSingleTokenDeletion=function(t){return this.tokenMatcher(this.LA(2),t)},t.prototype.isInCurrentRuleReSyncSet=function(t){var e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return Object(i.j)(n,t)},t.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),e=this.LA(1),n=2;;){var r=e.tokenType;if(Object(i.j)(t,r))return r;e=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return qe;var t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var t=this,e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i.A)(this.LAST_EXPLICIT_RULE_STACK)||(e=Object(i.I)(this.LAST_EXPLICIT_RULE_STACK,(function(e){return t.RULE_STACK[e]})),n=Object(i.I)(this.LAST_EXPLICIT_RULE_STACK,(function(e){return t.RULE_OCCURRENCE_STACK[e]}))),Object(i.I)(e,(function(r,i){return 0===i?qe:{ruleName:t.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:t.shortRuleNameToFullName(e[i-1])}}))},t.prototype.flattenFollowSet=function(){var t=this,e=Object(i.I)(this.buildFullFollowKeyStack(),(function(e){return t.getFollowSetFromFollowKey(e)}));return Object(i.t)(e)},t.prototype.getFollowSetFromFollowKey=function(t){if(t===qe)return[pt];var e=t.ruleName+t.idxInCallingRule+Dt+t.inRule;return this.resyncFollows[e]},t.prototype.addToResyncTokens=function(t,e){return this.tokenMatcher(t,pt)||e.push(t),e},t.prototype.reSyncTo=function(t){for(var e=[],n=this.LA(1);!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return Object(i.n)(e)},t.prototype.attemptInRepetitionRecovery=function(t,e,n,r,i,o,s){},t.prototype.getCurrentGrammarPath=function(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}},t.prototype.getHumanReadableRuleStack=function(){var t=this;return Object(i.A)(this.LAST_EXPLICIT_RULE_STACK)?Object(i.I)(this.RULE_STACK,(function(e){return t.shortRuleNameToFullName(e)})):Object(i.I)(this.LAST_EXPLICIT_RULE_STACK,(function(e){return t.shortRuleNameToFullName(t.RULE_STACK[e])}))},t}();function Ge(t,e,n,r,i,o,s){var a=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[a];if(void 0===c){var l=this.getCurrRuleFullName();c=new o(this.getGAstProductions()[l],i).startWalking(),this.firstAfterRepMap[a]=c}var u=c.token,p=c.occurrence,h=c.isEndOfRule;1===this.RULE_STACK.length&&h&&void 0===u&&(u=pt,p=1),this.shouldInRepetitionRecoveryBeTried(u,p,s)&&this.tryInRepetitionRecovery(t,e,n,u)}var Ke=function(){function t(){}return t.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=Object(i.w)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:xn.dynamicTokensEnabled,this.maxLookahead=Object(i.w)(t,"maxLookahead")?t.maxLookahead:xn.maxLookahead,this.lookAheadFuncsCache=Object(i.z)()?new Map:[],Object(i.z)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(t){var e=this;Object(i.u)(t,(function(t){e.TRACE_INIT(t.name+" Rule Lookahead",(function(){var n=function(t){Pt.reset(),t.accept(Pt);var e=Pt.dslMethods;return Pt.reset(),e}(t),r=n.alternation,o=n.repetition,s=n.option,a=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,l=n.repetitionWithSeparator;Object(i.u)(r,(function(n){var r=0===n.idx?"":n.idx;e.TRACE_INIT(""+Rt(n)+r,(function(){var r,i,o,s,a,c,l,u=(r=n.idx,i=t,o=n.maxLookahead||e.maxLookahead,s=n.hasPredicates,a=e.dynamicTokensEnabled,c=e.lookAheadBuilderForAlternatives,l=he(r,i,o),c(l,s,_e(l)?z:B,a)),p=Bt(e.fullRuleNameToShort[t.name],256,n.idx);e.setLaFuncCache(p,u)}))})),Object(i.u)(o,(function(n){e.computeLookaheadFunc(t,n.idx,768,ie.REPETITION,n.maxLookahead,Rt(n))})),Object(i.u)(s,(function(n){e.computeLookaheadFunc(t,n.idx,512,ie.OPTION,n.maxLookahead,Rt(n))})),Object(i.u)(a,(function(n){e.computeLookaheadFunc(t,n.idx,1024,ie.REPETITION_MANDATORY,n.maxLookahead,Rt(n))})),Object(i.u)(c,(function(n){e.computeLookaheadFunc(t,n.idx,1536,ie.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,Rt(n))})),Object(i.u)(l,(function(n){e.computeLookaheadFunc(t,n.idx,1280,ie.REPETITION_WITH_SEPARATOR,n.maxLookahead,Rt(n))}))}))}))},t.prototype.computeLookaheadFunc=function(t,e,n,r,i,o){var s=this;this.TRACE_INIT(""+o+(0===e?"":e),(function(){var o=function(t,e,n,r,i,o){var s=de(t,e,i,n),a=_e(s)?z:B;return o(s[0],a,r)}(e,t,i||s.maxLookahead,s.dynamicTokensEnabled,r,s.lookAheadBuilderForOptional),a=Bt(s.fullRuleNameToShort[t.name],n,e);s.setLaFuncCache(a,o)}))},t.prototype.lookAheadBuilderForOptional=function(t,e,n){return function(t,e,n){var r=Object(i.o)(t,(function(t){return 1===t.length})),o=t.length;if(r&&!n){var s=Object(i.t)(t);if(1===s.length&&Object(i.A)(s[0].categoryMatches)){var a=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}var c=Object(i.O)(s,(function(t,e,n){return t[e.tokenTypeIdx]=!0,Object(i.u)(e.categoryMatches,(function(e){t[e]=!0})),t}),[]);return function(){var t=this.LA(1);return!0===c[t.tokenTypeIdx]}}return function(){t:for(var n=0;n<o;n++){for(var r=t[n],i=r.length,s=0;s<i;s++){var a=this.LA(s+1);if(!1===e(a,r[s]))continue t}return!0}return!1}}(t,e,n)},t.prototype.lookAheadBuilderForAlternatives=function(t,e,n,r){return function(t,e,n,r){var o=t.length,s=Object(i.o)(t,(function(t){return Object(i.o)(t,(function(t){return 1===t.length}))}));if(e)return function(e){for(var r=Object(i.I)(e,(function(t){return t.GATE})),s=0;s<o;s++){var a=t[s],c=a.length,l=r[s];if(void 0===l||!1!==l.call(this))t:for(var u=0;u<c;u++){for(var p=a[u],h=p.length,d=0;d<h;d++){var f=this.LA(d+1);if(!1===n(f,p[d]))continue t}return s}}};if(s&&!r){var a=Object(i.I)(t,(function(t){return Object(i.t)(t)})),c=Object(i.O)(a,(function(t,e,n){return Object(i.u)(e,(function(e){Object(i.w)(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=n),Object(i.u)(e.categoryMatches,(function(e){Object(i.w)(t,e)||(t[e]=n)}))})),t}),[]);return function(){var t=this.LA(1);return c[t.tokenTypeIdx]}}return function(){for(var e=0;e<o;e++){var r=t[e],i=r.length;t:for(var s=0;s<i;s++){for(var a=r[s],c=a.length,l=0;l<c;l++){var u=this.LA(l+1);if(!1===n(u,a[l]))continue t}return e}}}}(t,e,n,r)},t.prototype.getKeyForAutomaticLookahead=function(t,e){return Bt(this.getLastExplicitRuleShortName(),t,e)},t.prototype.getLaFuncFromCache=function(t){},t.prototype.getLaFuncFromMap=function(t){return this.lookAheadFuncsCache.get(t)},t.prototype.getLaFuncFromObj=function(t){return this.lookAheadFuncsCache[t]},t.prototype.setLaFuncCache=function(t,e){},t.prototype.setLaFuncCacheUsingMap=function(t,e){this.lookAheadFuncsCache.set(t,e)},t.prototype.setLaFuncUsingObj=function(t,e){this.lookAheadFuncsCache[t]=e},t}();var Ye,Xe=/^\s*function\s*(\S*)\s*\(/,Je="name";function Ze(t){var e=t.name;return e||t.toString().match(Xe)[1]}function Qe(t,e){var n=Object.getOwnPropertyDescriptor(t,Je);return!(!Object(i.F)(n)&&!n.configurable)&&(Object.defineProperty(t,Je,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0)}function tn(t,e){for(var n=Object(i.G)(t),r=n.length,o=0;o<r;o++)for(var s=t[n[o]],a=s.length,c=0;c<a;c++){var l=s[c];void 0===l.tokenTypeIdx&&(void 0!==l.fullName?this[l.fullName](l.children,e):this[l.name](l.children,e))}}function en(t,e){var n=function(){};return Qe(n,t+"BaseSemantics"),(n.prototype={visit:function(t,e){if(Object(i.y)(t)&&(t=t[0]),!Object(i.F)(t))return void 0!==t.fullName?this[t.fullName](t.children,e):this[t.name](t.children,e)},validateVisitor:function(){var t=function(t,e){var n=function(t,e){var n=Object(i.I)(e,(function(e){if(!Object(i.B)(t[e]))return{msg:"Missing visitor method: <"+e+"> on "+Ze(t.constructor)+" CST Visitor.",type:Ye.MISSING_METHOD,methodName:e}}));return Object(i.i)(n)}(t,e),r=function(t,e){var n=[];for(var r in t)we.test(r)&&Object(i.B)(t[r])&&!Object(i.j)(nn,r)&&!Object(i.j)(e,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+Ze(t.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+we.source+"/.",type:Ye.REDUNDANT_METHOD,methodName:r});return n}(t,e);return n.concat(r)}(this,e);if(!Object(i.A)(t)){var n=Object(i.I)(t,(function(t){return t.msg}));throw Error("Errors Detected in CST Visitor <"+Ze(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}}).constructor=n,n._RULE_NAMES=e,n}!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(Ye||(Ye={}));var nn=["constructor","visit","validateVisitor"];var rn=function(){function t(){}return t.prototype.initTreeBuilder=function(t){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=Object(i.w)(t,"outputCst")?t.outputCst:xn.outputCst,this.nodeLocationTracking=Object(i.w)(t,"nodeLocationTracking")?t.nodeLocationTracking:xn.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vt,this.setNodeLocationFromNode=Vt,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Wt,this.setNodeLocationFromNode=Wt,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+t.nodeLocationTracking+'"');this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=i.b,this.setInitialNodeLocation=i.b}else this.cstInvocationStateUpdate=i.b,this.cstFinallyStateUpdate=i.b,this.cstPostTerminal=i.b,this.cstPostNonTerminal=i.b,this.cstPostRule=i.b,this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstNestedInvocationStateUpdate=function(t,e){var n={name:t,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstInvocationStateUpdate=function(t,e){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var n={name:t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},t.prototype.cstNestedFinallyStateUpdate=function(){var t=this.CST_STACK.pop();this.cstPostRule(t)},t.prototype.cstPostRuleFull=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?n.endOffset=e.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(t,e){var n,r,i,o=this.CST_STACK[this.CST_STACK.length-1];r=e,i=t,void 0===(n=o).children[i]?n.children[i]=[r]:n.children[i].push(r),this.setNodeLocationFromToken(o.location,e)},t.prototype.cstPostNonTerminal=function(t,e){if(!0!==this.isBackTracking()){var n=this.CST_STACK[this.CST_STACK.length-1];$t(n,e,t),this.setNodeLocationFromNode(n.location,t.location)}},t.prototype.getBaseCstVisitorConstructor=function(){if(Object(i.F)(this.baseCstVisitorConstructor)){var t=en(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i.F)(this.baseCstVisitorWithDefaultsConstructor)){var t=function(t,e,n){var r=function(){};Qe(r,t+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return Object(i.u)(e,(function(t){o[t]=tn})),(r.prototype=o).constructor=r,r}(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.nestedRuleBeforeClause=function(t,e){var n;return void 0!==t.NAME?(n=t.NAME,this.nestedRuleInvocationStateUpdate(n,e),n):void 0},t.prototype.nestedAltBeforeClause=function(t,e,n,r){var i,o=Ht(this.getLastExplicitRuleShortName(),n,e,r);return void 0!==t.NAME?(i=t.NAME,this.nestedRuleInvocationStateUpdate(i,o),{shortName:o,nestedName:i}):void 0},t.prototype.nestedRuleFinallyClause=function(t,e){var n=this.CST_STACK,r=n[n.length-1];this.nestedRuleFinallyStateUpdate();var i=n[n.length-1];$t(i,e,r),this.setNodeLocationFromNode(i.location,r.location)},t.prototype.getLastExplicitRuleShortName=function(){var t=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[t]},t.prototype.getLastExplicitRuleShortNameNoCst=function(){var t=this.RULE_STACK;return t[t.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var t=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[t]},t.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var t=this.RULE_STACK;return t[t.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[t]},t.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},t.prototype.nestedRuleInvocationStateUpdate=function(t,e){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(e),this.cstNestedInvocationStateUpdate(t,e)},t.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},t}(),on=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!0,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):En},t.prototype.LA=function(t){var e=this.currIdx+t;return e<0||this.tokVectorLength<=e?En:this.tokVector[e]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(t){this.currIdx=t},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}(),sn=function(){function t(){}return t.prototype.ACTION=function(t){return t.call(this)},t.prototype.consume=function(t,e,n){return this.consumeInternal(e,t,n)},t.prototype.subrule=function(t,e,n){return this.subruleInternal(e,t,n)},t.prototype.option=function(t,e){return this.optionInternal(e,t)},t.prototype.or=function(t,e){return this.orInternal(e,t)},t.prototype.many=function(t,e){return this.manyInternal(t,e)},t.prototype.atLeastOne=function(t,e){return this.atLeastOneInternal(t,e)},t.prototype.CONSUME=function(t,e){return this.consumeInternal(t,0,e)},t.prototype.CONSUME1=function(t,e){return this.consumeInternal(t,1,e)},t.prototype.CONSUME2=function(t,e){return this.consumeInternal(t,2,e)},t.prototype.CONSUME3=function(t,e){return this.consumeInternal(t,3,e)},t.prototype.CONSUME4=function(t,e){return this.consumeInternal(t,4,e)},t.prototype.CONSUME5=function(t,e){return this.consumeInternal(t,5,e)},t.prototype.CONSUME6=function(t,e){return this.consumeInternal(t,6,e)},t.prototype.CONSUME7=function(t,e){return this.consumeInternal(t,7,e)},t.prototype.CONSUME8=function(t,e){return this.consumeInternal(t,8,e)},t.prototype.CONSUME9=function(t,e){return this.consumeInternal(t,9,e)},t.prototype.SUBRULE=function(t,e){return this.subruleInternal(t,0,e)},t.prototype.SUBRULE1=function(t,e){return this.subruleInternal(t,1,e)},t.prototype.SUBRULE2=function(t,e){return this.subruleInternal(t,2,e)},t.prototype.SUBRULE3=function(t,e){return this.subruleInternal(t,3,e)},t.prototype.SUBRULE4=function(t,e){return this.subruleInternal(t,4,e)},t.prototype.SUBRULE5=function(t,e){return this.subruleInternal(t,5,e)},t.prototype.SUBRULE6=function(t,e){return this.subruleInternal(t,6,e)},t.prototype.SUBRULE7=function(t,e){return this.subruleInternal(t,7,e)},t.prototype.SUBRULE8=function(t,e){return this.subruleInternal(t,8,e)},t.prototype.SUBRULE9=function(t,e){return this.subruleInternal(t,9,e)},t.prototype.OPTION=function(t){return this.optionInternal(t,0)},t.prototype.OPTION1=function(t){return this.optionInternal(t,1)},t.prototype.OPTION2=function(t){return this.optionInternal(t,2)},t.prototype.OPTION3=function(t){return this.optionInternal(t,3)},t.prototype.OPTION4=function(t){return this.optionInternal(t,4)},t.prototype.OPTION5=function(t){return this.optionInternal(t,5)},t.prototype.OPTION6=function(t){return this.optionInternal(t,6)},t.prototype.OPTION7=function(t){return this.optionInternal(t,7)},t.prototype.OPTION8=function(t){return this.optionInternal(t,8)},t.prototype.OPTION9=function(t){return this.optionInternal(t,9)},t.prototype.OR=function(t){return this.orInternal(t,0)},t.prototype.OR1=function(t){return this.orInternal(t,1)},t.prototype.OR2=function(t){return this.orInternal(t,2)},t.prototype.OR3=function(t){return this.orInternal(t,3)},t.prototype.OR4=function(t){return this.orInternal(t,4)},t.prototype.OR5=function(t){return this.orInternal(t,5)},t.prototype.OR6=function(t){return this.orInternal(t,6)},t.prototype.OR7=function(t){return this.orInternal(t,7)},t.prototype.OR8=function(t){return this.orInternal(t,8)},t.prototype.OR9=function(t){return this.orInternal(t,9)},t.prototype.MANY=function(t){this.manyInternal(0,t)},t.prototype.MANY1=function(t){this.manyInternal(1,t)},t.prototype.MANY2=function(t){this.manyInternal(2,t)},t.prototype.MANY3=function(t){this.manyInternal(3,t)},t.prototype.MANY4=function(t){this.manyInternal(4,t)},t.prototype.MANY5=function(t){this.manyInternal(5,t)},t.prototype.MANY6=function(t){this.manyInternal(6,t)},t.prototype.MANY7=function(t){this.manyInternal(7,t)},t.prototype.MANY8=function(t){this.manyInternal(8,t)},t.prototype.MANY9=function(t){this.manyInternal(9,t)},t.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},t.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},t.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},t.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},t.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},t.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},t.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},t.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},t.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},t.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},t.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},t.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},t.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},t.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},t.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},t.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},t.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},t.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},t.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},t.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},t.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},t.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},t.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},t.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},t.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},t.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},t.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},t.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},t.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},t.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},t.prototype.RULE=function(t,e,n){if(void 0===n&&(n=Tn),Object(i.j)(this.definedRulesNames,t)){var r={message:Se.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:On.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(r)}this.definedRulesNames.push(t);var o=this.defineRule(t,e,n);return this[t]=o,o},t.prototype.OVERRIDE_RULE=function(t,e,n){void 0===n&&(n=Tn);var r,o,s,a,c,l=[];l=l.concat((r=t,o=this.definedRulesNames,s=this.className,c=[],i.j(o,r)||(a="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+s+"<-as it is not defined in any of the super grammars ",c.push({message:a,type:On.INVALID_RULE_OVERRIDE,ruleName:r})),c)),this.definitionErrors.push.apply(this.definitionErrors,l);var u=this.defineRule(t,e,n);return this[t]=u,u},t.prototype.BACKTRACK=function(t,e){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(Ue(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return At(Object(i.U)(this.gastProductionsCache))},t}(),an=function(){function t(){}return t.prototype.initRecognizerEngine=function(t,e){if(this.className=Ze(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=z,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i.w)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i.y)(t)){if(Object(i.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i.y)(t))this.tokensMap=Object(i.O)(t,(function(t,e){return t[e.name]=e,t}),{});else if(Object(i.w)(t,"modes")&&Object(i.o)(Object(i.t)(Object(i.U)(t.modes)),G)){var n=Object(i.t)(Object(i.U)(t.modes)),r=Object(i.T)(n);this.tokensMap=Object(i.O)(r,(function(t,e){return t[e.name]=e,t}),{})}else{if(!Object(i.C)(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i.h)(t)}this.tokensMap.EOF=pt;var o=Object(i.o)(Object(i.U)(t),(function(t){return Object(i.A)(t.categoryMatches)}));this.tokenMatcher=o?z:B,W(Object(i.U)(this.tokensMap))},t.prototype.defineRule=function(t,e,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+t+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,o=Object(i.w)(n,"resyncEnabled")?n.resyncEnabled:Tn.resyncEnabled,s=Object(i.w)(n,"recoveryValueFunc")?n.recoveryValueFunc:Tn.recoveryValueFunc,a=this.ruleShortNameIdx<<12;function c(t){try{if(!0===this.outputCst){e.apply(this,t);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return e.apply(this,t)}catch(t){return this.invokeRuleCatch(t,o,s)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a;return(r=function(e,n){return void 0===e&&(e=0),this.ruleInvocationStateUpdate(a,t,e),c.call(this,n)}).ruleName=t,r.originalGrammarAction=e,r},t.prototype.invokeRuleCatch=function(t,e,n){var r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Ue(t)){var o=t;if(i){var s,a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))return o.resyncedTokens=this.reSyncTo(a),this.outputCst?((s=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,s):n();throw this.outputCst&&((s=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=s),o}if(r)return this.moveToTerminatedState(),n();throw o}throw t},t.prototype.optionInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(512,e),r=this.nestedRuleBeforeClause(t,n);try{return this.optionInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.optionInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)},t.prototype.optionInternalLogic=function(t,e,n){var r,i,o=this,s=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(i=t.GATE)){var a=s;s=function(){return i.call(o)&&a.call(o)}}}else r=t;if(!0===s.call(this))return r.call(this)},t.prototype.atLeastOneInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1024,t),r=this.nestedRuleBeforeClause(e,n);try{return this.atLeastOneInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.atLeastOneInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(1024,t);this.atLeastOneInternalLogic(t,e,n)},t.prototype.atLeastOneInternalLogic=function(t,e,n){var r,i,o=this,s=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var a=s;s=function(){return i.call(o)&&a.call(o)}}}else r=e;if(!0!==s.call(this))throw this.raiseEarlyExitException(t,ie.REPETITION_MANDATORY,e.ERR_MSG);for(var c=this.doSingleRepetition(r);!0===s.call(this)&&!0===c;)c=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],s,1024,t,Qt)},t.prototype.atLeastOneSepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1536,t),r=this.nestedRuleBeforeClause(e,n);try{this.atLeastOneSepFirstInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.atLeastOneSepFirstInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,n)},t.prototype.atLeastOneSepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,ie.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);i.call(this);for(var s=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,te],s,1536,t,te)},t.prototype.manyInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(768,t),r=this.nestedRuleBeforeClause(e,n);try{return this.manyInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.manyInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)},t.prototype.manyInternalLogic=function(t,e,n){var r,i,o=this,s=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var a=s;s=function(){return i.call(o)&&a.call(o)}}}else r=e;for(var c=!0;!0===s.call(this)&&!0===c;)c=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],s,768,t,Jt,c)},t.prototype.manySepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1280,t),r=this.nestedRuleBeforeClause(e,n);try{this.manySepFirstInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.manySepFirstInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,n)},t.prototype.manySepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);for(var s=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,Zt],s,1280,t,Zt)}},t.prototype.repetitionSepSecondInternal=function(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,1536,t,i)},t.prototype.doSingleRepetition=function(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e},t.prototype.orInternalNoCst=function(t,e){var n=Object(i.y)(t)?t:t.DEF,r=this.getKeyForAutomaticLookahead(256,e),o=this.getLaFuncFromCache(r).call(this,n);if(void 0!==o)return n[o].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)},t.prototype.orInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(256,e),r=this.nestedRuleBeforeClause(t,n);try{var o=Object(i.y)(t)?t:t.DEF,s=this.getLaFuncFromCache(n).call(this,o);if(void 0!==s){var a=o[s],c=this.nestedAltBeforeClause(a,e,256,s);try{return a.ALT.call(this)}finally{void 0!==c&&this.nestedRuleFinallyClause(c.shortName,c.nestedName)}}this.raiseNoAltException(e,t.ERR_MSG)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ze(e,t))}},t.prototype.subruleInternal=function(t,e,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=t.call(this,e,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){this.subruleInternalError(e,n,t.ruleName)}},t.prototype.subruleInternalError=function(t,e,n){throw Ue(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t},t.prototype.consumeInternal=function(t,e,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),r=i):this.consumeInternalError(t,i,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r},t.prototype.consumeInternalError=function(t,e,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Fe(r,e,i))},t.prototype.consumeInternalRecovery=function(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw t.name===We?n:t}},t.prototype.saveRecogState=function(){var t=this.errors,e=Object(i.g)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},t.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e,t)},t.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},t.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},t.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),pt)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}(),cn=function(){function t(){}return t.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=Object(i.k)(t.errorMessageProvider,xn.errorMessageProvider)},t.prototype.SAVE_ERROR=function(t){if(Ue(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return Object(i.g)(this._errors)},set:function(t){this._errors=t},enumerable:!0,configurable:!0}),t.prototype.raiseEarlyExitException=function(t,e,n){for(var r=this.getCurrRuleFullName(),i=de(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],o=[],s=1;s<=this.maxLookahead;s++)o.push(this.LA(s));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new He(a,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(t,e){for(var n=this.getCurrRuleFullName(),r=he(t,this.getGAstProductions()[n],this.maxLookahead),i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Be(a,this.LA(1),s))},t}(),ln=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(t,e){var n=this.gastProductionsCache[t];if(Object(i.F)(n))throw Error("Rule ->"+t+"<- does not exist in this grammar.");return ne([n],e,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(t){var e=Object(i.s)(t.ruleStack),n=this.getGAstProductions()[e];return new Yt(n,t).startWalking()},t}(),un={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(un);var pn=Math.pow(2,8)-1,hn=ut({name:"RECORDING_PHASE_TOKEN",pattern:J.NA});W([hn]);var dn=ht(hn,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(dn);var fn={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},_n=function(){function t(){}return t.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var e=function(e){var n=e>0?e:"";t["CONSUME"+n]=function(t,n){return this.consumeInternalRecord(t,e,n)},t["SUBRULE"+n]=function(t,n){return this.subruleInternalRecord(t,e,n)},t["OPTION"+n]=function(t){return this.optionInternalRecord(t,e)},t["OR"+n]=function(t){return this.orInternalRecord(t,e)},t["MANY"+n]=function(t){this.manyInternalRecord(e,t)},t["MANY_SEP"+n]=function(t){this.manySepFirstInternalRecord(e,t)},t["AT_LEAST_ONE"+n]=function(t){this.atLeastOneInternalRecord(e,t)},t["AT_LEAST_ONE_SEP"+n]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}},n=0;n<10;n++)e(n);t.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},t.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},t.option=function(t,e){return this.optionInternalRecord(e,t)},t.or=function(t,e){return this.orInternalRecord(e,t)},t.many=function(t,e){this.manyInternalRecord(t,e)},t.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD}))},t.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var e=0;e<10;e++){var n=e>0?e:"";delete t["CONSUME"+n],delete t["SUBRULE"+n],delete t["OPTION"+n],delete t["OR"+n],delete t["MANY"+n],delete t["MANY_SEP"+n],delete t["AT_LEAST_ONE"+n],delete t["AT_LEAST_ONE_SEP"+n]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))},t.prototype.ACTION_RECORD=function(t){},t.prototype.BACKTRACK_RECORD=function(t,e){return function(){return!0}},t.prototype.LA_RECORD=function(t){return En},t.prototype.topLevelRuleRecord=function(t,e){try{var n=new gt({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}},t.prototype.optionInternalRecord=function(t,e){return mn.call(this,yt,t,e)},t.prototype.atLeastOneInternalRecord=function(t,e){mn.call(this,bt,e,t)},t.prototype.atLeastOneSepFirstInternalRecord=function(t,e){mn.call(this,wt,e,t,!0)},t.prototype.manyInternalRecord=function(t,e){mn.call(this,Et,e,t)},t.prototype.manySepFirstInternalRecord=function(t,e){mn.call(this,Ot,e,t,!0)},t.prototype.orInternalRecord=function(t,e){return gn.call(this,t,e)},t.prototype.subruleInternalRecord=function(t,e,n){if(yn(e),!t||!1===Object(i.w)(t,"ruleName")){var r=new Error("<SUBRULE"+vn(e)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),s=t.ruleName,a=new mt({idx:e,nonTerminalName:s,referencedRule:void 0});return o.definition.push(a),this.outputCst?fn:un},t.prototype.consumeInternalRecord=function(t,e,n){if(yn(e),!V(t)){var r=new Error("<CONSUME"+vn(e)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),s=new Tt({idx:e,terminalType:t});return o.definition.push(s),dn},t}();function mn(t,e,n,r){void 0===r&&(r=!1),yn(n);var o=Object(i.M)(this.recordingProdStack),s=Object(i.B)(e)?e:e.DEF,a=new t({definition:[],idx:n});return Object(i.w)(e,"NAME")&&(a.name=e.NAME),r&&(a.separator=e.SEP),Object(i.w)(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),o.definition.push(a),this.recordingProdStack.pop(),un}function gn(t,e){var n=this;yn(e);var r=Object(i.M)(this.recordingProdStack),o=!1===Object(i.y)(t),s=!1===o?t:t.DEF,a=new xt({definition:[],idx:e,ignoreAmbiguities:o&&!0===t.IGNORE_AMBIGUITIES});Object(i.w)(t,"NAME")&&(a.name=t.NAME),Object(i.w)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);var c=Object(i.Q)(s,(function(t){return Object(i.B)(t.GATE)}));return a.hasPredicates=c,r.definition.push(a),Object(i.u)(s,(function(t){var e=new vt({definition:[]});a.definition.push(e),Object(i.w)(t,"NAME")&&(e.name=t.NAME),Object(i.w)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:Object(i.w)(t,"GATE")&&(e.ignoreAmbiguities=!0),n.recordingProdStack.push(e),t.ALT.call(n),n.recordingProdStack.pop()})),un}function vn(t){return 0===t?"":""+t}function yn(t){if(t<0||t>pn){var e=new Error("Invalid DSL Method idx value: <"+t+">\n\tIdx value must be a none negative value smaller than "+(pn+1));throw e.KNOWN_RECORDER_ERROR=!0,e}}var bn=function(){function t(){}return t.prototype.initPerformanceTracer=function(t){if(Object(i.w)(t,"traceInitPerf")){var e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=xn.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+t+">");var r=Object(i.R)(e),o=r.time,s=r.value,a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+t+"> time: "+o+"ms"),this.traceInitIndent--,s}return e()},t}(),wn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),En=ht(pt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(En);var On,xn=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Te,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Tn=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function An(t){return void 0===t&&(t=void 0),function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",t[t.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(On||(On={}));var Sn=function(){function t(t,e){void 0===e&&(e=xn),this.ignoredIssues=xn.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),Object(i.w)(e,"ignoredIssues")&&e.ignoredIssues!==xn.ignoredIssues&&Object(i.d)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=Object(i.w)(e,"ignoredIssues")?e.ignoredIssues:xn.ignoredIssues,this.skipValidations=Object(i.w)(e,"skipValidations")?e.skipValidations:xn.skipValidations}return t.performSelfAnalysis=function(t){t.performSelfAnalysis()},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;e.selfAnalysisDone=!0;var r=e.className;e.TRACE_INIT("toFastProps",(function(){Object(i.S)(e)})),e.TRACE_INIT("Grammar Recording",(function(){try{e.enableRecording(),Object(i.u)(e.definedRulesNames,(function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+" Rule",(function(){r=e.topLevelRuleRecord(t,n)})),e.gastProductionsCache[t]=r}))}finally{e.disableRecording()}}));var o=[];if(e.TRACE_INIT("Grammar Resolving",(function(){o=ke({rules:Object(i.U)(e.gastProductionsCache)}),e.definitionErrors.push.apply(e.definitionErrors,o)})),e.TRACE_INIT("Grammar Validations",(function(){if(Object(i.A)(o)&&!1===e.skipValidations){var t=Le({rules:Object(i.U)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:Object(i.U)(e.tokensMap),ignoredIssues:e.ignoredIssues,errMsgProvider:Se,grammarName:r});e.definitionErrors.push.apply(e.definitionErrors,t)}})),Object(i.A)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",(function(){var t,n,r=(t=Object(i.U)(e.gastProductionsCache),n={},Object(i.u)(t,(function(t){var e=new Ft(t).startWalking();Object(i.f)(n,e)})),n);e.resyncFollows=r})),e.TRACE_INIT("ComputeLookaheadFunctions",(function(){e.preComputeLookaheadFunctions(Object(i.U)(e.gastProductionsCache))}))),e.TRACE_INIT("expandAllNestedRuleNames",(function(){var t,n,r,o=(t=Object(i.U)(e.gastProductionsCache),n=e.fullRuleNameToShort,r={allRuleNames:[]},Object(i.u)(t,(function(t){var e=n[t.name];r.allRuleNames.push(t.name);var o=new Gt(e);t.accept(o),Object(i.u)(o.result,(function(e){e.def,e.key;var n=e.name;r.allRuleNames.push(t.name+n)}))})),r);e.allRuleNames=o.allRuleNames})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i.A)(e.definitionErrors))throw n=Object(i.I)(e.definitionErrors,(function(t){return t.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();Object(i.e)(Sn,[$e,Ke,rn,on,an,sn,cn,ln,_n,bn]);var Nn=function(t){function e(e,n){void 0===n&&(n=xn);var r=Object(i.h)(n);return r.outputCst=!0,t.call(this,e,r)||this}return wn(e,t),e}(Sn),Cn=function(t){function e(e,n){void 0===n&&(n=xn);var r=Object(i.h)(n);return r.outputCst=!1,t.call(this,e,r)||this}return wn(e,t),e}(Sn);function kn(t,e){var n=void 0===e?{}:e,i=n.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,s=n.css;return'\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n'+("\n<link rel='stylesheet' href='"+(void 0===s?"https://unpkg.com/chevrotain@"+r+"/diagrams/diagrams.css":s)+"'>\n")+("\n<script src='"+o+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+o+"src/diagrams_builder.js'><\/script>\n<script src='"+o+"src/diagrams_behavior.js'><\/script>\n<script src='"+o+"src/main.js'><\/script>\n")+'\n<div id="diagrams" align="center"></div> \n'+("\n<script>\n window.serializedGrammar = "+JSON.stringify(t,null," ")+";\n<\/script>\n")+'\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}var Ln="\n";function In(t){var e;return"\nfunction "+t.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+(e=t.rules,Object(i.I)(e,(function(t){return r=Un(n=1,'$.RULE("'+(e=t).name+'", function() {')+Ln,r+=Dn(e.definition,n+1),r+=Un(n+1,"})")+Ln;var e,n,r})).join("\n"))+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n"+t.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+t.name+".prototype.constructor = "+t.name+" \n "}function Rn(t,e){var n=Un(e,"$.OR"+t.idx+"([")+Ln,r=Object(i.I)(t.definition,(function(t){return function(t,e){var n=Un(e,"{")+Ln;t.name&&(n+=Un(e+1,'NAME: "'+t.name+'",')+Ln);return n+=Un(e+1,"ALT: function() {")+Ln,n+=Dn(t.definition,e+1),n+=Un(e+1,"}")+Ln,n+=Un(e,"}")}(t,e+1)}));return n+=r.join(","+Ln),n+=Ln+Un(e,"])"+Ln)}function jn(t,e){if(t instanceof mt)return function(t,e){return Un(e,"$.SUBRULE"+t.idx+"($."+t.nonTerminalName+")"+Ln)}(t,e);if(t instanceof yt)return Pn("OPTION",t,e);if(t instanceof bt)return Pn("AT_LEAST_ONE",t,e);if(t instanceof wt)return Pn("AT_LEAST_ONE_SEP",t,e);if(t instanceof Ot)return Pn("MANY_SEP",t,e);if(t instanceof Et)return Pn("MANY",t,e);if(t instanceof xt)return Rn(t,e);if(t instanceof Tt)return function(t,e){var n=t.terminalType.name;return Un(e,"$.CONSUME"+t.idx+"(this.tokensMap."+n+")"+Ln)}(t,e);if(t instanceof vt)return Dn(t.definition,e);throw Error("non exhaustive match")}function Pn(t,e,n){var r=Un(n,"$."+(t+e.idx)+"(");return e.name||e.separator?(r+="{"+Ln,e.name&&(r+=Un(n+1,'NAME: "'+e.name+'"')+","+Ln),e.separator&&(r+=Un(n+1,"SEP: this.tokensMap."+e.separator.name)+","+Ln),r+="DEF: "+Mn(e.definition,n+2)+Ln,r+=Un(n,"}")+Ln):r+=Mn(e.definition,n+1),r+=Un(n,")")+Ln}function Mn(t,e){var n="function() {"+Ln;return n+=Dn(t,e),n+=Un(e,"}")+Ln}function Dn(t,e){var n="";return Object(i.u)(t,(function(t){n+=jn(t,e+1)})),n}function Un(t,e){return Array(4*t+1).join(" ")+e}function Fn(t){var e=function(t){return" \n"+In(t)+"\nreturn new "+t.name+"(tokenVocabulary, config) \n"}({name:t.name,rules:t.rules}),r=new Function("tokenVocabulary","config","chevrotain",e);return function(e){return r(t.tokenVocabulary,e,n(96))}}function Bn(t){return function(t){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+In(t)+"\n \nreturn {\n "+t.name+": "+t.name+" \n}\n}));\n"}({name:t.name,rules:t.rules})}function zn(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}n.d(e,"clearCache",(function(){return zn})),n.d(e,"VERSION",(function(){return r})),n.d(e,"Parser",(function(){return Sn})),n.d(e,"CstParser",(function(){return Nn})),n.d(e,"EmbeddedActionsParser",(function(){return Cn})),n.d(e,"ParserDefinitionErrorType",(function(){return On})),n.d(e,"EMPTY_ALT",(function(){return An})),n.d(e,"Lexer",(function(){return J})),n.d(e,"LexerDefinitionErrorType",(function(){return K})),n.d(e,"createToken",(function(){return ut})),n.d(e,"createTokenInstance",(function(){return ht})),n.d(e,"EOF",(function(){return pt})),n.d(e,"tokenLabel",(function(){return Z})),n.d(e,"tokenMatcher",(function(){return dt})),n.d(e,"tokenName",(function(){return Q})),n.d(e,"defaultGrammarResolverErrorProvider",(function(){return Ae})),n.d(e,"defaultGrammarValidatorErrorProvider",(function(){return Se})),n.d(e,"defaultParserErrorProvider",(function(){return Te})),n.d(e,"EarlyExitException",(function(){return He})),n.d(e,"isRecognitionException",(function(){return Ue})),n.d(e,"MismatchedTokenException",(function(){return Fe})),n.d(e,"NotAllInputParsedException",(function(){return ze})),n.d(e,"NoViableAltException",(function(){return Be})),n.d(e,"defaultLexerErrorProvider",(function(){return Y})),n.d(e,"Alternation",(function(){return xt})),n.d(e,"Flat",(function(){return vt})),n.d(e,"NonTerminal",(function(){return mt})),n.d(e,"Option",(function(){return yt})),n.d(e,"Repetition",(function(){return Et})),n.d(e,"RepetitionMandatory",(function(){return bt})),n.d(e,"RepetitionMandatoryWithSeparator",(function(){return wt})),n.d(e,"RepetitionWithSeparator",(function(){return Ot})),n.d(e,"Rule",(function(){return gt})),n.d(e,"Terminal",(function(){return Tt})),n.d(e,"serializeGrammar",(function(){return At})),n.d(e,"serializeProduction",(function(){return St})),n.d(e,"GAstVisitor",(function(){return kt})),n.d(e,"assignOccurrenceIndices",(function(){return Ie})),n.d(e,"resolveGrammar",(function(){return ke})),n.d(e,"validateGrammar",(function(){return Le})),n.d(e,"createSyntaxDiagramsCode",(function(){return kn})),n.d(e,"generateParserFactory",(function(){return Fn})),n.d(e,"generateParserModule",(function(){return Bn}))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return Server}));var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(13),core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_0__),_config__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(19),_config__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_config__WEBPACK_IMPORTED_MODULE_1__);function error_to_json(t){const e={};return"string"!=typeof t?Object.getOwnPropertyNames(t).forEach(n=>{e[n]=t[n]},t):e.message=t,e}class Server{constructor(t){this.perspective=t,this._tables={},this._views={},this._callback_cache=new Map}init(t){t.config&&Object(_config__WEBPACK_IMPORTED_MODULE_1__.override_config)(t.config),this.post(t)}post(){throw new Error("post() not implemented!")}clear_views(t){for(let e of Object.keys(this._views))if(this._views[e].client_id===t){try{this._views[e].delete()}catch(t){console.error(t)}delete this._views[e]}console.debug(`GC ${Object.keys(this._views).length} views in memory`)}process(msg,client_id){switch(msg.cmd){case"init_profile_thread":this.perspective.initialize_profile_thread();break;case"init":this.init(msg);break;case"table":if(void 0===msg.args[0])this._tables[msg.name]=[];else{const t=this._tables[msg.name];if(this._tables[msg.name]=this.perspective.table(msg.args[0],msg.options),t)for(const e of t)this.process(e)}break;case"table_generate":let g;eval("g = "+msg.args),g((function(t){this._tables[msg.name]=t,this.post({id:msg.id,data:"created!"})}));break;case"table_execute":let f;eval("f = "+msg.f),f(this._tables[msg.name]);break;case"table_method":case"view_method":this.process_method_call(msg);break;case"view":this._views[msg.view_name]=this._tables[msg.table_name].view(msg.config),this._views[msg.view_name].client_id=client_id}}process_error(t,e){this.post({id:t.id,error:error_to_json(e)})}process_subscribe(t,e){try{let n;"on"===t.method.slice(0,2)?(n=r=>{let i={id:t.id,data:r};try{if(t.args&&t.args[0]&&"on_update"===t.method&&"row"===t.args[0].mode)return void this.post(i,r.delta);this.post(i)}catch(r){console.error(`Removing failed callback to \`${t.method}()\` (presumably due to failed connection)`);const i=t.method.substring(3);e[`remove_${i}`](n)}},t.callback_id&&this._callback_cache.set(t.callback_id,n)):t.callback_id&&(n=this._callback_cache.get(t.callback_id),this._callback_cache.delete(t.callback_id)),n?e[t.method](n,...t.args):console.error(`Callback not found for remote call "${JSON.stringify(t)}"`)}catch(e){return void this.process_error(t,e)}}process_method_call_response(t,e){"delete"===t.method&&delete this._views[t.name],"to_arrow"===t.method?this.post({id:t.id,data:e},[e]):this.post({id:t.id,data:e})}process_method_call(t){let e,n;if(e="table_method"===t.cmd?this._tables[t.name]:this._views[t.name],e||"view_method"!==t.cmd)if(e&&e.push)e.push(t);else try{if(t.subscribe)return void this.process_subscribe(t,e);n=e[t.method].apply(e,t.args),n instanceof Promise?n.then(e=>this.process_method_call_response(t,e)).catch(e=>this.process_error(t,e)):this.process_method_call_response(t,n)}catch(e){return void this.process_error(t,e)}else this.process_error(t,{message:"View is not initialized"})}}},function(t,e,n){t.exports=function(){var t=n(80),e=t.publicPath(n.p)+"perspective.wasm.worker.js";return t.isCrossOrigin(n.p)?new Promise((function(n){t.XHRWorker(e,n)})):new Promise((function(t){t(new Worker(e))}))}},function(t,e,n){var r,i,o,s,a,c,l,u,p,h,d,f,_;window,t.exports=(r=n(96),i=n(232),o=n(13),s=n(19),a=n(113),c=n(56),l=n(122),u=n(128),p=n(129),h=n(195),d=n(212),f=n(221),_=n(225),function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=30)}([function(t,e){t.exports=r},function(t,e){t.exports=i},function(t,e,n){"use strict";(function(t){function r(t,...e){const n=e.map(t=>t.toString()).join("\n");return function(e){return function(t,e,n){const r=function(t){const e=document.createElement("div");return e.innerHTML=t,Array.prototype.slice.call(e.children)[0]}(t);!function(t){if(t.content)return;let e;for(t.content=document.createDocumentFragment();e=t.firstChild;)Node.prototype.appendChild.call(t.content,e)}(r),e&&(r.innerHTML=`<style>${e.toString()}</style>`+r.innerHTML),r.innerHTML=`<style id="psp_styles" scope="${r.getAttribute("id")}">test{}</style>`+r.innerHTML;for(let t of Object.getOwnPropertyNames(n.prototype)){let e=Object.getOwnPropertyDescriptor(n.prototype,t);if(e&&e.set){let r=e.set;e.set=function(e){this.hasAttribute(t)&&this.getAttribute(t)===e?(this._initializing||this._initialized)&&r.call(this,e):this.setAttribute(t,e)},Object.defineProperty(n.prototype,t,e)}}let i=r.getAttribute("id");console.log(`Registered ${i}`),window.customElements.define(i,class extends n{attributeChangedCallback(t,e,r){null===r&&(r="null"),"_"!==t[0]&&e!=r&&Object.getOwnPropertyDescriptor(n.prototype,t).set&&(this[t]=r)}connectedCallback(){if(!this._initialized){this._initializing=!0;var t=document.importNode(r.content,!0);this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t),super.connectedCallback&&super.connectedCallback();for(let t of Object.getOwnPropertyNames(n.prototype))"connectedCallback"!==t&&this.hasAttribute(t)&&"_"!==t[0]&&Object.getOwnPropertyDescriptor(n.prototype,t).set&&(this[t]=this.getAttribute(t));this._initializing=!1,this._initialized=!0}}static get observedAttributes(){return Object.getOwnPropertyNames(n.prototype)}})}(t,{toString:()=>n},e)}}function i(t){return function(e,n,r){const i=r.value;return r.set=function(e){let r=this.getAttribute(n);try{null!=e&&""!==e||(e=t()),"string"!=typeof e&&(e=JSON.stringify(e)),e!==r&&(r=e),r=JSON.parse(r)}catch(i){console.warn(`Invalid value for attribute "${n}": ${e}`),r=t()}i.call(this,r)},r.get=function(){return this.hasAttribute(n)?JSON.parse(this.getAttribute(n)):t()},delete r.value,delete r.writable,r}}function o(t){let e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}function s(){let t,e=new Promise(e=>{t=e});return e.resolve=t,e}function a(t,e,n){const r=Symbol("private lock"),i=n.value;return n.value=async function(...t){if(this[r]&&(await this[r],this[r]))return void await this[r];let e;this[r]=s();try{e=await i.call(this,...t)}catch(t){console.error(t)}finally{const t=this[r];return this[r]=void 0,t.resolve(),e}},n}function c(t,...e){if(e[0]===e[1])return;if(e.every(t=>t.classList.contains("null-column")))return;let[n,r]=e.map(e=>Array.prototype.slice.call(t.children).indexOf(e));r<n&&([n,r]=[r,n],e=e.reverse()),t.insertBefore(e[1],e[0]),r+1===t.children.length?t.appendChild(e[0]):t.insertBefore(e[0],t.children[r+1])}n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"g",(function(){return a})),n.d(e,"f",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"a",(function(){return u})),n(3);const l=i(()=>({})),u=i(()=>[])}).call(this,n(11))},function(t,e){t.exports=o},function(t,e){t.exports=s},function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a})),n(3);var r=n(1);const i={},o=new class{registerPlugin(t,e){if(i[t])throw new Error(`A perspective-viewer plugin "${t}" has already been registered`);for(const n in i){const r=i[n];r&&r.name===e.name&&(console.warn(`Conflicting plugin name "${e.name}", qualifying with id`),r.name=`${r.name} [${n}]`,e.name=`${e.name} [${t}]`)}i[t]=e}getPlugin(t){return i[t]}getInstance(){return i}};t.registerPlugin=o.registerPlugin,t.getPlugin=o.getPlugin,t.__perspective_plugins__&&t.__perspective_plugins__.forEach(([e,n])=>t.registerPlugin(e,n));const s=t=>r.html`
2 <pre style="margin:0;overflow:scroll;position:absolute;width:100%;height:100%">${t}</pre>
3 `;function a(){t.registerPlugin("debug",{name:"Debug",create:async function(t){const e=await this._view.to_csv({config:{delimiter:"|"}}),n=this._render_time();Object(r.render)(s(e),t),n()},selectMode:"toggle",resize:function(){},delete:function(){}})}}).call(this,n(11))},function(t,e){t.exports=a},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),s=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[r].concat(s).concat([o]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var s=t[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e){t.exports=c},function(t,e){t.exports=l},function(t,e){t.exports=u},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""])},function(t,e){t.exports='\x3c!--\r\n \r\n Copyright (c) 2017, the Perspective Authors.\r\n \r\n This file is part of the Perspective library, distributed under the terms of\r\n the Apache License 2.0. The full license can be found in the LICENSE file.\r\n\r\n--\x3e\r\n\r\n<template id="perspective-row">\r\n <div id="psp_row">\r\n <span class=\'is_visible\'></span>\r\n <div draggable=\'true\' class="row_draggable">\r\n <span id=\'name\' class="column_name"></span>\r\n <div class="row_computed">\r\n <span id="row_edit"></span>\r\n </div>\r\n <span id="sort_order"></span>\r\n <select id="column_aggregate" class="string"></select>\r\n <select id="filter_operator"></select>\r\n <input id="filter_operand" placeholder="Value" />\r\n <span id="row_exclamation" hidden>&#x26A0;</span>\r\n <span id=\'row_close\'>&#x2715;</span>\r\n </div>\r\n </div>\r\n</template>'},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,':host{display:block;border:0 solid transparent}:host .row_computed{display:none;flex-direction:row}.dropping *{pointer-events:none}:host #psp_row{display:var(--psp_row-display,flex);margin:var(--psp_row-margin,0);overflow:visible;align-items:var(--column_selector--align-items,center);width:auto!important;height:auto!important;float:none!important}:host .is_visible{width:var(--column_selector--width,20px);min-width:var(--column_selector--width,20px);height:var(--is_visible--height,auto);cursor:var(--is_visible--cursor,pointer);font-size:var(--column_selector--font-size,14px);margin-top:-2px;display:var(--is_visible-display,none);color:var(--column-selector--color,#999);font-family:var(--column-selector--font-family,Arial)!important}:host #sort_order{display:none;font-family:var(--button--font-family,inherit);margin-right:4px;cursor:pointer;width:10px;display:var(--sort_order-display,none);padding:var(--sort_order-padding,0)}:host #sort_order:before{content:var(--row-sort-order--before, "-")}:host #sort_order:hover{color:var(--active--color,inherit)}:host #filter_operand{display:var(--filter_operand-display,none);margin:0;padding:0;height:19px;color:inherit;outline:0;border-color:var(--inactive--color,#ccc)}:host #filter_operator{margin:0 0 0 15px;display:var(--filter_operator-display,none);height:17px}:host #filter_operator:hover{color:var(--active--color,inherit)}@keyframes expand2{from{transform:translateX(10px)}}@keyframes expand3{from{transform:scale(.9)}}:host(:hover) .is_visible{color:var(--active--color,--column-selector--color)}:host #row_close{display:var(--row_close-display,inline);cursor:pointer;min-width:5px;max-width:5px;margin-right:3px;flex-grow:0;margin-left:3px;color:#999;font-family:Arial;font-size:10px}:host .is_visible:before{content:var(--is_visible--before,none)}:host #row_exclamation{color:red}:host #row_close:hover{color:var(--active--color,inherit)}:host .row_draggable select{border:none}:host .row_draggable select:focus{outline:0}:host select::-ms-expand{display:none}:host select{margin-left:15px;padding-right:15px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:var(--select--background,url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNC45IDEwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0LjkgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojQUFBQUFBO30KPC9zdHlsZT4KPHRpdGxlPmFycm93czwvdGl0bGU+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMS40LDQuNyAyLjUsMy4yIDMuNSw0LjcgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMy41LDUuMyAyLjUsNi44IDEuNCw1LjMgIi8+Cjwvc3ZnPg==) no-repeat 95% 50%);background-color:var(--select--background-color,#fff);color:inherit;border-radius:5px;height:24px;padding:var(--column_type--padding,0 0 0 5px);font-size:12px}:host .awesomplete>ul{border-radius:0;margin:0;border:none;transition:none!important;background:var(--plugin--background,#fff)!important}:host .awesomplete>ul:before{content:none}:host .awesomplete>input,:host input{border-color:#ccc;border-width:0 0 1px;box-sizing:border-box;background-color:transparent}:host .row_draggable{animation:var(--row_draggable--animation,expand2 .5s ease-out);cursor:move;border-style:solid;background-color:var(--row_draggable-background-color,none);overflow:var(--row_draggable-overflow,visible);border-color:var(--row_draggable-border-color,none);border-width:var(--row_draggable-border-width,0);padding:var(--row_draggable-padding,0);font-size:12px;flex-grow:1;color:inherit;transition:height .2s;box-sizing:border-box;height:var(--row_draggable-height,21px);min-height:var(--row_draggable-height,21px);display:var(--row_draggable-display,flex);align-items:var(--row-draggable--align-items);flex-direction:var(--row-draggable--flex-direction,column);justify-content:var(--row_draggable--justify-content,center);margin:var(--row_draggable--margin,0);transition:var(--row_draggable--transition,none)}:host .row_draggable *{opacity:var(--row_draggable_children-opacity,1)}:host .row_draggable select{margin:0 0 0 27px}:host ul{transition:background-color .2s,border-color .2s}:host(.null-column) .is_visible{opacity:0!important}:host(.null-column) .row_draggable{background-color:var(--null--background,transparent)!important;border-color:#ccc!important;border-width:0 0 1px!important}:host([drop-target]) .row_draggable{background-color:var(--active--background,#f0f0ff)!important;animation:var(--drop-target--animation,var(--row_draggable--animation,expand3 .5s ease-out));border:none!important}:host .float:before,:host .integer:before{content:var(--float--column-type--content, var(--column-type--content, "123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host .string:before{content:var(--string--column-type--content, var(--column-type--content, "abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host .boolean:before{content:var(--boolean--column-type--content, var(--column-type--content, "t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999))}:host .date:before{content:var(--date--column-type--content, var(--column-type--content, "mdy"));color:var(--date--column-type--color,var(--column-type--color,#999))}:host .datetime:before{content:var(--datetime--column-type--content, var(--column-type--content, "mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999))}:host .column_name{overflow:hidden;max-width:var(--column_name-max-width,none);white-space:nowrap;text-overflow:ellipsis}:host span#name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0 5px);min-width:18px;display:var(--name-before-display,none);width:var(--column_type--width,auto)}:host #column_aggregate{display:var(--column_aggregate-display,none);font-size:10px;font-family:Arial,sans-serif;width:88%;height:20px}:host span#name{flex:var(--column-name--flex,0 1 auto);width:100%;white-space:nowrap;margin:var(--column_name-margin,0)}',""])},function(t,e){t.exports='\x3c!--\n\nCopyright (c) 2017, the Perspective Authors.\n\nThis file is part of the Perspective library, distributed under the terms of\nthe Apache License 2.0. The full license can be found in the LICENSE file.\n\n--\x3e\n\n<template id="perspective-autocomplete-widget">\n <div class="psp-autocomplete-widget undocked">\n <div class="psp-autocomplete-widget__list" role="list"></div>\n <div class="psp-autocomplete-widget__details"></div>\n </div>\n</template>'},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,':host{width:100%}:host div.psp-autocomplete-widget{color:var(--color,#666);font-family:var(--interface-monospace--font-family,monospace);box-sizing:border-box;display:none;z-index:100000;max-height:75px;font-size:12px;margin-top:5px;overflow-x:hidden;overflow-y:hidden;word-break:break-word}:host div.psp-autocomplete-widget.undocked{max-height:100px;min-width:150px;position:absolute;top:24px}:host div.psp-autocomplete-widget.undocked.show-details{min-width:300px}:host div.psp-autocomplete-widget.undocked.show-details div.psp-autocomplete-widget__list{border-right:none}:host div.psp-autocomplete-widget.docked{background:var(--plugin--background,none);position:static;min-width:auto;width:100%}:host div.psp-autocomplete-widget.docked div.psp-autocomplete-widget__list{background:var(--plugin--background,none);border:none}:host div.psp-autocomplete-widget.docked div.psp-autocomplete-widget__details{position:absolute;left:100%;z-index:100000;min-width:150px;max-width:200px}:host div.psp-autocomplete-widget.docked div.psp-autocomplete__item{border-bottom:1px solid #ccc}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__list{border:1px solid #ccc;background:var(--plugin--background,#fff);flex:auto;min-width:40%;overflow-y:scroll}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__list.small{align-self:flex-start}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details{background:var(--plugin--background,#fff);border:1px solid #ccc;display:none;flex:auto;padding:5px 5px 5px 10px;overflow-y:scroll;word-wrap:break-word}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details span{display:block}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details .psp-autocomplete-item-detail__item--label{margin-bottom:5px}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details .psp-autocomplete-item-detail__item--signature{font-size:11px;margin-bottom:5px}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details .psp-autocomplete-item-detail__item--help{font-size:10px}:host div.psp-autocomplete-widget div.psp-autocomplete__item{display:block;overflow-x:auto;padding:5px;word-break:keep-all}:host div.psp-autocomplete-widget div.psp-autocomplete__item:hover{background:var(--autocomplete-hover-background,#b7d2e0);cursor:pointer}:host div.psp-autocomplete-widget div.psp-autocomplete__item:focus,:host div.psp-autocomplete-widget div.psp-autocomplete__item[aria-selected=true]{background:var(--autocomplete-select-background,#3d6c8e);color:var(--color,#fff);cursor:pointer}:host div.psp-autocomplete-widget div.psp-autocomplete__item:focus span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name::before,:host div.psp-autocomplete-widget div.psp-autocomplete__item[aria-selected=true] span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name::before{color:var(--color,#fff)!important}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name{font-family:var(--interface--font-family,Arial,sans-serif)}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0 5px);min-width:18px;width:var(--column_type--width,auto)}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.float:before,:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.integer:before{content:var(--float--column-type--content, var(--column-type--content, "123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.string:before{content:var(--string--column-type--content, var(--column-type--content, "abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.boolean:before{content:var(--boolean--column-type--content, var(--column-type--content, "t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.date:before{content:var(--date--column-type--content, var(--column-type--content, "mdy"));color:var(--date--column-type--color,var(--column-type--color,#999))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.datetime:before{content:var(--datetime--column-type--content, var(--column-type--content, "mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999))}',""])},function(t,e){t.exports='\x3c!--\n\nCopyright (c) 2017, the Perspective Authors.\n\nThis file is part of the Perspective library, distributed under the terms of\nthe Apache License 2.0. The full license can be found in the LICENSE file.\n\n--\x3e\n\n<template id="perspective-expression-editor">\n <div role="textbox" contenteditable="true" class="perspective-expression-editor__edit_area"></div>\n</template>'},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,':host{width:100%}:host .perspective-expression-editor__edit_area{background:var(--background-color,none);border:1px solid var(--inactive-color,#ccc);box-sizing:border-box;color:var(--color,#666);font-size:12px;display:block;font-family:var(--interface-monospace--font-family,monospace);height:75px;margin-top:5px;max-width:250px;min-height:50px;padding:5px;resize:auto;outline:0;overflow:auto;white-space:pre-wrap;width:100%}:host .perspective-expression-editor__edit_area:hover{cursor:text}:host .perspective-expression-editor__edit_area .psp-expression__column_name{font-family:var(--interface--font-family,Arial,sans-serif)}:host .perspective-expression-editor__edit_area .psp-expression__column_name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0 5px);min-width:18px;width:var(--column_type--width,auto)}:host .perspective-expression-editor__edit_area .psp-expression__column_name.float:before,:host .perspective-expression-editor__edit_area .psp-expression__column_name.integer:before{content:var(--float--column-type--content, var(--column-type--content, "123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.string:before{content:var(--string--column-type--content, var(--column-type--content, "abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.boolean:before{content:var(--boolean--column-type--content, var(--column-type--content, "t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.date:before{content:var(--date--column-type--content, var(--column-type--content, "mdy"));color:var(--date--column-type--color,var(--column-type--color,#999))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.datetime:before{content:var(--datetime--column-type--content, var(--column-type--content, "mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999))}:host .perspective-expression-editor__edit_area .psp-expression__function{color:var(--expression--function-color,#e78340)}:host .perspective-expression-editor__edit_area .psp-expression__operator{color:var(--expression--operator-color,#646464)}:host .perspective-expression-editor__edit_area .psp-expression__suggestion{color:#d3d3d3;text-decoration:underline}:host .perspective-expression-editor__edit_area .psp-expression__errored{font-weight:700;color:var(--expression--error-color,#fa3333);text-decoration:underline dotted var(--expression--error-color,#fa3333)}',""])},function(t,e){t.exports='\x3c!--\n\nCopyright (c) 2017, the Perspective Authors.\n\nThis file is part of the Perspective library, distributed under the terms of\nthe Apache License 2.0. The full license can be found in the LICENSE file.\n\n--\x3e\n\n<template id="perspective-computed-expression-widget">\n <div class="psp-computed-expression-widget__body psp-computed-expression-widget__container">\n <div class="psp-computed-expression-widget__container">\n <div class="psp-computed-expression-widget__action">\n <span class="psp-icon psp-icon__close" id="psp-computed-expression-widget-close" aria-label="Close Computed Expression Widget"></span>\n <span id="psp-computed-expression-widget-title">New Column</span>\n </div>\n <div class="psp-computed-expression-widget__content psp-computed-expression-widget__content--nomargin">\n <perspective-expression-editor aria-autocomplete="list" aria-label="Type a computed expression here" aria-placeholder="Type a computed expression" aria-haspopup="true"></perspective-expression-editor>\n <perspective-autocomplete-widget id="psp-computed-expression-widget-autocomplete"></perspective-autocomplete-widget>\n <div class="psp-computed-expression-widget__label psp-computed-expression-widget__error" id="psp-computed-expression-widget-error"></div>\n </div>\n </div>\n <div id="psp-computed-expression-widget-actions">\n <button id="psp-computed-expression-widget-button-save" class="psp-computed-expression-widget__button" disabled>Save</button>\n </div>\n </div>\n</template>'},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,':host{display:none;flex-direction:column;max-height:35%;margin-top:34px;margin-bottom:24px;width:100%;flex:0 0 auto!important}:host *{box-sizing:border-box}:host .psp-computed-expression-widget__body{margin-bottom:0}:host .psp-computed-expression-widget__container{display:flex;flex-direction:column}:host .psp-computed-expression-widget__container.row{align-items:center;flex-direction:row}:host .psp-computed-expression-widget__container:first-of-type{margin-bottom:0}:host .psp-computed-expression-widget__action{margin-bottom:10px}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-close{color:#999;display:flex;font-family:var(--column-close--font-family,inherit);font-size:16px;width:20px;min-width:20px;margin-top:-2px;height:0}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-close:before{font-feature-settings:"liga";content:var(--column-close--before, "x")}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-close:hover{cursor:pointer}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-title{display:flex;margin-left:34px;margin-top:3px;font-size:12px;color:var(--color,#666)}:host .psp-computed-expression-widget__content{align-items:center;display:flex;flex-direction:column;margin-top:5px}:host .psp-computed-expression-widget__content.psp-computed-expression-widget__content--absolute{position:absolute}:host .psp-computed-expression-widget__content.psp-computed-expression-widget__content--nomargin{margin-top:0;position:relative}:host #psp-computed-expression-widget-actions{display:flex;justify-content:flex-end;margin-left:20px;margin-top:12px}:host .psp-computed-expression-widget__label{color:var(--color,#a9a9a9);font-size:10px;margin-top:5px;max-width:100%}:host .psp-computed-expression-widget__label.psp-computed-expression-widget__error{background-color:#cb4549;box-sizing:border-box;color:#fff!important;display:none;position:absolute;z-index:10000;max-height:75px;padding:10px;overflow-x:hidden;overflow-y:scroll;top:100%;width:100%;word-break:break-word}:host .psp-computed-expression-widget__button{border-radius:0;border-bottom:1px solid #ccc;border-left:0;border-right:0;border-top:0;font-size:12px;margin-left:6px;padding:2px 5px}:host .psp-computed-expression-widget__button:hover{cursor:pointer}:host .psp-computed-expression-widget__button[disabled]{background:#666!important;color:#a0a0a0!important;cursor:not-allowed;border-bottom-color:#000!important;opacity:.5}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-remove{background:#e76056;border-bottom-color:#bf4d45;color:#fff;display:none}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-remove:active{background:#bf4d45;border-bottom-color:#9d3f39}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-save{background:#0171d2;border-bottom-color:#0160b1;color:#fff;height:22px}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-save:active{background:#0160b1;border-bottom-color:#014986}',""])},function(t,e){t.exports='\x3c!--\r\n \r\n Copyright (c) 2017, the Perspective Authors.\r\n \r\n This file is part of the Perspective library, distributed under the terms of\r\n the Apache License 2.0. The full license can be found in the LICENSE file.\r\n\r\n--\x3e\r\n\r\n<template id="perspective-viewer">\r\n\r\n <div id="app">\r\n <div id="menubar">\r\n <div id="copy_button" class="noselect button" title="Copy CSV"></div>\r\n <div id="download_button" class="noselect button" title="Download CSV"></div>\r\n <div id="reset_button" class="noselect button" title="Reset Viewer"></div>\r\n </div>\r\n <div id=\'side_panel\' class="column fixed noselect">\r\n <div id="vis_selector_container">\r\n <select id="vis_selector">\r\n </select>\r\n </div>\r\n <div id="columns_container" style="visibility: hidden">\r\n <ul id=\'active_columns\'></ul>\r\n <div id="sub_columns">\r\n <ul id=\'inactive_columns\'></ul>\r\n <div id="side_panel__actions" style="visibility: hidden">\r\n <div id="add-computed-expression" class="side_panel-action"><span class="psp-icon psp-icon__add"></span><span class="psp-title__columnName">New Column</span></div>\r\n </div>\r\n </div>\r\n <perspective-computed-expression-widget></perspective-computed-expression-widget>\r\n </div>\r\n <div id="resize_bar"></div>\r\n </div>\r\n <div class="column noselect">\r\n <div id=\'top_panel\'>\r\n <div class="rrow">\r\n <div id="row_pivots">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for="row-pivots"></ul>\r\n <label for="row_pivots"></label>\r\n </div>\r\n </div>\r\n </div>\r\n <span id="transpose_button" class="rrow centered" title="Transpose Pivots">&#x21C4;</span>\r\n <div class="rrow">\r\n <div id="column_pivots">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for="column-pivots"></ul>\r\n <label for="column_pivots"></label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="rrow">\r\n <div id="sort">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for="sort"></ul>\r\n <label for="sort"></label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="rrow" style=\'flex-grow:3;height:auto;flex:1 1 400px;max-width:none\'>\r\n <div id="filters">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for=\'filters\'></ul>\r\n <label for="filters"></label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div id="pivot_chart_container">\r\n <div class="plugin_information plugin_information--warning hidden" id="plugin_information--size">\r\n <span class="plugin_information__text" id="plugin_information_count">Estimated rendering</span>\r\n <span class="plugin_information__actions">\r\n <span class="plugin_information__action">Render all points</span>\r\n <span class="plugin_information__action--close" id="close_button"></span>\r\n </span>\r\n </div>\r\n <div id="pivot_chart"></div>\r\n </div>\r\n </div>\r\n\r\n <div id="config_button" class="noselect button" title="Right click for additional options"></div>\r\n\r\n <div id=\'drop_target\'>\r\n <div id=\'drop_target_inner\'>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</template>'},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,':host #app #top_panel #row_pivots label:before{content:var(--row_pivots--before, "Row Pivots")}:host #app #top_panel #column_pivots label:before{content:var(--column_pivots--before, "Column Pivots")}:host #app #top_panel #sort label:before{content:"Sort"}:host #app #top_panel #filters label:before{content:"Filter"}:host #app #side_panel #active_columns perspective-row:before{font-size:10px;margin-left:var(--column_selector--width,20px);left:1px;padding:var(--column_type--padding,0 0 0 5px);color:var(--inactive--color,#666);position:absolute;margin-top:-15px}:host:hover #config_button{opacity:1}#config_button{background:0 0;opacity:1!important}.button{padding:var(--button--padding,12px 14px 24px 8px)}[settings=true] #config_button{opacity:1!important}@keyframes expand{from{opacity:0}}:host{position:relative;display:inline-block;overflow:hidden;word-wrap:normal;--highcharts-full--gradient:linear-gradient(#4d342f 0%, #e4521b 22.5%, #feeb65 42.5%, #f0f0f0 50%, #dcedc8 57.5%, #42b3d5 67.5%, #1a237e 100%);--highcharts-positive--gradient:linear-gradient(#dcedc8 0%, #42b3d5 35%, #1a237e 100%);--highcharts-negative--gradient:linear-gradient(#feeb65 100%, #e4521b 70%, #4d342f 0%);--hypergrid-tree-header--background:#fff;--hypergrid-tree-header--color:#666;--hypergrid-header--background:#fff;--hypergrid-separator--color:#666;--hypergrid-header--color:#666;--hypergrid-positive--color:#1078d1;--hypergrid-negative--color:#ff8888;--hypergrid--font-size:12px;--hypergrid-header--font-size:12px;--hypergrid--font-family:Helvetica,Arial,sans-serif;--hypergrid-header--font-family:Helvetica,Arial,sans-serif;--hypergrid-row-hover--background:#f6f6f6;--hypergrid-row-hover--color:#666;--hypergrid-cell-hover--background:#eeeeee;--hypergrid-cell-hover--color:#666;--integer--hypergrid--text-align:right;--float--hypergrid--text-align:right;--d3fc-series:rgba(31, 119, 180, 0.5);--d3fc-series-1:#0366d6;--d3fc-series-2:#ff7f0e;--d3fc-series-3:#2ca02c;--d3fc-series-4:#d62728;--d3fc-series-5:#9467bd;--d3fc-series-6:#8c564b;--d3fc-series-7:#e377c2;--d3fc-series-8:#7f7f7f;--d3fc-series-9:#bcbd22;--d3fc-series-10:#17becf;--d3fc-full--gradient:linear-gradient(#4d342f 0%, #e4521b 22.5%, #feeb65 42.5%, #f0f0f0 50%, #dcedc8 57.5%, #42b3d5 67.5%, #1a237e 100%);--d3fc-positive--gradient:linear-gradient(#dcedc8 0%, #42b3d5 35%, #1a237e 100%);--d3fc-negative--gradient:linear-gradient(#feeb65 100%, #e4521b 70%, #4d342f 0%)}:host #pivot_chart{position:absolute;width:100%;height:100%;display:grid;justify-content:stretch}:host .hidden{display:none}:host .psp-icon{color:#999}:host .psp-icon:hover{cursor:pointer}:host .psp-icon__add{display:flex;width:20px;min-width:20px;margin-top:-2px;height:0;font-family:var(--column-add--font-family,inherit)}:host .psp-icon__add:before{font-feature-settings:"liga";content:var(--column-add--before, "+")}:host .psp-title__columnName{display:flex;margin-left:34px;margin-top:3px;font-size:12px;color:#666}:host .side_panel-action:hover{cursor:pointer}:host *{box-sizing:border-box;line-height:1.42857143}:host #app{display:flex;position:relative;width:100%;height:100%}:host #app.hide_message #drop_target{display:none}:host .chart{padding:15px}:host #pivot_chart_container{flex-grow:1;position:relative;border:var(--plugin--border,none);overflow:hidden}:host .config{display:flex}:host #column_pivots #psp_row,:host #filters #psp_row,:host #row_pivots #psp_row,:host #sort #psp_row{display:inline}:host ul{min-height:20px;padding:0;margin:0;font-size:12px}:host #active_columns perspective-row{animation:.3s ease-out expand;--column-selector--color:var(--active--color, #999);--is_visible--before:var(--active-column-selector--content, "\\25CF")}:host #inactive_columns perspective-row{animation:.3s ease-out expand;--column-selector--color:var(--inactive-column-selector--color, #999);--is_visible--before:var(--inactive-column-selector--content, "\\25CB");--row_draggable--animation:none;opacity:var(--inactive-column--opacity,1);transition:opacity .3s}:host #inactive_columns perspective-row:hover{transition:none;opacity:1}:host #top_panel perspective-row{animation:.3s ease-out expand;--column-name--flex:1;padding:0 10px 0 0;margin-bottom:-1px;display:var(--top-panel-row--display,inline-block);--psp_row-display:inline-block}:host #active_columns,:host #inactive_columns{list-style:none;padding:0;width:100%;margin:var(--column-container--margin,8px 0 0 0);overflow-y:overlay;overflow-x:hidden;position:relative}:host #inactive_columns perspective-row.active{--row_draggable--margin:0px 0px 0px 10px;opacity:0;height:0!important;overflow:hidden}:host .columns_horizontal #sub_columns.collapse #side_panel__actions{margin-top:0}:host #sub_columns{min-height:33.3%;flex-shrink:100000;display:flex;flex-direction:column;overflow-x:hidden;width:100%}:host #sub_columns.collapse{flex-shrink:0;min-height:64px}:host #sub_columns.collapse #inactive_columns{display:none}:host .column{display:flex;list-style:none;flex-direction:column;flex:1}:host .rrow{display:flex;flex-grow:1;min-height:24px;align-items:center;max-width:400px;list-style:none;min-width:140px;margin:var(--column-drop-container--margin,5px 10px 0 0)}:host .rrow>div{display:flex;min-height:24px;flex-direction:column;justify-content:flex-end}:host #top_panel>.rrow>*{width:100%;padding:12px 0;margin:-12px 0}:host .rrow #psp_row{white-space:nowrap}:host #sort perspective-row{--sort_order-display:inline;--sort_order-padding:0 0 0 4px}:host #sort perspective-row[sort-order=asc]{--row-sort-order--before:var(--sort-order-asc--before, "\\2191")}:host #sort perspective-row[sort-order=desc]{--row-sort-order--before:var(--sort-order-desc--before, "\\2193")}:host #sort perspective-row[sort-order=none]{--row-sort-order--before:var(--sort-order-none--before, "-")}:host #sort perspective-row[sort-order="asc abs"]{--row-sort-order--before:var(--sort-order-asc-abs--before, "\\21E7")}:host #sort perspective-row[sort-order="desc abs"]{--row-sort-order--before:var(--sort-order-desc-abs--before, "\\21E9")}:host #sort perspective-row[sort-order="col asc"]{--row-sort-order--before:var(--sort-order-col-asc--before, "\\2192")}:host #sort perspective-row[sort-order="col desc"]{--row-sort-order--before:var(--sort-order-col-desc--before, "\\2190")}:host #sort perspective-row[sort-order="col asc abs"]{--row-sort-order--before:var(--sort-order-col-asc-abs--before, "\\21E8")}:host #sort perspective-row[sort-order="col desc abs"]{--row-sort-order--before:var(--sort-order-col-desc-abs--before, "\\21E6")}:host #top_panel perspective-row::after{content:","}:host #top_panel perspective-row:last-child::after{display:none;content:""!important}:host label{white-space:nowrap;display:inline-block;vertical-align:middle;margin-bottom:0}:host #drop_target{position:absolute;left:0;top:0;right:0;bottom:0;padding:30px}:host #drop_target_inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host #drop_target_inner h3{font-weight:300}:host #config_button{position:absolute;top:0;left:0;opacity:0;display:flex;align-items:center;justify-content:center;transition:opacity .2s ease-out}:host #config_button:hover{color:var(--active--color,inherit)}:host .button{cursor:pointer;font-size:16px;font-weight:400}:host select::-ms-expand{display:none}:host select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:var(--select--background,url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNC45IDEwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0LjkgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojQUFBQUFBO30KPC9zdHlsZT4KPHRpdGxlPmFycm93czwvdGl0bGU+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMS40LDQuNyAyLjUsMy4yIDMuNSw0LjcgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMy41LDUuMyAyLjUsNi44IDEuNCw1LjMgIi8+Cjwvc3ZnPg==) no-repeat 95% 50%);background-color:#fff;color:inherit;border-radius:5px;height:24px;padding:var(--select--padding,0 0 0 6px);font-size:12px;font-family:inherit}:host input{padding:0 10px}:host .centered{display:flex;align-items:center;justify-content:center}:host #top_panel{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:var(--top_panel--padding,5px 0 10px 0);max-width:1000px;z-index:1}:host #side_panel{position:relative;flex:0 0 auto;padding:var(--side_panel--padding,10px 10px 0 11px)}:host #side_panel>div{display:flex}:host #vis_selector_container{min-height:29px;margin-left:var(--column_selector--width,20px);overflow:hidden}:host #vis_selector{flex-grow:1}:host #transpose_button{cursor:pointer;min-width:5px;max-width:5px;flex-grow:0;color:#999;font-family:Arial;font-size:12px}:host #transpose_button:hover{color:var(--active--color,inherit)}:host #resize_bar{position:absolute;top:0;right:0;bottom:0;width:8px;cursor:col-resize}:host ::-webkit-scrollbar{width:8px;height:8px}:host :hover::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3)}:host ::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,0)}:host ::-webkit-scrollbar-corner{background-color:rgba(0,0,0,0)}',""])},function(t,e,n){(t.exports=n(7)(!1)).push([t.i,'.psp-text-field{position:relative;background-color:var(--column-drop-container--background,#fff);border-width:0 0 1px;border-style:solid;border-color:var(--inactive--color,#ccc);display:flex;flex-direction:column;justify-content:flex-end;min-height:24px;transition:border-color .3s ease-out}:host(.dragging) .psp-text-field.dropping{border-bottom-width:2px;border-style:solid;border-color:var(--active--color,#1a7da1)}:host(.dragging) .psp-text-field{border-bottom-width:1px;border-style:solid;border-color:var(--active--color,#1a7da1)}.psp-text-field>.psp-text-field__input{border:0;line-height:20px;vertical-align:bottom;padding-bottom:0;display:none}.psp-text-field__input+label{height:var(--column--height,auto);line-height:17px;box-sizing:border-box;color:var(--inactive--color,#ccc);font-weight:400;white-space:nowrap;padding:var(--column-drop-container--padding,0 0 2px 10px);font-size:12px;display:inline-block;transition:font-size .3s,margin .3s}.dropping .psp-text-field__input,.psp-text-field__input:not(:empty){display:block!important}.dropping .psp-text-field__input::after{content:"|";width:0;overflow:visible;margin-top:-1px;position:absolute}.dropping *{pointer-events:none}.dropping .psp-text-field label,.psp-text-field__input:not(:empty)+label{position:absolute;top:0;margin:var(--column-drop-label--margin,0);font-size:var(--column-drop-label--font-size,12px);display:var(--column-drop-label--display,none)}.dropping perspective-row.inserting{border-top:25px solid transparent}.dropping perspective-row.postserting{border-bottom:25px solid transparent}:host perspective-row{height:var(--column--height,21px);--row_draggable-height:var(--column--height, 21px)}:host([row-pivots]) #active_columns perspective-row{height:var(--active-column--height,41px);min-height:var(--active-column--height,41px);--row_draggable-height:var(--active-column--height, 41px);--column_aggregate-display:inline-block;--is_visible--height:var(--active-column-selector--height, auto)}:host{font-family:Arial,sans-serif;background-color:#eee;color:#333}:host #app.columns_horizontal #columns_container{flex-direction:row-reverse}:host #app.columns_horizontal #active_columns,:host #app.columns_horizontal #inactive_columns{display:flex;flex-direction:column;flex:0 1 auto;width:100%}:host #app.columns_horizontal #inactive_columns{flex:1 1 auto}:host #app.columns_horizontal #sub_columns{flex-shrink:1}:host #app.columns_horizontal #sub_columns perspective-row{--column_name-margin:0 25px 0 0}:host #app.columns_horizontal #side_panel #divider{display:none}:host #app.columns_horizontal perspective-computed-expression-widget{max-height:none;margin-right:24px;width:auto}:host #side_panel perspective-row{--name-before-display:inline-block;--is_visible-display:inline-block;--row_draggable-padding:0px 10px 0px 0px;--row_close-display:none;--column_name-max-width:180px}:host #top_panel perspective-row{--row_draggable-display:inline-flex;--row-draggable--flex-direction:row;--row-draggable--align-items:center}:host #columns_container{flex-direction:column;height:calc(100% - 29px)}:host #columns_container #active_columns{flex:0 1 auto}:host #columns_container #active_columns perspective-row{margin-bottom:2px;--row_draggable-background-color:var(--column--background, white);--row_draggable-border-color:var(--inactive--color, #ccc);--row_draggable-border-width:0 0 1px 0;--row_draggable-overflow:hidden;--row_draggable--justify-content:space-evenly}:host #columns_container #active_columns perspective-row:last-child{--row_draggable-border-width:var(--row_draggable-border-last-child-width, 0 0 1px 0)}:host #columns_container #active_columns perspective-row[drop-target]{--row_draggable_children-opacity:0}:host #columns_container #active_columns perspective-row.null-column{--row_draggable_children-opacity:0;pointer-events:none}:host #columns_container #active_columns.one_lock perspective-row:first-child,:host #columns_container #active_columns.two_lock perspective-row:first-child{--active--color:#ccc;--is_visible--cursor:normal}:host #columns_container #active_columns.two_lock perspective-row:nth-child(2){--active--color:#ccc;--is_visible--cursor:normal}:host #columns_container #active_columns perspective-row:only-child{--active--color:#ccc;--is_visible--cursor:normal}:host #columns_container #active_columns,:host #columns_container #inactive_columns{border:none!important}:host ul{transition:background-color .2s,border-color .2s;outline:0;border-style:solid;border-color:var(--inactive--color,#ccc);font-size:12px;padding:var(--column-drop-container--padding,0 10px 0 10px);border-width:0 0 1px}:host #side_panel #side_panel__actions{display:flex;flex-direction:column;flex-shrink:1000;justify-content:flex-start;position:relative;overflow-y:hidden;width:100%;padding-top:20px;margin:var(--column-container--margin,8px);min-height:36px}:host #side_panel #side_panel__actions button.side_panel-action{align-items:center;align-content:center;background:0 0;border:none;display:flex;flex-direction:row;font-size:12px;padding-right:10px;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host #side_panel #side_panel__actions button.side_panel-action span{margin-left:5px;font-size:15px}:host #side_panel #side_panel__actions button.side_panel-action:hover{cursor:pointer}:host .noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host svg .highcharts-legend-box{fill:none}:host #pivot_chart{background-color:var(--plugin--background,#fff)}:host #drop_target{border:var(--plugin--border,none);background:var(--plugin--background,#fff)}:host #pivot_chart_container{box-shadow:var(--plugin--box-shadow,none)}:host #filters perspective-row{margin:0;--filter_operator-display:inline-block;--filter_operand-display:inline-block}:host .plugin_information{color:var(--warning--color,inherit);display:flex;position:absolute;flex-direction:row;justify-content:flex-start;padding:.5rem;width:100%;z-index:10000;transition:opacity .3s ease-out;opacity:1}:host .plugin_information.hidden{display:none;opacity:0}:host .plugin_information.plugin_information--warning{background:#ffca28}:host .plugin_information .plugin_information__text{font-size:12px;margin-right:.25rem;display:flex;flex-wrap:wrap;align-items:center}:host .plugin_information .plugin_information__text:before{content:var(--overflow_hint--before);font-family:var(--overflow_hint--font-family);color:var(--overflow_hint--color);padding:var(--overflow_hint--padding);font-size:16px}:host .plugin_information .plugin_information__action{font-size:12px;text-decoration:underline;cursor:pointer;margin-right:.25rem}:host .plugin_information .plugin_information__action--close{margin-left:12px;display:inline-flex;font-size:12px;cursor:pointer}:host .plugin_information .plugin_information__actions{margin-left:auto;display:flex;align-items:center;flex-direction:row;justify-content:flex-start}:host .plugin_information .plugin_information--overflow-hint-percent{font-weight:700}:host .plugin_information .plugin_information--overflow-hint{white-space:nowrap}:host #drop_target_inner h3{color:#aaa;font-weight:300}:host #config_button,:host #copy_button,:host #download_button,:host #reset_button{font-weight:400;font-family:var(--button--font-family,Arial);color:var(--inactive--color,#999);font-size:var(--button--font-size,16px);transition:opacity .3s;overflow:hidden}:host #config_button:hover,:host #copy_button:hover,:host #download_button:hover,:host #reset_button:hover{color:var(--active--color,inherit)}:host #config_button:before{font-feature-settings:"liga";content:var(--settings-button--content, "\\1F527")}:host #reset_button:before{font-feature-settings:"liga";content:var(--reset_button--before, "Reset")}:host #close_button:before{font-family:var(--button--font-family,Arial);font-feature-settings:"liga";content:var(--close_button--before, "Close")}:host #download_button:before{font-feature-settings:"liga";content:var(--download_button--before, "Save")}:host #copy_button:before{font-feature-settings:"liga";content:var(--copy_button--before, "Copy")}:host #menubar{display:none;flex-direction:column;padding-top:55px}:host #app.show_menu #menubar{display:flex}:host select{border-radius:0;background-color:var(--select--background-color,#fff);border-style:solid;border-color:var(--inactive--color,#ccc);border-width:0 0 1px}:host select:focus{outline:0}:host input{border-style:solid;border-color:var(--inactive--color,#ccc);border-width:0 0 1px}:host input::placeholder{color:var(--inactive--color,#ccc)}:host option[value=""]{color:#fff!important}:host #app{background-color:inherit}:host ::-webkit-scrollbar,:host ::shadow ::-webkit-scrollbar{width:12px}:host ::-webkit-scrollbar-thumb,:host ::shadow ::-webkit-scrollbar-thumb{background:#ccc}:host ::-webkit-scrollbar-track,:host ::shadow ::-webkit-scrollbar-track{background:0 0}',""])},function(t,e){t.exports=p},function(t,e){t.exports=h},function(t,e){t.exports=d},function(t,e){t.exports=f},function(t,e,n){n(8),n(3);const r="dnd-poly-dragstart-pending",i="dnd-poly-dragstart-cancel",o=["none","copy","copyLink","copyMove","link","linkMove","move","all"],s=["none","copy","move","link"],a=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}();function c(t){return t&&t.tagName}function l(t,e,n){void 0===n&&(n=!0),document.addEventListener(t,e,!!a&&{passive:n})}function u(t,e){document.removeEventListener(t,e)}function p(t,e,n,r){void 0===r&&(r=!1);const i=a?{passive:!0,capture:r}:r;return t.addEventListener(e,n,i),{off:function(){t.removeEventListener(e,n,i)}}}function h(t){return 0===t.length?0:t.reduce((function(t,e){return e+t}),0)/t.length}function d(t,e){for(let n=0;n<t.changedTouches.length;n++)if(t.changedTouches[n].identifier===e)return!0;return!1}function f(t,e,n){const r=[],i=[];for(let n=0;n<e.touches.length;n++){const o=e.touches[n];r.push(o[t+"X"]),i.push(o[t+"Y"])}n.x=h(r),n.y=h(i)}const _=["","-webkit-"];function m(t,e,n,r,i){void 0===i&&(i=!0);let o=e.x,s=e.y;r&&(o+=r.x,s+=r.y),i&&(o-=parseInt(t.offsetWidth,10)/2,s-=parseInt(t.offsetHeight,10)/2);const a="translate3d("+o+"px,"+s+"px, 0)";for(let e=0;e<_.length;e++){const r=_[e]+"transform";t.style[r]=a+" "+n[e]}}const g=function(){function t(t,e){this._dataStore=t,this._setDragImageHandler=e,this._dropEffect=s[0]}return Object.defineProperty(t.prototype,"dropEffect",{get:function(){return this._dropEffect},set:function(t){0!==this._dataStore.mode&&o.indexOf(t)>-1&&(this._dropEffect=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"types",{get:function(){if(0!==this._dataStore.mode)return Object.freeze(this._dataStore.types)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectAllowed",{get:function(){return this._dataStore.effectAllowed},set:function(t){2===this._dataStore.mode&&o.indexOf(t)>-1&&(this._dataStore.effectAllowed=t)},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if(2===this._dataStore.mode){if(t.indexOf(" ")>-1)throw new Error("illegal arg: type contains space");this._dataStore.data[t]=e,-1===this._dataStore.types.indexOf(t)&&this._dataStore.types.push(t)}},t.prototype.getData=function(t){if(1===this._dataStore.mode||2===this._dataStore.mode)return this._dataStore.data[t]||""},t.prototype.clearData=function(t){if(2===this._dataStore.mode){if(t&&this._dataStore.data[t]){delete this._dataStore.data[t];const e=this._dataStore.types.indexOf(t);return void(e>-1&&this._dataStore.types.splice(e,1))}this._dataStore.data={},this._dataStore.types=[]}},t.prototype.setDragImage=function(t,e,n){2===this._dataStore.mode&&this._setDragImageHandler(t,e,n)},t}();function v(t,e){return t?t===o[0]?s[0]:0===t.indexOf(o[1])||t===o[7]?s[1]:0===t.indexOf(o[4])?s[3]:t===o[6]?s[2]:s[1]:3===e.nodeType&&"A"===e.tagName?s[3]:s[1]}function y(t,e,n,r,i,o,s){void 0===o&&(o=!0),void 0===s&&(s=null),console.log("dnd-poly: dispatching "+t);const a=function(t,e,n,r,i,o,s){void 0===s&&(s=null);const a=e.changedTouches[0],c=new Event(n,{bubbles:!0,cancelable:r});c.dataTransfer=o,c.relatedTarget=s,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.pageX=a.pageX,c.pageY=a.pageY;const l=t.getBoundingClientRect();return c.offsetX=c.clientX-l.left,c.offsetY=c.clientY-l.top,c}(e,n,t,o,document.defaultView,i,s),c=!e.dispatchEvent(a);return r.mode=0,c}function b(t,e){if(!t||t===o[7])return e;if(e===s[1]){if(0===t.indexOf(s[1]))return s[1]}else if(e===s[3]){if(0===t.indexOf(s[3])||t.indexOf("Link")>-1)return s[3]}else if(e===s[2]&&(0===t.indexOf(s[2])||t.indexOf("Move")>-1))return s[2];return s[0]}const w=function(){function t(t,e,n,r){this._initialEvent=t,this._config=e,this._sourceNode=n,this._dragOperationEndedCb=r,this._dragOperationState=0,this._immediateUserSelection=null,this._currentDropTarget=null,console.log("dnd-poly: setting up potential drag operation.."),this._lastTouchEvent=t,this._initialTouch=t.changedTouches[0],this._touchMoveHandler=this._onTouchMove.bind(this),this._touchEndOrCancelHandler=this._onTouchEndOrCancel.bind(this),l("touchmove",this._touchMoveHandler,!1),l("touchend",this._touchEndOrCancelHandler,!1),l("touchcancel",this._touchEndOrCancelHandler,!1)}return t.prototype._setup=function(){const t=this;console.log("dnd-poly: starting drag and drop operation"),this._dragOperationState=1,this._currentDragOperation=s[0],this._dragDataStore={data:{},effectAllowed:void 0,mode:3,types:[]},this._currentHotspotCoordinates={x:null,y:null},this._dragImagePageCoordinates={x:null,y:null};let e=this._sourceNode;if(this._dataTransfer=new g(this._dragDataStore,(function(n,r,i){e=n,"number"!=typeof r&&"number"!=typeof i||(t._dragImageOffset={x:r||0,y:i||0})})),this._dragDataStore.mode=2,this._dataTransfer.dropEffect=s[0],y("dragstart",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer))return console.log("dnd-poly: dragstart cancelled"),this._dragOperationState=3,this._cleanup(),!1;f("page",this._lastTouchEvent,this._dragImagePageCoordinates);const n=this._config.dragImageSetup(e);var r;if(this._dragImageTransforms=(r=n,_.map((function(t){const e=r.style[t+"transform"];return e&&"none"!==e?e.replace(/translate\(\D*\d+[^,]*,\D*\d+[^,]*\)\s*/g,""):""}))),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.zIndex="999999",n.classList.add("dnd-poly-drag-image"),n.classList.add("dnd-poly-icon"),this._dragImage=n,!this._dragImageOffset)if(this._config.dragImageOffset)this._dragImageOffset={x:this._config.dragImageOffset.x,y:this._config.dragImageOffset.y};else if(this._config.dragImageCenterOnTouch){const t=getComputedStyle(e);this._dragImageOffset={x:0-parseInt(t.marginLeft,10),y:0-parseInt(t.marginTop,10)}}else{const t=e.getBoundingClientRect(),n=getComputedStyle(e);this._dragImageOffset={x:t.left-this._initialTouch.clientX-parseInt(n.marginLeft,10)+t.width/2,y:t.top-this._initialTouch.clientY-parseInt(n.marginTop,10)+t.height/2}}return m(this._dragImage,this._dragImagePageCoordinates,this._dragImageTransforms,this._dragImageOffset,this._config.dragImageCenterOnTouch),document.body.appendChild(this._dragImage),this._iterationIntervalId=window.setInterval((function(){t._iterationLock?console.log("dnd-poly: iteration skipped because previous iteration hast not yet finished."):(t._iterationLock=!0,t._dragAndDropProcessModelIteration(),t._iterationLock=!1)}),this._config.iterationInterval),!0},t.prototype._cleanup=function(){console.log("dnd-poly: cleanup"),this._iterationIntervalId&&(clearInterval(this._iterationIntervalId),this._iterationIntervalId=null),u("touchmove",this._touchMoveHandler),u("touchend",this._touchEndOrCancelHandler),u("touchcancel",this._touchEndOrCancelHandler),this._dragImage&&(this._dragImage.parentNode.removeChild(this._dragImage),this._dragImage=null),this._dragOperationEndedCb(this._config,this._lastTouchEvent,this._dragOperationState)},t.prototype._onTouchMove=function(t){const e=this;if(!1!==d(t,this._initialTouch.identifier)){if(this._lastTouchEvent=t,0===this._dragOperationState){let e=void 0;if(this._config.dragStartConditionOverride)try{e=this._config.dragStartConditionOverride(t)}catch(t){console.error("dnd-poly: error in dragStartConditionOverride hook: "+t),e=!1}else e=1===t.touches.length;return e?void(!0===this._setup()&&(this._initialEvent.preventDefault(),t.preventDefault())):void this._cleanup()}if(console.log("dnd-poly: moving draggable.."),t.preventDefault(),f("client",t,this._currentHotspotCoordinates),f("page",t,this._dragImagePageCoordinates),this._config.dragImageTranslateOverride)try{let n=!1;if(this._config.dragImageTranslateOverride(t,{x:this._currentHotspotCoordinates.x,y:this._currentHotspotCoordinates.y},this._immediateUserSelection,(function(t,r){e._dragImage&&(n=!0,e._currentHotspotCoordinates.x+=t,e._currentHotspotCoordinates.y+=r,e._dragImagePageCoordinates.x+=t,e._dragImagePageCoordinates.y+=r,m(e._dragImage,e._dragImagePageCoordinates,e._dragImageTransforms,e._dragImageOffset,e._config.dragImageCenterOnTouch))})),n)return}catch(t){console.log("dnd-poly: error in dragImageTranslateOverride hook: "+t)}m(this._dragImage,this._dragImagePageCoordinates,this._dragImageTransforms,this._dragImageOffset,this._config.dragImageCenterOnTouch)}},t.prototype._onTouchEndOrCancel=function(t){if(!1!==d(t,this._initialTouch.identifier)){if(this._config.dragImageTranslateOverride)try{this._config.dragImageTranslateOverride(void 0,void 0,void 0,(function(){}))}catch(t){console.log("dnd-poly: error in dragImageTranslateOverride hook: "+t)}0!==this._dragOperationState?(t.preventDefault(),this._dragOperationState="touchcancel"===t.type?3:2):this._cleanup()}},t.prototype._dragAndDropProcessModelIteration=function(){const t=this,e=this._currentDragOperation;this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0];const n=y("drag",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer);if(n&&(console.log("dnd-poly: drag event cancelled."),this._currentDragOperation=s[0]),n||2===this._dragOperationState||3===this._dragOperationState)return this._dragOperationEnded(this._dragOperationState)?void function(t,e,n,r){const i=getComputedStyle(t);if("hidden"===i.visibility||"none"===i.display)return console.log("dnd-poly: source node is not visible. skipping snapback transition."),void r();e.classList.add("dnd-poly-snapback");const o=getComputedStyle(e),s=parseFloat(o.transitionDuration);if(isNaN(s)||0===s)return console.log("dnd-poly: no transition used - skipping snapback"),void r();console.log("dnd-poly: starting dragimage snap back");const a=t.getBoundingClientRect(),c={x:a.left,y:a.top};c.x+=document.body.scrollLeft||document.documentElement.scrollLeft,c.y+=document.body.scrollTop||document.documentElement.scrollTop,c.x-=parseInt(i.marginLeft,10),c.y-=parseInt(i.marginTop,10);const l=parseFloat(o.transitionDelay),u=Math.round(1e3*(s+l));m(e,c,n,void 0,!1),setTimeout(r,u)}(this._sourceNode,this._dragImage,this._dragImageTransforms,(function(){t._finishDragOperation()})):void this._finishDragOperation();const r=this._config.elementFromPoint(this._currentHotspotCoordinates.x,this._currentHotspotCoordinates.y);console.log("dnd-poly: new immediate user selection is: "+r);const i=this._currentDropTarget;r!==this._immediateUserSelection&&r!==this._currentDropTarget&&(this._immediateUserSelection=r,null!==this._currentDropTarget&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0],y("dragexit",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1)),null===this._immediateUserSelection?(this._currentDropTarget=this._immediateUserSelection,console.log("dnd-poly: current drop target changed to null")):(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=v(this._dragDataStore.effectAllowed,this._sourceNode),y("dragenter",this._immediateUserSelection,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?(console.log("dnd-poly: dragenter default prevented"),this._currentDropTarget=this._immediateUserSelection,this._currentDragOperation=b(this._dataTransfer.effectAllowed,this._dataTransfer.dropEffect)):this._immediateUserSelection!==document.body&&(this._currentDropTarget=document.body))),i!==this._currentDropTarget&&c(i)&&(console.log("dnd-poly: current drop target changed."),this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0],y("dragleave",i,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1,this._currentDropTarget)),c(this._currentDropTarget)&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=v(this._dragDataStore.effectAllowed,this._sourceNode),!1===y("dragover",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?(console.log("dnd-poly: dragover not prevented on possible drop-target."),this._currentDragOperation=s[0]):(console.log("dnd-poly: dragover prevented."),this._currentDragOperation=b(this._dataTransfer.effectAllowed,this._dataTransfer.dropEffect))),console.log("dnd-poly: d'n'd iteration ended. current drag operation: "+this._currentDragOperation),e!==this._currentDragOperation&&this._dragImage.classList.remove("dnd-poly-"+e);const o="dnd-poly-"+this._currentDragOperation;this._dragImage.classList.add(o)},t.prototype._dragOperationEnded=function(t){console.log("dnd-poly: drag operation end detected with "+this._currentDragOperation);const e=this._currentDragOperation===s[0]||null===this._currentDropTarget||3===t;return e?c(this._currentDropTarget)&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0],y("dragleave",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1)):c(this._currentDropTarget)&&(this._dragDataStore.mode=1,this._dataTransfer.dropEffect=this._currentDragOperation,!0===y("drop",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?this._currentDragOperation=this._dataTransfer.dropEffect:this._currentDragOperation=s[0]),e},t.prototype._finishDragOperation=function(){console.log("dnd-poly: dragimage snap back transition ended"),this._dragDataStore.mode=3,this._dataTransfer.dropEffect=this._currentDragOperation,y("dragend",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1),this._dragOperationState=2,this._cleanup()},t}(),E={iterationInterval:150,tryFindDraggableTarget:function(t){let e=t.target;do{if(!1!==e.draggable){if(!0===e.draggable)return e;if(e.getAttribute&&"true"===e.getAttribute("draggable"))return e}}while((e=e.parentNode)&&e!==document.body)},dragImageSetup:function(t){const e=t.cloneNode(!0);return function t(e,n){if(1===e.nodeType){const t=getComputedStyle(e);for(let e=0;e<t.length;e++){const r=t[e];n.style.setProperty(r,t.getPropertyValue(r),t.getPropertyPriority(r))}if(n.style.pointerEvents="none",n.removeAttribute("id"),n.removeAttribute("class"),n.removeAttribute("draggable"),"CANVAS"===n.nodeName){const t=e,r=n,i=t.getContext("2d").getImageData(0,0,t.width,t.height);r.getContext("2d").putImageData(i,0,0)}}if(e.hasChildNodes())for(let r=0;r<e.childNodes.length;r++)t(e.childNodes[r],n.childNodes[r])}(t,e),e},elementFromPoint:function(t,e){return document.elementFromPoint(t,e)}};let O;function x(t,e){if(console.log("dnd-poly: global touchstart"),O)return void console.log("dnd-poly: drag operation already active");const n=E.tryFindDraggableTarget(t,e);if(n)try{O=new w(t,E,n,A)}catch(e){throw A(E,t,3),e}else console.log("dnd-poly: no draggable at touchstart coordinates")}function T(t){console.log("dnd-poly: setup delayed dragstart..");const e=t.target,n=t.composedPath(),o=function(t){console.log("dnd-poly: aborting delayed drag because of "+t.type),a.off(),c.off(),l.off(),u.off(),e&&e.dispatchEvent(new CustomEvent(i,{bubbles:!0,cancelable:!0})),clearTimeout(s)};e&&e.dispatchEvent(new CustomEvent(r,{bubbles:!0,cancelable:!0}));const s=window.setTimeout((function(){console.log("dnd-poly: starting delayed drag.."),a.off(),c.off(),l.off(),u.off(),x(t,n)}),E.holdToDrag),a=p(e,"touchend",o),c=p(e,"touchcancel",o),l=p(e,"touchmove",o),u=p(window,"scroll",o,!0)}function A(t,e,n){if(0===n&&(console.log("dnd-poly: Drag never started. Last event was "+e.type),t.defaultActionOverride))try{t.defaultActionOverride(e),e.defaultPrevented&&console.log("dnd-poly: defaultActionOverride has taken care of triggering the default action. preventing default on original event")}catch(t){console.log("dnd-poly: error in defaultActionOverride: "+t)}O=null}!function(t){if(t&&Object.keys(t).forEach((function(e){E[e]=t[e]})),!E.forceApply){const t=function(){const t={dragEvents:"ondragstart"in document.documentElement,draggable:"draggable"in document.documentElement,userAgentSupportingNativeDnD:void 0},e=!!window.chrome||/chrome/i.test(navigator.userAgent);return t.userAgentSupportingNativeDnD=!(/iPad|iPhone|iPod|Android/.test(navigator.userAgent)||e&&"ontouchstart"in document.documentElement),t}();if(t.userAgentSupportingNativeDnD&&t.draggable&&t.dragEvents)return!1}console.log("dnd-poly: Applying mobile drag and drop polyfill."),E.holdToDrag?(console.log("dnd-poly: holdToDrag set to "+E.holdToDrag),l("touchstart",T,!1)):l("touchstart",x,!1)}({tryFindDraggableTarget:function(t,e){const n=e||t.composedPath();for(let t of n){let e=t;do{if(!1!==e.draggable&&e.getAttribute&&"true"===e.getAttribute("draggable"))return e}while((e=e.parentNode)&&e!==document.body)}},elementFromPoint:function(t,e){for(let n of this._path)if(n.elementFromPoint){let r=n.elementFromPoint(t,e);if(r){for(;r.shadowRoot;)r=r.shadowRoot.elementFromPoint(t,e);return r}}},dragStartConditionOverride:function(t){return this._path=t.composedPath(),!0},holdToDrag:500})},function(t,e){t.exports=_},function(t,e,n){"use strict";n.r(e),n(8),n(25),n(3),n(26),n(27),n(28);var r=n(2),i=n(5),o=n(9),s=n.n(o),a=n(10),c=n.n(a),l=n(12),u=n.n(l),p=n(6),h=n.n(p),d=n(4),f=n(13),_=n.n(f),m=n(14),g=n.n(m),v=n(1);function y(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(y.prototype,HTMLElement.prototype),Object.setPrototypeOf(y,HTMLElement);const b=document.createElement("span");function w(t,e=0){b.innerHTML=t,document.body.appendChild(b);const n=`${Math.max(e,b.offsetWidth)+20}px`;return document.body.removeChild(b),n}b.style.visibility="hidden",b.style.fontFamily="monospace",b.style.fontSize="12px",b.style.position="absolute",Object(r.b)(_.a,{toString:()=>g.a+"\n"+u.a})(class extends y{set name(t){this.shadowRoot.querySelector("#name").innerHTML=this.getAttribute("name")}_option_template(t,e){return v.html`
4 <option value="${t}" data-desc="${e}">${e||t}</option>
5 `}_select_template(t,e){const n=h.a[t][e]||[],r=v.html`
6 <optgroup label="weighted mean">
7 ${this._weights.map(t=>this._option_template(JSON.stringify(["weighted mean",t]),t))}
8 </optgroup>
9 `,i="TYPE_AGGREGATES"===t&&("integer"===e||"float"===e);return v.html`
10 ${n.map(t=>this._option_template(t))} ${i?r:v.nothing}
11 `}set_weights(t){this._weights=t}set type(t){const e=this.shadowRoot.querySelector("#name"),n=this.getAttribute("type");if(!n)return;const r=Object(d.get_type_config)(n);r.type&&e.classList.add(r.type),e.classList.add(n);const i=this.shadowRoot.querySelector("#column_aggregate"),o=this.shadowRoot.querySelector("#filter_operator");Object(v.render)(this._select_template("TYPE_AGGREGATES",r.type||n),i),Object(v.render)(this._select_template("TYPE_FILTERS",r.type||n),o),this.hasAttribute("aggregate")?this.aggregate=this.getAttribute("aggregate"):this.aggregate=r.aggregate,this.hasAttribute("filter")&&(this.filter=this.getAttribute("filter"));const s=this.shadowRoot.querySelector("#filter_operand");this._callback=t=>this._update_filter(t),s.addEventListener("keyup",this._callback.bind(this))}choices(t){const e=this.shadowRoot.querySelector("#filter_operand"),n=this.shadowRoot.querySelector("#filter_operator"),r=new c.a(e,{label:this.getAttribute("name"),list:t,minChars:0,autoFirst:!0,filter:function(t,e){return c.a.FILTER_CONTAINS(t,e.match(/[^,]*$/)[0])},item:function(t,e){return c.a.ITEM(t,e.match(/[^,]*$/)[0])},replace:function(t){const e=this.input.value.match(/^.+,\s*|/)[0];"in"===n.value||"not in"===n.value?this.input.value=e+t+", ":this.input.value=e+t}});""===e.value&&r.evaluate(),e.focus(),this._filter_operand.addEventListener("focus",()=>{0===e.value.trim().length&&r.evaluate()}),e.addEventListener("awesomplete-selectcomplete",this._callback)}set filter(t){const e=this.shadowRoot.querySelector("#filter_operator"),n=JSON.parse(this.getAttribute("filter"));e.value!==n.operator&&(e.value=n.operator||Object(d.get_type_config)(this.getAttribute("type")).filter_operator),e.style.width=w(e.value);const r=this.shadowRoot.querySelector("#filter_operand"),i=n.operand?n.operand.toString():"";this._initialized||(r.value=i),e.value===h.a.FILTER_OPERATORS.isNull||e.value===h.a.FILTER_OPERATORS.isNotNull?r.style.display="none":(r.style.display="inline-block",r.style.width=w(i,30))}set aggregate(t){const e=this.shadowRoot.querySelector("#column_aggregate"),n=this.getAttribute("aggregate");if(e.value!==n&&this.hasAttribute("type")){const t=this.getAttribute("type");e.value=n||Object(d.get_type_config)(t).aggregate}this._blur_agg_dropdown()}set computed_column(t){}_get_computed_data(){const t=JSON.parse(this.getAttribute("computed_column"));return{column_name:t.column_name,input_columns:t.input_columns,input_type:t.input_type,computation:t.computation,type:t.type}}_update_filter(t){const e=this.shadowRoot.querySelector("#filter_operand"),n=this.shadowRoot.querySelector("#filter_operator");let r=e.value;switch(this.getAttribute("type")){case"float":r=parseFloat(r);break;case"integer":r=parseInt(r);break;case"boolean":r=r.toLowerCase().indexOf("true")>-1}n.value!==h.a.FILTER_OPERATORS.isIn&&n.value!==h.a.FILTER_OPERATORS.isNotIn||(r=r.split(",").map(t=>t.trim())),this.setAttribute("filter",JSON.stringify({operator:n.value,operand:r})),this.dispatchEvent(new CustomEvent("filter-selected",{detail:t}))}_set_data_transfer(t){if(this.hasAttribute("filter")){const{operator:e,operand:n}=JSON.parse(this.getAttribute("filter"));t.dataTransfer.setData("text",JSON.stringify([this.getAttribute("name"),e,n,this.getAttribute("type"),this.getAttribute("aggregate")]))}else t.dataTransfer.setData("text",JSON.stringify([this.getAttribute("name"),Object(d.get_type_config)(this.getAttribute("type")).filter_operator,void 0,this.getAttribute("type"),this.getAttribute("aggregate")]));this.dispatchEvent(new CustomEvent("row-drag"))}_register_ids(){this._li=this.shadowRoot.querySelector(".row_draggable"),this._visible=this.shadowRoot.querySelector(".is_visible"),this._row_close=this.shadowRoot.querySelector("#row_close"),this._agg_dropdown=this.shadowRoot.querySelector("#column_aggregate"),this._sort_order=this.shadowRoot.querySelector("#sort_order"),this._filter_operand=this.shadowRoot.querySelector("#filter_operand"),this._filter_operator=this.shadowRoot.querySelector("#filter_operator"),this._edit_computed_column_button=this.shadowRoot.querySelector("#row_edit"),this._column_aggregate_category=this.shadowRoot.querySelector("#column_aggregate_category")}_blur_agg_dropdown(){if(this._agg_dropdown.blur(),"["===this._agg_dropdown.value[0])for(const t of this._agg_dropdown.querySelectorAll("optgroup option")){const e=t.getAttribute("data-desc");t.innerHTML=`mean by ${e}`}}_focus_agg_dropdown(){for(const t of this._agg_dropdown.querySelectorAll("optgroup option")){const e=t.getAttribute("data-desc");t.innerHTML=`by ${e}`}}_register_callbacks(){this._li.addEventListener("dragstart",this._set_data_transfer.bind(this)),this._li.addEventListener("dragend",()=>{this.dispatchEvent(new CustomEvent("row-dragend"))}),this._visible.addEventListener("mousedown",t=>this.dispatchEvent(new CustomEvent("visibility-clicked",{detail:t}))),this._row_close.addEventListener("mousedown",t=>this.dispatchEvent(new CustomEvent("close-clicked",{detail:t}))),this._agg_dropdown.addEventListener("focus",this._focus_agg_dropdown.bind(this)),this._agg_dropdown.addEventListener("change",t=>{this._blur_agg_dropdown();const e=this._agg_dropdown.value;this.setAttribute("aggregate",e),this.dispatchEvent(new CustomEvent("aggregate-selected",{detail:t}))}),this._sort_order.addEventListener("click",t=>{this.dispatchEvent(new CustomEvent("sort-order",{detail:t}))});const t=s()(t=>this._update_filter(t),50);this._filter_operator.addEventListener("change",()=>{this._filter_operand.focus(),this._filter_operator.style.width=w(this._filter_operator.value),this.shadowRoot.querySelector("#filter_operand").style.width=w(""+this._filter_operand.value,30),t()}),this._edit_computed_column_button.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("perspective-computed-column-edit",{bubbles:!0,detail:this._get_computed_data()}))})}connectedCallback(){this._register_ids(),this._register_callbacks()}});var E,O=n(15),x=n.n(O),T=n(16),A=n.n(T);function S(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(S.prototype,HTMLElement.prototype),Object.setPrototypeOf(S,HTMLElement),Object(r.b)(x.a,A.a)((N=(E=class extends S{constructor(){super(),this.displayed=!1,this._selection_index=-1}connectedCallback(){this._register_ids(),this._register_callbacks()}render(t){this._details.style.display="none",this._container.classList.remove("show-details"),this._list.classList.remove("small"),this._selection_index>-1&&this._list.children[this._selection_index].setAttribute("aria-selected",!1),0!==t.length?(this.reposition(),this._selection_index=-1,this.display(),this._list.scrollTop=0,t.length<4&&this._list.classList.add("small"),Object(v.render)(t,this._list)):this.clear()}reposition(){console.warning("PerspectiveAutocompleteWidget.reposition has not been implemented.")}item_clicked(t){if(t.target&&(t.target.matches(".psp-autocomplete__item")||t.target.matches(".psp-autocomplete-item__label"))){const e=new CustomEvent("perspective-autocomplete-item-clicked",{detail:t,bubbles:!0});this.dispatchEvent(e)}}item_mouseover(t){t.target&&t.target.matches(".psp-autocomplete__item")&&this._render_details_panel(t.target)}item_mouseleave(t){t.target&&t.target.matches(".psp-autocomplete__item")&&this._render_details_panel(t.target)}get_selected_value(){if(-1!==this._selection_index)return this._list.children[this._selection_index].getAttribute("data-value")}clear(){this.hide(),this._selection_index=-1,this._container.removeAttribute("style"),this._container.classList.add("undocked"),Object(v.render)(v.nothing,this._list)}display(){this._container.style.display="flex",this.displayed=!0}hide(){this._container.style.display="none",this.displayed=!1}_next(){const t=this._list.children.length,e=this._selection_index<t-1?this._selection_index+1:t?0:-1;this._go_to(e)}_prev(){const t=this._list.children.length,e=this._selection_index-1,n=this._selection_index>-1&&-1!==e?e:t-1;this._go_to(n)}_go_to(t){const e=this._list.children;this._selection_index>-1&&e[this._selection_index].setAttribute("aria-selected",!1),this._selection_index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),e[t].scrollIntoView({block:"nearest"}),this._render_details_panel(e[t]))}_render_details_panel(t){if(this._clear_details_panel(),t.hasAttribute("data-help")&&t.getAttribute("data-help")){this._container.classList.add("show-details");const e=t.getAttribute("data-label"),n=t.getAttribute("data-help"),r=t.getAttribute("data-signature"),i=v.html`
12 <span class="psp-autocomplete-item-detail__item--label">${e}</span>
13 <span class="psp-autocomplete-item-detail__item--signature">${r}</span>
14 <span class="psp-autocomplete-item-detail__item--help">${n}</span>
15 `;Object(v.render)(i,this._details),this._details.scrollTop=0,this._details.style.display="block"}}_clear_details_panel(){Object(v.render)(v.nothing,this._details),this._details.style.display="none",this._container.classList.remove("show-details")}_register_ids(){this._container=this.shadowRoot.querySelector(".psp-autocomplete-widget"),this._list=this.shadowRoot.querySelector(".psp-autocomplete-widget__list"),this._details=this.shadowRoot.querySelector(".psp-autocomplete-widget__details")}_register_callbacks(){this._list.addEventListener("click",this.item_clicked.bind(this)),this._list.addEventListener("mousedown",t=>t.preventDefault()),this._list.addEventListener("mouseover",this.item_mouseover.bind(this)),this._list.addEventListener("mouseleave",this.item_mouseleave.bind(this))}}).prototype,C="render",k=[r.g],L=Object.getOwnPropertyDescriptor(E.prototype,"render"),I=E.prototype,R={},Object.keys(L).forEach((function(t){R[t]=L[t]})),R.enumerable=!!R.enumerable,R.configurable=!!R.configurable,("value"in R||R.initializer)&&(R.writable=!0),R=k.slice().reverse().reduce((function(t,e){return e(N,C,t)||t}),R),I&&void 0!==R.initializer&&(R.value=R.initializer?R.initializer.call(I):void 0,R.initializer=void 0),void 0===R.initializer&&(Object.defineProperty(N,C,R),R=null),E));var N,C,k,L,I,R,j,P=n(17),M=n.n(P),D=n(18),U=n.n(D);function F(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(F.prototype,HTMLElement.prototype),Object.setPrototypeOf(F,HTMLElement),Object(r.b)(M.a,U.a)((function(t,e,n,r,i){var o={};Object.keys(r).forEach((function(t){o[t]=r[t]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(t,e,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null)}((j=class extends F{constructor(){super(),this._value="",this._ignored_nodes=["BR","DIV"]}connectedCallback(){this._register_ids(),this._register_callbacks(),this.renderer=this._render_content}set_renderer(t){this.renderer=t}update_content(){const t=this.shadowRoot.getSelection(),e=this.get_tokens(this._edit_area),n=new CustomEvent("perspective-expression-editor-input",{detail:{nodes:e.map(t=>t.node),text:this._edit_area.textContent}});this.dispatchEvent(n);let r=null,i=null,o=0;for(const n of e)n.node===t.anchorNode&&(r=o+t.anchorOffset),n.node===t.focusNode&&(i=o+t.focusOffset),o+=n.text.length;if(this._value=e.map(t=>t.text).join(""),0===this._value.length)this.clear_content();else{const t=this.renderer(this._value,e);this._edit_area.innerHTML=t}this.restore_selection(r,i);const s=new CustomEvent("perspective-expression-editor-rendered",{detail:{nodes:e.map(t=>t.node),text:this._value}});this.dispatchEvent(s)}clear_content(){this._edit_area.innerHTML=""}_render_content(t){return`<span class="psp-expression__fragment">${t}</span>`}restore_selection(t,e){const n=this.shadowRoot.getSelection(),r=this.get_tokens(this._edit_area);let i=this._edit_area,o=0,s=this._edit_area,a=0,c=0;for(const n of r){const r=c,l=r+n.text.length;r<=t&&t<=l&&(i=n.node,o=t-r),r<=e&&e<=l&&(s=n.node,a=e-r),c+=n.text.length}n.setBaseAndExtent(i,o,s,a)}get_text(){return this._edit_area.textContent}get_tokens(t){const e=[];for(const n of t.childNodes)if(!this._ignored_nodes.includes(n.nodeName))switch(n.nodeType){case Node.TEXT_NODE:e.push({text:n.nodeValue,node:n});break;case Node.ELEMENT_NODE:e.splice(e.length,0,...this.get_tokens(n));break;default:continue}return e}focus(){this._edit_area.focus()}keyup(t){const e=new CustomEvent("perspective-expression-editor-keyup",{detail:t});this.dispatchEvent(e)}keydown(t){const e=new CustomEvent("perspective-expression-editor-keydown",{detail:t});this.dispatchEvent(e)}_capture_drop_data(t){this._edit_area.focus();const e=t.dataTransfer.getData("text");if(""!==e)try{const n=JSON.parse(e);Array.isArray(n)&&n.length>4&&(t.preventDefault(),this._edit_area.textContent+=`"${n[0]}"`)}catch(t){}finally{this._reset_selection(),this.update_content()}}_reset_selection(){const t=this.shadowRoot.getSelection();t.setBaseAndExtent(t.anchorNode,this._edit_area.textContent.length,t.focusNode,this._edit_area.textContent.length)}_register_ids(){this._edit_area=this.shadowRoot.querySelector(".perspective-expression-editor__edit_area")}_register_callbacks(){this._edit_area.addEventListener("drop",this._capture_drop_data.bind(this)),this._edit_area.addEventListener("input",this.update_content.bind(this)),this._edit_area.addEventListener("keyup",this.keyup.bind(this)),this._edit_area.addEventListener("keydown",this.keydown.bind(this))}}).prototype,"update_content",[r.g],Object.getOwnPropertyDescriptor(j.prototype,"update_content"),j.prototype),j));var B=n(19),z=n.n(B),H=n(20),q=n.n(H),W=n(0);const V={columnName:"column name",leftParen:"(",rightParen:")",add:"+",subtract:"-",multiply:"*",divide:"/",percent_of:"%"},$=t=>{let e;return e=Array.isArray(t)?t.filter(t=>"EOF"!==t.tokenType.name).map(t=>t.payload?t.payload:t.image):t.payload?t.payload:t.image,e&&0!==e.length||(e="EOF"),e},G={buildUnexpectedCharactersMessage:(t,e,n,r,i)=>`Ln ${r}, Col ${i}: Unexpected input \`${t}\` at character ${e}`},K={buildEarlyExitMessage:t=>`Unexpected token: \`${$(t.actual)}\`\n\nExpected one of the following tokens: \n ${t.expectedIterationPaths.map(t=>{let e=[];return t.map(t=>{const n=V[t.name];e.push(n)}),e.join(", ")}).join("\n")}`,buildMismatchTokenMessage:t=>{let e=$(t.actual),n=t.expected.name;V[n]&&(n=V[n]);let r=`Expecting token \`${n}\`, but found \`${e}\`.`;return")"!==n&&"rightParen"!==n||(r+="\n\nMake sure all left parentheses are matched\nwith right parentheses."),r},buildNoViableAltMessage:t=>{let e=`Unexpected token: \`${$(t.actual)}\`.`;return"Expression"===t.ruleName?e+="\n\nExpected a column name, `(`,\nor functional operator such as:\n- `sqrt`\n- `uppercase`\n- `day_of_week`":"ColumnName"===t.ruleName?e+="\n\nExpected a column name or `(`":"TerminalColumnName"===t.ruleName&&(e+="\n\nExpected a column name after 'AS'"),e}},Y={},X=Object(W.createToken)({name:"OperatorTokenType",pattern:W.Lexer.NA}),J=Object(W.createToken)({name:"FunctionTokenType",pattern:W.Lexer.NA}),Z=Object(W.createToken)({name:"ColumnNameTokenType",pattern:W.Lexer.NA}),Q=Object(W.createToken)({name:"UpperLowerTokenType",pattern:/(uppercase|lowercase)/}),tt=/(["'])(.*?[^\\])\1/y,et=Object(W.createToken)({name:"columnName",pattern:{exec:function(t,e){tt.lastIndex=e;const n=tt.exec(t);return null!==n&&3===n.length&&(n.payload=n[2]),n}},line_breaks:!1,categories:[Z]}),nt=Object(W.createToken)({name:"as",label:"Name new column as",pattern:/(AS|As|as)/,longer_alt:Q}),rt=Object(W.createToken)({name:"add",label:"+",pattern:/\+/,categories:[X]}),it=Object(W.createToken)({name:"subtract",label:"-",pattern:/\-/,categories:[X]}),ot=Object(W.createToken)({name:"multiply",label:"*",pattern:/\*/,categories:[X]}),st=Object(W.createToken)({name:"divide",label:"/",pattern:/\//,categories:[X]}),at=Object(W.createToken)({name:"pow",label:"x ^ y",pattern:/\^/,categories:[X]}),ct=Object(W.createToken)({name:"percent_of",label:"x % y",pattern:/\%/,categories:[X]}),lt=Object(W.createToken)({name:"equals",label:"x == y",pattern:/\==/,categories:[X]}),ut=Object(W.createToken)({name:"not_equals",label:"x != y",pattern:/\!=/,categories:[X]}),pt=Object(W.createToken)({name:"greater_than",label:"x > y",pattern:/\>/,categories:[X]}),ht=Object(W.createToken)({name:"less_than",label:"x < y",pattern:/\</,categories:[X]}),dt=Object(W.createToken)({name:"is",label:"x is y",pattern:/is/,categories:[X]}),ft=Object(W.createToken)({name:"sqrt",label:"sqrt(x)",pattern:/sqrt/,categories:[J]}),_t=Object(W.createToken)({name:"pow2",label:"x ^ 2",pattern:/pow2/,categories:[J]}),mt=Object(W.createToken)({name:"abs",label:"abs(x)",pattern:/abs/,categories:[J]}),gt=Object(W.createToken)({name:"invert",label:"1 / x",pattern:/invert/,categories:[J]}),vt=Object(W.createToken)({name:"log",label:"log(x)",pattern:/log/,categories:[J]}),yt=Object(W.createToken)({name:"exp",label:"exp(x)",pattern:/exp/,categories:[J]}),bt=Object(W.createToken)({name:"bin10",label:"Bucket x by 10",pattern:/bin10/,categories:[J]}),wt=Object(W.createToken)({name:"bin100",label:"Bucket x by 100",pattern:/bin100/,categories:[J]}),Et=Object(W.createToken)({name:"bin1000",label:"Bucket x by 1000",pattern:/bin1000/,categories:[J]}),Ot=Object(W.createToken)({name:"bin10th",label:"Bucket x by 1/10",pattern:/bin10th/,categories:[J]}),xt=Object(W.createToken)({name:"bin100th",label:"Bucket x by 1/100",pattern:/bin100th/,categories:[J]}),Tt=Object(W.createToken)({name:"bin1000th",label:"Bucket x by 1/1000",pattern:/bin1000th/,categories:[J]}),At=Object(W.createToken)({name:"length",label:"length(x)",pattern:/length/,categories:[J]}),St=Object(W.createToken)({name:"lowercase",label:"lowercase(x)",pattern:/lowercase/,categories:[J]}),Nt=Object(W.createToken)({name:"uppercase",label:"uppercase(x)",pattern:/uppercase/,categories:[J]}),Ct=Object(W.createToken)({name:"concat_comma",label:"Concat(x, y) with comma",pattern:/concat_comma/,categories:[J]}),kt=Object(W.createToken)({name:"concat_space",label:"Concat(x, y) with space",pattern:/concat_space/,categories:[J]}),Lt=Object(W.createToken)({name:"hour_of_day",label:"Hour of day",pattern:/hour_of_day/,categories:[J]}),It=Object(W.createToken)({name:"day_of_week",label:"Day of week",pattern:/day_of_week/,categories:[J]}),Rt=Object(W.createToken)({name:"month_of_year",label:"Month of year",pattern:/month_of_year/,categories:[J]}),jt=Object(W.createToken)({name:"second_bucket",label:"Bucket(x) by seconds",pattern:/second_bucket/,categories:[J]}),Pt=Object(W.createToken)({name:"minute_bucket",label:"Bucket(x) by minutes",pattern:/minute_bucket/,categories:[J]}),Mt=Object(W.createToken)({name:"hour_bucket",label:"Bucket(x) by hours",pattern:/hour_bucket/,categories:[J]}),Dt=Object(W.createToken)({name:"day_bucket",pattern:/day_bucket/,label:"Bucket(x) by day",categories:[J]}),Ut=Object(W.createToken)({name:"week_bucket",pattern:/week_bucket/,label:"Bucket(x) by week",categories:[J]}),Ft=Object(W.createToken)({name:"month_bucket",pattern:/month_bucket/,label:"Bucket(x) by month",categories:[J]}),Bt=Object(W.createToken)({name:"year_bucket",pattern:/year_bucket/,label:"Bucket(x) by year",categories:[J]}),zt=Object(W.createToken)({name:"leftParen",label:"(",pattern:/\(/}),Ht=Object(W.createToken)({name:"rightParen",label:")",pattern:/\)/}),qt=Object(W.createToken)({name:"comma",label:",",pattern:/,/}),Wt=Object(W.createToken)({name:"whitespace",pattern:/\s+/}),Vt=[Wt,qt,nt,et,zt,Ht,rt,it,ot,st,at,ct,lt,ut,pt,ht,ft,_t,mt,gt,vt,yt,Tt,Et,xt,wt,Ot,bt,At,dt,Ct,kt,Nt,St,Lt,It,Rt,jt,Pt,Mt,Dt,Ut,Ft,Bt,Q],$t=[],Gt=[];Vt.forEach(t=>{Y[t.name]=t;let e=t.PATTERN.source;e&&0==e.indexOf("\\")&&(e=e.substring(1)),Object(W.tokenMatcher)(t,J)?$t.push(e):Object(W.tokenMatcher)(t,X)&&Gt.push(e)}),new W.Lexer(Vt,{errorMessageProvider:G});const Kt=function(t){const e=[];for(const n of t)Object(W.tokenMatcher)(n,Wt)||e.push(n);return e};class Yt extends W.CstParser{constructor(t){super(t,{errorMessageProvider:K}),this.RULE("SuperExpression",()=>{this.SUBRULE(this.Expression)}),this.RULE("Expression",()=>{this.SUBRULE(this.OperatorComputedColumn)}),this.RULE("OperatorComputedColumn",()=>{this.SUBRULE(this.AdditionOperatorComputedColumn,{LABEL:"left"}),this.MANY(()=>{this.SUBRULE(this.Operator),this.SUBRULE2(this.AdditionOperatorComputedColumn,{LABEL:"right"}),this.OPTION(()=>{this.SUBRULE(this.As,{LABEL:"as"})})})}),this.RULE("AdditionOperatorComputedColumn",()=>{this.SUBRULE(this.MultiplicationOperatorComputedColumn,{LABEL:"left"}),this.MANY(()=>{this.SUBRULE(this.AdditionOperator),this.SUBRULE2(this.MultiplicationOperatorComputedColumn,{LABEL:"right"}),this.OPTION(()=>{this.SUBRULE(this.As,{LABEL:"as"})})})}),this.RULE("MultiplicationOperatorComputedColumn",()=>{this.SUBRULE(this.ExponentOperatorComputedColumn,{LABEL:"left"}),this.MANY(()=>{this.SUBRULE(this.MultiplicationOperator),this.SUBRULE2(this.ExponentOperatorComputedColumn,{LABEL:"right"}),this.OPTION(()=>{this.SUBRULE(this.As,{LABEL:"as"})})})}),this.RULE("ExponentOperatorComputedColumn",()=>{this.SUBRULE(this.ColumnName,{LABEL:"left"}),this.MANY(()=>{this.SUBRULE(this.ExponentOperator),this.SUBRULE2(this.ColumnName,{LABEL:"right"}),this.OPTION(()=>{this.SUBRULE(this.As,{LABEL:"as"})})})}),this.RULE("FunctionComputedColumn",()=>{this.SUBRULE(this.Function),this.CONSUME(t.leftParen),this.AT_LEAST_ONE_SEP({SEP:t.comma,DEF:()=>{this.SUBRULE(this.Expression,{LABEL:"param"})}}),this.CONSUME(t.rightParen),this.OPTION(()=>{this.SUBRULE(this.As,{LABEL:"as"})})}),this.RULE("Function",()=>{this.OR([{ALT:()=>this.CONSUME(t.sqrt)},{ALT:()=>this.CONSUME(t.pow2)},{ALT:()=>this.CONSUME(t.abs)},{ALT:()=>this.CONSUME(t.invert)},{ALT:()=>this.CONSUME(t.log)},{ALT:()=>this.CONSUME(t.exp)},{ALT:()=>this.CONSUME(t.bin1000th)},{ALT:()=>this.CONSUME(t.bin1000)},{ALT:()=>this.CONSUME(t.bin100th)},{ALT:()=>this.CONSUME(t.bin100)},{ALT:()=>this.CONSUME(t.bin10th)},{ALT:()=>this.CONSUME(t.bin10)},{ALT:()=>this.CONSUME(t.length)},{ALT:()=>this.CONSUME(t.uppercase)},{ALT:()=>this.CONSUME(t.lowercase)},{ALT:()=>this.CONSUME(t.concat_comma)},{ALT:()=>this.CONSUME(t.concat_space)},{ALT:()=>this.CONSUME(t.hour_of_day)},{ALT:()=>this.CONSUME(t.day_of_week)},{ALT:()=>this.CONSUME(t.month_of_year)},{ALT:()=>this.CONSUME(t.second_bucket)},{ALT:()=>this.CONSUME(t.minute_bucket)},{ALT:()=>this.CONSUME(t.hour_bucket)},{ALT:()=>this.CONSUME(t.day_bucket)},{ALT:()=>this.CONSUME(t.week_bucket)},{ALT:()=>this.CONSUME(t.month_bucket)},{ALT:()=>this.CONSUME(t.year_bucket)}])}),this.RULE("AdditionOperator",()=>{this.OR([{ALT:()=>this.CONSUME(t.add)},{ALT:()=>this.CONSUME(t.subtract)}])}),this.RULE("MultiplicationOperator",()=>{this.OR([{ALT:()=>this.CONSUME(t.multiply)},{ALT:()=>this.CONSUME(t.divide)}])}),this.RULE("ExponentOperator",()=>{this.CONSUME(t.pow)}),this.RULE("Operator",()=>{this.OR([{ALT:()=>this.CONSUME(t.percent_of)},{ALT:()=>this.CONSUME(t.equals)},{ALT:()=>this.CONSUME(t.not_equals)},{ALT:()=>this.CONSUME(t.greater_than)},{ALT:()=>this.CONSUME(t.less_than)},{ALT:()=>this.CONSUME(t.is)}])}),this.RULE("TerminalColumnName",()=>{this.CONSUME(t.columnName)}),this.RULE("As",()=>{this.CONSUME(t.as),this.SUBRULE(this.TerminalColumnName)}),this.RULE("ColumnName",()=>{this.OR([{ALT:()=>this.SUBRULE(this.ParentheticalExpression)},{ALT:()=>this.SUBRULE(this.FunctionComputedColumn)},{ALT:()=>this.CONSUME(t.columnName)}],{ERR_MSG:"Expected a column name (wrapped in double quotes) or a parenthesis-wrapped expression."})}),this.RULE("ParentheticalExpression",()=>{this.CONSUME(t.leftParen),this.SUBRULE(this.Expression),this.CONSUME(t.rightParen)}),this.performSelfAnalysis()}}const Xt={"+":(t,e)=>`(${t} + ${e})`,"-":(t,e)=>`(${t} - ${e})`,"*":(t,e)=>`(${t} * ${e})`,"/":(t,e)=>`(${t} / ${e})`,"%":(t,e)=>`(${t} %% ${e})`,"==":(t,e)=>`(${t} == ${e})`,"!=":(t,e)=>`(${t} != ${e})`,">":(t,e)=>`(${t} > ${e})`,"<":(t,e)=>`(${t} < ${e})`,"^":(t,e)=>`(${t} ^ ${e})`,invert:t=>`(1 / ${t})`,log:t=>`log(${t})`,exp:t=>`exp(${t})`,pow2:t=>`(${t} ^ 2)`,sqrt:t=>`sqrt(${t})`,abs:t=>`abs(${t})`,bin10:t=>`bin10(${t})`,bin100:t=>`bin100(${t})`,bin1000:t=>`bin1000(${t})`,bin10th:t=>`bin10th(${t})`,bin100th:t=>`bin100th(${t})`,bin1000th:t=>`bin1000th(${t})`,uppercase:t=>`uppercase(${t})`,lowercase:t=>`lowercase(${t})`,length:t=>`length(${t})`,is:(t,e)=>`(${t} is ${e})`,concat_space:(t,e)=>`concat_space(${t}, ${e})`,concat_comma:(t,e)=>`concat_comma(${t}, ${e})`,hour_of_day:t=>`hour_of_day(${t})`,day_of_week:t=>`day_of_week(${t})`,month_of_year:t=>`month_of_year(${t})`,second_bucket:t=>`second_bucket(${t})`,minute_bucket:t=>`minute_bucket(${t})`,hour_bucket:t=>`hour_bucket(${t})`,day_bucket:t=>`day_bucket(${t})`,week_bucket:t=>`week_bucket(${t})`,month_bucket:t=>`month_bucket(${t})`,year_bucket:t=>`year_bucket(${t})`},Jt={FunctionTokenType:J,OperatorTokenType:X};class Zt{constructor({label:t,value:e,pattern:n,signature:r,help:i,input_types:o,return_type:s,num_params:a,is_column_name:c}={}){this.label=t,this.value=e,this.pattern=n,this.input_types=o,this.return_type=s,this.num_params=a,this.signature=r,this.help=i,this.is_column_name=c||!1}}const Qt=new class{constructor(){this.is_initialized=!1,this._vocabulary={},this._tokens=[Wt,qt,nt,et,zt,Ht],this._metadata,this._lexer,this._parser,this._visitor}init(t){if(!this.is_initialized){for(const t of this._tokens)this._vocabulary[t.name]=t;this._metadata=t,this._lexer=this._construct_lexer(),this._parser=this._construct_parser(),this._visitor=this._construct_visitor(),this.is_initialized=!0}}lex(t){this._check_initialized();const e=this._lexer.tokenize(t);return e.tokens=Kt(e.tokens),e}parse(t){this._check_initialized();const e=this.lex(t);if(e.errors.length>0){let t=e.errors[0].message;throw new Error(t)}this._parser.input=e.tokens;const n=this._parser.SuperExpression();if(this._parser.errors.length>0){let t=this._parser.errors[0].message;throw new Error(t)}return this._visitor.visit(n)}get_autocomplete_suggestions(t,e,n,r){this._check_initialized();let i=this._parser.computeContentAssist("SuperExpression",[]);if(!e)return this._apply_suggestion_metadata(i);if(e.errors.length>0){const r=this.extract_partial_function(t),o=this.get_last_token(e),s=o&&Object(W.tokenMatcher)(o,et);if(r&&-1===r.search(/["']$/)&&!s){const t=this._apply_suggestion_metadata(i.slice(1),n),e=[],o=[];for(const n of t){const t=n.value.toLowerCase().trim(),i=r.toLowerCase().trim();t.startsWith(i)?e.push(n):t.includes(i)&&o.push(n)}return e.concat(o)}return[]}e.tokens=Kt(e.tokens);const o=this._parser.computeContentAssist("SuperExpression",e.tokens);return this._apply_suggestion_metadata(o,n,r)}extract_partial_function(t){this._check_initialized();const e=t.match(/([^(,\s]+$)/);if(e&&e.length>0){const t=e[0];if(!/['"]/.test(t))return e[0]}}get_last_token(t){const e=t.tokens,n=e.length-1;if(n>=0)return e[n]}get_last_token_with_types(t,e,n){const r=e.tokens;(!n||n<=0||n>=r.length)&&(n=r.length);for(let e=r.length-1;e>=r.length-n;e--)for(const n of t)if(Object(W.tokenMatcher)(r[e],n))return r[e]}_construct_lexer(){const t=["bin1000th","bin1000","bin100th","bin100","bin10th","bin10"];for(const e in this._metadata){const n=this._metadata[e];if(t.includes(n.name))continue;const r=this._make_token(n);this._tokens.push(r),this._vocabulary[r.name]=r}for(const e of t){const t=this._metadata[e],n=this._make_token(t);this._tokens.push(n),this._vocabulary[n.name]=n}return this._tokens.push(Q),this._vocabulary[Q.name]=Q,new W.Lexer(this._tokens,{errorMessageProvider:G})}_make_token(t){const e=new RegExp(t.pattern),n=Object(W.createToken)({name:t.name,label:t.label,pattern:e,categories:[Jt[t.category]]});return"float"===t.input_type?n.input_types=["float","integer"]:"datetime"===t.input_type?n.input_types=["datetime","date"]:n.input_types=[t.input_type],n.return_type=t.return_type,n.num_params=t.num_params,n.signature=t.signature,n.help=t.help,n}_construct_parser(){return new Yt(this._vocabulary)}_construct_visitor(){const t=this._parser.getBaseCstVisitorConstructor();return new class extends t{constructor(){super(),this.validateVisitor()}SuperExpression(t){let e=[];if(this.visit(t.Expression,e),0===e.length)throw new Error("Expression did not generate any computed columns");return e}Expression(t,e){return this.visit(t.OperatorComputedColumn,e)}_VisitOperatorComputedColumn(t,e,n){let r,i=this.visit(t.left,e);if(t.right){let o;t.right.forEach((r,s)=>{let a=n(t,s);if(!a)return;let c=this.visit(r,e);const l=o||i;let u;t.as&&s<t.as.length&&(u=this.visit(t.as[s]));const p=u||Xt[a](l,c);e.push({column:p,computed_function_name:a,inputs:[l,c]}),o=p}),r=o}else r=i;return r}OperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,(t,e)=>this.visit(t.Operator[e]))}AdditionOperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,(t,e)=>this.visit(t.AdditionOperator[e]))}MultiplicationOperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,(t,e)=>this.visit(t.MultiplicationOperator[e]))}ExponentOperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,(t,e)=>this.visit(t.ExponentOperator[e]))}FunctionComputedColumn(t,e){const n=this.visit(t.Function);let r=[];for(const n of t.param)r.push(this.visit(n,e));const i=this.visit(t.as)||Xt[n](...r),o={column:i,computed_function_name:n,inputs:r};return e.push(o),i}ColumnName(t,e){return t.ParentheticalExpression?this.visit(t.ParentheticalExpression,e):t.FunctionComputedColumn?this.visit(t.FunctionComputedColumn,e):t.columnName[0].payload}TerminalColumnName(t){return t.columnName[0].payload}AdditionOperator(t){return t.add?t.add[0].image:t.subtract?t.subtract[0].image:void 0}MultiplicationOperator(t){return t.multiply?t.multiply[0].image:t.divide?t.divide[0].image:void 0}ExponentOperator(t){if(t.pow)return t.pow[0].image}Operator(t){return t.percent_of?t.percent_of[0].image:t.equals?t.equals[0].image:t.not_equals?t.not_equals[0].image:t.greater_than?t.greater_than[0].image:t.less_than?t.less_than[0].image:t.is?t.is[0].image:void 0}Function(t){return t.sqrt?t.sqrt[0].image:t.pow2?t.pow2[0].image:t.abs?t.abs[0].image:t.invert?t.invert[0].image:t.log?t.log[0].image:t.exp?t.exp[0].image:t.length?t.length[0].image:t.uppercase?t.uppercase[0].image:t.lowercase?t.lowercase[0].image:t.concat_comma?t.concat_comma[0].image:t.concat_space?t.concat_space[0].image:t.bin10?t.bin10[0].image:t.bin100?t.bin100[0].image:t.bin1000?t.bin1000[0].image:t.bin10th?t.bin10th[0].image:t.bin100th?t.bin100th[0].image:t.bin1000th?t.bin1000th[0].image:t.hour_of_day?t.hour_of_day[0].image:t.day_of_week?t.day_of_week[0].image:t.month_of_year?t.month_of_year[0].image:t.second_bucket?t.second_bucket[0].image:t.minute_bucket?t.minute_bucket[0].image:t.hour_bucket?t.hour_bucket[0].image:t.day_bucket?t.day_bucket[0].image:t.week_bucket?t.week_bucket[0].image:t.month_bucket?t.month_bucket[0].image:t.year_bucket?t.year_bucket[0].image:void 0}As(t){return t.TerminalColumnName[0].children.columnName[0].payload}ParentheticalExpression(t,e){return this.visit(t.Expression,e)}}}_apply_suggestion_metadata(t,e,n){this._check_initialized(),n=n||!1;const r=[];for(const i of t){const t=i.nextTokenType;if(!t||!t.PATTERN.source)continue;let o=t.LABEL,s=t.PATTERN.source.replace(/\\/g,""),a=s;Object(W.tokenMatcher)(t,J)?a=`${a}(`:Object(W.tokenMatcher)(t,X)?a=`${a} `:Object(W.tokenMatcher)(t,nt)&&(a="AS ",o="AS",t.signature="x + y AS new column",t.help="Creates a custom name for the computed column.");const c=new Zt({label:o,value:a,pattern:s,signature:t.signature,help:t.help,input_types:t.input_types,return_type:t.return_type,num_params:t.num_params});if(e&&c.input_types){for(const t of e)if(c.input_types.includes(t)&&(!n||c.input_types.includes(c.return_type))){r.push(c);break}}else r.push(c)}return r}_check_initialized(){if(!1===this.is_initialized)throw new Error("PerspectiveComputedExpressionParser is not initialized!")}};var te;function ee(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}function ne(t,e,n,r,i){var o={};return Object.keys(r).forEach((function(t){o[t]=r[t]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(t,e,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}Object.setPrototypeOf(ee.prototype,HTMLElement.prototype),Object.setPrototypeOf(ee,HTMLElement),Object(r.b)(z.a,q.a)((ne((te=class extends ee{constructor(){super(),this._parsed_expression=void 0,this.expressions=[],this._valid=!1}connectedCallback(){this._register_ids(),this._register_callbacks(),this._expression_editor.set_renderer(this.render_expression.bind(this)),this._editor_observer=new MutationObserver(this._resize_editor.bind(this)),this._autocomplete.reposition=this._position_autocomplete.bind(this)}_observe_editor(){this._editor_observer.observe(this._expression_editor,{attributes:!0,attributeFilter:["style"]}),this._expression_editor.focus()}_resize_editor(){const t=new CustomEvent("perspective-computed-expression-resize");this.dispatchEvent(t),this._editor_observer.disconnect()}_get_type(t){throw new Error(`Cannot get column type for "${t}".`)}_make_column_name_suggestions(t){return t.map(t=>new Zt({label:t,value:`"${t}"`,is_column_name:!0}))}render_expression(t){const e=this._computed_expression_parser._lexer.tokenize(t);let n=[],r={};for(const t of e.tokens)r[t.startOffset]=t,n.push(t.startOffset);for(const t of e.errors)r[t.offset]=t,n.push(t.offset);n=n.sort((t,e)=>t-e);const i=[],o=this._get_view_all_column_names();let s;for(const e of n){const n=r[e];let a="",c="fragment";if(n.message)a=t.slice(n.offset,n.offset+n.length),c="errored";else{if(a=n.image,Object(W.tokenMatcher)(n,J))c="function";else if(Object(W.tokenMatcher)(n,X))c="operator";else if(Object(W.tokenMatcher)(n,et)){const t=n.payload,e=o.includes(t);c=`column_name ${e?this._get_type(t):""}`,(!e&&!s||!e&&s&&!Object(W.tokenMatcher)(s,nt))&&(c="errored")}Object(W.tokenMatcher)(n,Wt)||(s=n)}i.push(`<span class="psp-expression__${c}">${a}</span>`)}return i.join("")}make_autocomplete_markup(t){return t.map(t=>t.label?v.html`
16 <div
17 role="listitem"
18 title=${t.help?t.help:""}
19 class="psp-autocomplete__item"
20 data-label=${t.label}
21 data-value=${t.value}
22 data-signature=${t.signature?t.signature:""}
23 data-help=${t.help?t.help:""}
24 aria-selected="false"
25 >
26 <span
27 class="psp-autocomplete-item__label ${t.is_column_name?`psp-autocomplete-item__label--column-name ${this._get_type(t.label)}`:""}"
28 data-value=${t.value}
29 >
30 ${t.pattern?t.pattern:t.label}
31 </span>
32 </div>
33 `:"")}async _validate_expression(t){this._autocomplete.clear();const e=t.detail.text;if(0===e.length)return void this._clear_error();try{this._parsed_expression=this._computed_expression_parser.parse(e)}catch(t){this._clear_error(),this._disable_save_button();const n=this._computed_expression_parser.lex(e),r=e.match(/(["'])[\s\w()]*?$/),i=r&&r.length>0&&!/['"]\s/.test(r[0]),o=this._computed_expression_parser.get_last_token(n);let s=i;if(o){const t=Object(W.tokenMatcher)(o,et),e=Object(W.tokenMatcher)(o,Ht),n=Object(W.tokenMatcher)(o,nt);s=Object(W.tokenMatcher)(o,X)||s&&!t&&!e&&!n}let a,c,l=[];const u=this._computed_expression_parser.get_last_token_with_types([J,X],n);if(u?(a=u.tokenType.input_types,c=!0):o&&Object(W.tokenMatcher)(o,et)&&(a=[this._get_type(o.payload)],c=!1),l=this._computed_expression_parser.get_autocomplete_suggestions(e,n,a,c),s){let t;t=u?this._get_view_column_names_by_types(a):this._get_view_all_column_names();let e=this._make_column_name_suggestions(t);if(i){const t=r[0].substring(1),n=[],i=[];for(const r of e){const e=r.label.toLowerCase(),o=t.toLowerCase();e.startsWith(o)?n.push(r):e.includes(o)&&i.push(r)}e=n.concat(i)}l=u?l.concat(e):e;const n=this.make_autocomplete_markup(l);return void this._autocomplete.render(n)}if(l.length>0){const t=this.make_autocomplete_markup(l);return void this._autocomplete.render(t)}if(o&&Object(W.tokenMatcher)(o,nt))return;{const e=t.message?t.message:JSON.stringify(t);return void this._set_error(e,this._error)}}const n=new CustomEvent("perspective-computed-expression-type-check",{detail:{parsed_expression:this._parsed_expression}});this.dispatchEvent(n)}async _type_check_expression(t,e){const n=this._parsed_expression||[],r=[];for(const e of n)t[e.column]||r.push(e.column);if(r.length>0){let t="TypeError:\n";for(const n of r)t+=`- \`${n}\` expected input column types ${e[n].join("/")}\n`;this._set_error(t,this._error)}else this._clear_error(),this._enable_save_button()}_save_expression(){if(!this._valid||this._save_button.getAttribute("disabled"))return;const t=this._expression_editor.get_text(),e=this._parsed_expression||[],n=new CustomEvent("perspective-computed-expression-save",{detail:{expression:t,parsed_expression:e}});this.dispatchEvent(n),this.expressions.push(t)}_position_autocomplete(){const t=this._expression_editor,e=this._expression_editor._edit_area.lastChild;if(250===t.offsetWidth)return this._autocomplete._container.removeAttribute("style"),this._autocomplete._container.classList.remove("undocked"),void this._autocomplete._container.classList.add("docked");this._autocomplete._container.classList.remove("docked"),this._autocomplete._container.classList.add("undocked");const n=e.offsetLeft,r=e.offsetWidth,i=e.offsetTop,o=n+r>0?n+r:0,s=i+20>20?i+20:20;this._autocomplete._container.style.left=`${o}px`,this._autocomplete._container.style.top=`${s}px`}_autocomplete_replace(t){const e=this._expression_editor.get_text(),n=this._computed_expression_parser.extract_partial_function(e);if("("===t)this._expression_editor._edit_area.innerText+=t;else if(n&&'"'!==n){const r=e.substring(0,e.length-n.length)+t;this._expression_editor._edit_area.innerText=r}else{const n=e.substring(e.lastIndexOf(" ")).trim(),r=/["'].*[^'"]/.test(n)||'"'===n||"'"===n,i=tt.test(t);if(r&&i){let r=e.lastIndexOf(n),i=e.substring(0,r);const o=/\(['"]\w+$/.exec(n);o&&o[0]&&(0===r||"("===n[0])&&(i+=n.substring(0,o.index+1)),i+=t,this._expression_editor._edit_area.innerText=i}else{if(!r&&('"'===n[n.length-1]||"'"===n[n.length-1])){const t=this._expression_editor._edit_area.innerText.substring(0,this._expression_editor._edit_area.innerText.length-1);this._expression_editor._edit_area.innerText=t}this._expression_editor._edit_area.innerText+=t}}this._expression_editor._reset_selection(),this._expression_editor.update_content(),this._autocomplete.clear()}_autocomplete_item_clicked(t){this._autocomplete_replace(t.detail.target.getAttribute("data-value"))}_clear_expression_editor(){this._expression_editor.clear_content()}_close_expression_widget(){this.style.display="none",this._side_panel_actions.style.display="flex",this._clear_error(),this._disable_save_button(),this._clear_expression_editor(),this._autocomplete.clear(),this._editor_observer.disconnect()}_set_error(t,e){e&&(e.innerText=t,e.style.display="block",this._disable_save_button())}_clear_error(){this._error.innerText="",this._error.style.display="none"}_disable_save_button(){this._save_button.setAttribute("disabled",!0),this._valid=!1}_enable_save_button(){this._save_button.removeAttribute("disabled"),this._valid=!0}_editor_keydown(t){switch(t.detail.key){case"Enter":if(t.detail.preventDefault(),t.detail.stopPropagation(),!0===this._autocomplete.displayed){const t=this._autocomplete.get_selected_value();t&&this._autocomplete_replace(t)}else this._save_expression();break;case"Tab":case"ArrowDown":t.detail.preventDefault(),t.detail.stopPropagation(),!0===this._autocomplete.displayed&&this._autocomplete._next();break;case"ArrowUp":t.detail.preventDefault(),t.detail.stopPropagation(),!0===this._autocomplete.displayed&&this._autocomplete._prev();break;case"z":!0!==t.detail.metaKey&&!0!==t.detail.ctrlKey||(t.detail.preventDefault(),t.detail.stopPropagation())}}_register_ids(){this._side_panel_actions=this.parentElement.querySelector("#side_panel__actions"),this._close_button=this.shadowRoot.querySelector("#psp-computed-expression-widget-close"),this._expression_editor=this.shadowRoot.querySelector("perspective-expression-editor"),this._error=this.shadowRoot.querySelector("#psp-computed-expression-widget-error"),this._save_button=this.shadowRoot.querySelector("#psp-computed-expression-widget-button-save"),this._autocomplete=this.shadowRoot.querySelector("#psp-computed-expression-widget-autocomplete")}_register_callbacks(){this._close_button.addEventListener("click",this._close_expression_widget.bind(this)),this._expression_editor.addEventListener("perspective-expression-editor-rendered",this._validate_expression.bind(this)),this._expression_editor.addEventListener("perspective-expression-editor-keydown",this._editor_keydown.bind(this)),this._save_button.addEventListener("click",this._save_expression.bind(this)),this._autocomplete.addEventListener("perspective-autocomplete-item-clicked",this._autocomplete_item_clicked.bind(this))}}).prototype,"_validate_expression",[r.g],Object.getOwnPropertyDescriptor(te.prototype,"_validate_expression"),te.prototype),ne(te.prototype,"_type_check_expression",[r.g],Object.getOwnPropertyDescriptor(te.prototype,"_type_check_expression"),te.prototype),te));var re=n(21),ie=n.n(re),oe=n(22),se=n.n(oe),ae=n(23),ce=n.n(ae);function le(t){if(0==this._active_columns.children.length)return 0;{let n=!1;for(let r in this._active_columns.children){var e;let i=this._active_columns.children[r];if(n=n||(null==i?void 0:null===(e=i.classList)||void 0===e?void 0:e.contains("null-column")),i.offsetTop+i.offsetHeight>t.offsetY+this._active_columns.scrollTop)return parseInt(r)}let r=this._active_columns.children.length;return n&&r--,r}}function ue(t){let e=t.target.getRootNode().host,n=e;n="PERSPECTIVE-VIEWER"===n.tagName?t.target.parentElement:e.parentElement;let r=Array.prototype.slice.call(n.children).indexOf("PERSPECTIVE-ROW"===e.tagName?e:t.target),i=n.getAttribute("for");if(this.hasAttribute(i)){let t=JSON.parse(this.getAttribute(i));t.splice(r,1),0===t.length?this.removeAttribute(i):this.setAttribute(i,JSON.stringify(t))}}function pe(t){t.preventDefault(),t.currentTarget.classList.remove("dropping"),this._drop_target_hover&&this._drop_target_hover.removeAttribute("drop-target");let e=t.dataTransfer.getData("text");if(!e)return;e=JSON.parse(e);let n=t.currentTarget.querySelector("ul").getAttribute("for")||t.currentTarget.getAttribute("id").replace("_","-"),r=JSON.parse(this.getAttribute(n)||"[]"),i=r.indexOf(e[0]);-1!==i&&r.splice(i,1);const o=n.indexOf("filter")>-1;if(o?this.setAttribute(n,JSON.stringify(r.concat([e]))):n.indexOf("sort")>-1?this.setAttribute(n,JSON.stringify(r.concat([[e[0]]]))):this.setAttribute(n,JSON.stringify(r.concat([e[0]]))),"pivots"===this._plugin.deselectMode&&this._get_visible_column_count()>1&&"sort"!==n&&!o){for(let t of this.shadowRoot.querySelectorAll("#active_columns perspective-row"))if(t.getAttribute("name")===e[0]){this._active_columns.removeChild(t);break}this._update_column_view()}this._debounce_update()}function he(t){let e=t.target.parentElement.parentElement;Array.prototype.slice(this._active_columns.children).indexOf(e)>-1&&this._get_visible_column_count()>1&&"move"!==t.dataTransfer.dropEffect&&(this._active_columns.removeChild(e),this._update_column_view()),this._active_columns.classList.remove("dropping")}function de(t){let e=t.relatedTarget;for(;e&&e!==this._active_columns;)e=e.parentElement;null===e&&(this._active_columns.classList.remove("dropping"),this._drop_target_null&&(this._active_columns.replaceChild(this._drop_target_null,this._drop_target_hover),delete this._drop_target_null),this._drop_target_hover.parentElement===this._active_columns&&this._active_columns.removeChild(this._drop_target_hover),-1!==this._original_index&&this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[this._original_index]),this._drop_target_hover.removeAttribute("drop-target"))}function fe(){this._drop_target_null&&(this._drop_target_null.parentElement===this._active_columns?Object(r.f)(this._active_columns,this._drop_target_hover,this._drop_target_null):this._active_columns.replaceChild(this._drop_target_null,this._drop_target_hover),delete this._drop_target_null)}function _e(t){fe.call(this),this._active_columns.children[t]&&this._drop_target_hover!==this._active_columns.children[t]&&(this._drop_target_null=this._active_columns.children[t],Object(r.f)(this._active_columns,this._active_columns.children[t],this._drop_target_hover))}function me(t){fe.call(this),this._active_columns.children[t]&&(this._drop_target_null=this._active_columns.children[t],this._active_columns.replaceChild(this._drop_target_hover,this._active_columns.children[t]))}function ge(t){var e,n,i,o,s,a,c,l;t.preventDefault(),t.dataTransfer.dropEffect="move","dropping"!==t.currentTarget.className&&t.currentTarget.classList.add("dropping"),this._drop_target_hover.hasAttribute("drop-target")||this._drop_target_hover.toggleAttribute("drop-target",!0);let u=le.call(this,t);const p=Array.prototype.slice.call(this._active_columns.children).indexOf(this._drop_target_hover),h=this._active_columns.children[u],d=u<(null===(e=this._plugin.initial)||void 0===e?void 0:null===(n=e.names)||void 0===n?void 0:n.length)-1,f=this._drop_target_hover!==this._active_columns.children[u],_=-1!==this._original_index,m=_&&this._original_index<(null===(i=this._plugin.initial)||void 0===i?void 0:null===(o=i.names)||void 0===o?void 0:o.length)-1,g=_&&this._original_index>=(null===(s=this._plugin.initial)||void 0===s?void 0:null===(a=s.names)||void 0===a?void 0:a.length)-1,v=_&&this._original_index<(null===(c=this._plugin.initial)||void 0===c?void 0:c.count),y=!(u<(null===(l=this._plugin.initial)||void 0===l?void 0:l.count))&&(null==h?void 0:h.classList.contains("null-column"));if(v&&y)fe.call(this);else if(d&&g&&f){var b,w,E,O,x;fe.call(this),this._original_index===(null===(b=this._plugin.initial)||void 0===b?void 0:null===(w=b.names)||void 0===w?void 0:w.length)-1&&this._drop_target_hover===this._active_columns.children[this._original_index]&&this._active_columns.children.length===(null===(E=this._plugin.initial)||void 0===E?void 0:null===(O=E.names)||void 0===O?void 0:O.length)?(this._drop_target_null=this._active_columns.children[u],Object(r.f)(this._active_columns,this._active_columns.children[u],this._drop_target_hover)):(null===(x=this._active_columns.children[u])||void 0===x?void 0:x.classList.contains("null-column"))?this._drop_target_hover!==this._active_columns.children[u]&&(this._drop_target_null=this._active_columns.children[u],this._active_columns.replaceChild(this._drop_target_hover,this._active_columns.children[u])):(this._drop_target_null=this._active_columns.children[u],this._active_columns.replaceChild(this._drop_target_hover,this._active_columns.children[u]),this._active_columns.insertBefore(this._drop_target_null,this._active_columns.children[this._original_index]))}else d&&_&&f?_e.call(this,u):d&&!_&&f?me.call(this,u):!d&&m&&f?_e.call(this,u):y&&_?_e.call(this,u):y&&!_?me.call(this,u):p<u?u+1<this._active_columns.children.length?this._active_columns.children[u+1].hasAttribute("drop-target")||(fe.call(this),this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[u+1])):this._active_columns.children[this._active_columns.children.length-1].hasAttribute("drop-target")||(fe.call(this),this._active_columns.appendChild(this._drop_target_hover)):u<this._active_columns.children.length?this._active_columns.children[u].hasAttribute("drop-target")||(fe.call(this),this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[u])):this._active_columns.children[this._active_columns.children.length-1].hasAttribute("drop-target")||(fe.call(this),this._active_columns.appendChild(this._drop_target_hover))}function ve(t){t.preventDefault(),delete this._drop_target_null,t.currentTarget.classList.remove("dropping"),this._drop_target_hover.parentElement===this._active_columns&&this._drop_target_hover.removeAttribute("drop-target"),t.dataTransfer.getData("text")&&this._update_column_view()}function ye(t){t.stopPropagation(),t.preventDefault(),t.currentTarget.classList.add("dropping")}function be(t){t.stopPropagation(),t.preventDefault(),t.currentTarget.classList.add("dropping"),t.dataTransfer.dropEffect="move"}function we(t){t.currentTarget==t.target&&(t.stopPropagation(),t.preventDefault(),t.currentTarget.classList.remove("dropping"))}n(29);var Ee=n(24),Oe=n.n(Ee);class xe{constructor(t,e=!1){this._on_cancel=t,this._cancelled=!1,this.initial=e}cancel(){!this._cancelled&&this._on_cancel&&(this._on_cancel(),this._on_cancel=void 0),this._cancelled=!0}get cancelled(){return this._cancelled}}function Te(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(Te.prototype,HTMLElement.prototype),Object.setPrototypeOf(Te,HTMLElement);class Ae extends Te{get _plugin(){let t=i.b.getInstance(),e=this.getAttribute("plugin");return e||(e=Object.keys(t)[0],this.setAttribute("plugin",e)),t[e]||t[Object.keys(t)[0]]}_get_view_dom_columns(t,e){t=t||"#active_columns perspective-row";let n=Array.prototype.slice.call(this.shadowRoot.querySelectorAll(t));return e?n.map(e).filter(t=>t):n}_get_view_all_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#inactive_columns perspective-row"))}_get_view_active_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#active_columns perspective-row"))}_get_view_active_valid_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#active_columns perspective-row")).filter(t=>!t.classList.contains("null-column"))}_get_view_inactive_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#inactive_columns perspective-row"))}_get_view_all_column_names(){return this._get_view_all_columns().map(t=>t.getAttribute("name"))}_get_view_active_column_names(){return this._get_view_active_columns().map(t=>t.getAttribute("name"))}_get_view_all_valid_column_names(){return this._get_view_all_column_names().filter(t=>t)}_get_view_active_valid_column_names(){return this._get_view_active_column_names().filter(t=>t)}_get_view_active_valid_column_count(){return this._get_view_active_valid_column_names().length}_get_view_column_names_by_types(t){const e=[],n=this._get_view_all_columns();for(const r of n)t.includes(r.getAttribute("type"))&&e.push(r.getAttribute("name"));return e}_get_view_columns({active:t=!0}={}){let e;return e=t?"#active_columns perspective-row":"#inactive_columns perspective-row",this._get_view_dom_columns(e,t=>t.getAttribute("name"))}_get_view_aggregates(t){return t=t||"#active_columns perspective-row",this._get_view_dom_columns(t,t=>{let e=t.getAttribute("aggregate");if("["===e[0])try{e=JSON.parse(e)}catch(t){console.error(t)}const n=t.getAttribute("name");return n&&{op:e,column:n}})}_get_view_row_pivots(){return this._get_view_dom_columns("#row_pivots perspective-row",t=>t.getAttribute("name"))}_get_view_column_pivots(){return this._get_view_dom_columns("#column_pivots perspective-row",t=>t.getAttribute("name"))}_get_view_filter_nodes(){return this._get_view_dom_columns("#filters perspective-row")}_get_view_filters(){return this._get_view_dom_columns("#filters perspective-row",t=>{let{operator:e,operand:n}=JSON.parse(t.getAttribute("filter"));return[t.getAttribute("name"),e,n]})}_get_view_sorts(){return this._get_view_dom_columns("#sort perspective-row",t=>{let e=t.getAttribute("sort-order")||"asc";return[t.getAttribute("name"),e]})}_get_view_computed_columns(){return JSON.parse(this.getAttribute("computed-columns"))||[]}_get_view_parsed_computed_columns(){return JSON.parse(this.getAttribute("parsed-computed-columns"))||[]}_get_visible_column_count(){return this._get_view_active_columns().length}get_aggregate_attribute(){const t=JSON.parse(this.getAttribute("aggregates"))||{},e=new Set,n=Object.keys(t).map(n=>(e.add(n),{column:n,op:t[n]}));if(this._aggregate_defaults)for(const t of Object.keys(this._aggregate_defaults))e.has(t)||n.push({column:t,op:this._aggregate_defaults[t]});return n}}function Se(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}let Ne={integer:2,string:0,float:3,boolean:4,datetime:1,date:1};const Ce=t=>(e,n)=>{const r=Ne[t[e]],i=Ne[t[n]];let o=0;return o=r==i?e.toLowerCase()<n.toLowerCase()?-1:1:r<i?-1:1,o},ke=t=>{if(t){const e=Se(t[0]),n=Se(t[1]),r=Math.floor(t[0]/t[1]*100);return v.html`
34 <span title="${e} / ${n}" class="plugin_information--overflow-hint">&nbsp;<span class="plugin_information--overflow-hint-percent">${r}%</span>&nbsp;</span>
35 `}},Le=t=>{if(""!==t)return v.html`
36 <span style="white-space:nowrap">${t}</span>
37 `},Ie=(t,...e)=>t.flatMap((t,n)=>[Le(t),ke(e[n])]).filter(t=>t);class Re extends Ae{_validate_parsed_computed_columns(t,e){if(!t||0===t.length)return[];const n=[];for(const r of t)e[r.column]&&n.push(r);return n}async _load_table(t){this.shadowRoot.querySelector("#app").classList.add("hide_message");const e=this._set_updating();if(this._clear_state(),this._table=t,!this._computed_expression_parser.is_initialized){const e=await t.get_computed_functions();this._computed_expression_parser.init(e)}let[n,r]=await Promise.all([t.columns(),t.schema(!0)]);this._initial_col_order=n.slice();let i=this._get_view_parsed_computed_columns();if(0===i.length){const t=this._get_view_computed_columns();for(const e of t)"string"==typeof e?i=i.concat(this._computed_expression_parser.parse(e)):i.push(e)}const o=await t.computed_schema(i);i=await this._validate_parsed_computed_columns(i,o),this.setAttribute("parsed-computed-columns",JSON.stringify(i));const s=i.map(t=>t.column);n=n.concat(s),this.hasAttribute("columns")||this.setAttribute("columns",JSON.stringify(this._initial_col_order)),n.sort(Ce(r));const a=function(t,e,n,r){const i=new Set,o=[];for(const e of t){let t=n[e.column];t||(t=r[e.column]);const s=Object(d.get_type_config)(t);i.add(e.column),s.type||t?(""!==e.op&&-1!==h.a.TYPE_AGGREGATES[s.type||t].indexOf(e.op)||(e.op=s.aggregate),o.push(e)):console.warn(`No column "${e.column}" found (specified in aggregates attribute).`)}for(const t of e)if(!i.has(t)){let e=n[t];e||(e=r[t.column]),o.push({column:t,op:Object(d.get_type_config)(e).aggregate})}return o}(this.get_aggregate_attribute(),n,r,o);let c=JSON.parse(this.getAttribute("columns"));0===c.filter(t=>n.indexOf(t)>-1).length&&(c=this._initial_col_order),this._aggregate_defaults=function(t,e,n){const r={};for(const i of t){let t=e[i];t||(t=n[i]),r[i]=Object(d.get_type_config)(t).aggregate}return r}(n,r,o),this._clear_columns();for(const t of n){let e=a.find(e=>e.column===t).op;const n=s.includes(t)?t:void 0;let i=r[t];i||(i=o[t]);const l=this._new_row(t,i,e,null,null,n);this._inactive_columns.appendChild(l),c.includes(t)&&l.classList.add("active")}for(;c.length<(null===(l=this._plugin.initial)||void 0===l?void 0:null===(u=l.names)||void 0===u?void 0:u.length);){var l,u;c.push(null)}for(const t of c){const e=s.includes(t)?t:void 0;let n=r[name];n||(n=o[name]);const i=this._new_row(t,n,void 0,void 0,void 0,e);this._active_columns.appendChild(i)}n.length===c.filter(t=>n.indexOf(t)>-1).length?this._inactive_columns.parentElement.classList.add("collapse"):this._inactive_columns.parentElement.classList.remove("collapse"),this._show_column_container(),!0===await this._table.compute()&&this._show_side_panel_actions(),this.hasAttribute("filters")&&(this.filters=this.getAttribute("filters")),this._edit_port=await t.make_port(),this._edit_port_lock.resolve(this._edit_port);try{await this._debounce_update({force_update:!0})}catch(t){throw console.warn("Initial view failed, resetting UI state"),await this.reset(),t}e()}async get_maxes(){let t,e;const[n,r]=await Promise.all([this._view.schema(),this._view.num_columns()]),i=Object.keys(n||{}).length||1;if(void 0!==this._plugin.max_columns){const e=this._plugin.max_columns%i,n=this._plugin.max_columns+e;t=n<r?n:void 0}return void 0!==this._plugin.max_cells&&(e=Math.ceil(t?this._plugin.max_cells/t:this._plugin.max_cells/(r||1))),{max_cols:t,max_rows:e}}async _warn_render_size_exceeded(t,e){if(this._show_warnings&&(t||e)){const n=await this._view.num_columns(),r=await this._view.num_rows(),i=n*r,o=t&&t<n,s=e&&e<r;if(o&&s){this._plugin_information.classList.remove("hidden");const r=Ie`Rendering ${[t,n]} of columns and ${[n*e,i]} of points.`;return Object(v.render)(r,this._plugin_information_message),!0}if(o){this._plugin_information.classList.remove("hidden");const e=Ie`Rendering ${[t,n]} of columns.`;return Object(v.render)(e,this._plugin_information_message),!0}if(s){this._plugin_information.classList.remove("hidden");const t=Ie`Rendering ${[n*e,i]} of points.`;return Object(v.render)(t,this._plugin_information_message),!0}this._plugin_information.classList.add("hidden")}return!1}_calculate_throttle_timeout(){let t;const e=this.getAttribute("throttle");if(void 0!==e&&"null"!==e&&this.hasAttribute("throttle")){if(t=parseInt(e),isNaN(t)||t<0)return console.warn(`Bad throttle attribute value "${e}". Can be (non-negative integer) milliseconds.`),this.removeAttribute("throttle"),0}else{if(!this.__render_times||this.__render_times.length<5)return 0;t=this.__render_times.reduce((t,e)=>t+e,0)/this.__render_times.length,t=Math.min(5e3,t)}return Math.max(0,t)}_view_on_update(t){this._debounced||(this._debounced=setTimeout(async()=>{this._debounced=void 0;const e=this._render_time();this._task&&!this._task.initial&&this._task.cancel();const n=this._task=new xe,r=this._plugin.update||this._plugin.create;try{if(t){const{max_cols:t,max_rows:e}=await this.get_maxes();n.cancelled||(await this._warn_render_size_exceeded(t,e),await r.call(this,this._datavis,this._view,n,t,e))}else await r.call(this,this._datavis,this._view,n);e(),n.cancel()}catch(t){console.error("Error rendering plugin.",t)}finally{this.dispatchEvent(new Event("perspective-view-update"))}},this._calculate_throttle_timeout()))}async _validate_filters(){const t=[];for(const e of this._get_view_filter_nodes()){const n=e.shadowRoot.getElementById("filter_operand"),r=e.shadowRoot.getElementById("row_exclamation"),{operator:i,operand:o}=JSON.parse(e.getAttribute("filter")),s=[e.getAttribute("name"),i,o];await this._table.is_valid_filter(s)?(t.push(s),e.title="",n.style.borderColor="",r.hidden=!0):(e.title="Invalid Filter",n.style.borderColor="red",r.hidden=!1)}return t}_is_config_changed(t){const e=this.getAttribute("plugin");return!(Oe()(t,this._previous_config)&&e===this._previous_plugin_name||(this._previous_config=t,this._previous_plugin_name=e,0))}async _new_view({force_update:t=!1,ignore_size_check:e=!1,limit_points:n=!0}={}){if(!this._table)return;this._check_responsive_layout();const r=this._get_view_row_pivots(),i=this._get_view_column_pivots(),o=await this._validate_filters(),s=this._get_view_aggregates();if(0===s.length)return;const a=this._get_view_sorts();let c=s.map(t=>t.column),l={};for(const t of s)l[t.column]=t.op;for(const t of a){const e=t[0];if(-1===c.indexOf(e)&&!(i.indexOf(t)>-1||r.indexOf(t)>-1)){const t=this.get_aggregate_attribute(),{column:n,op:r}=t.reduce((t,n)=>n.column===e?n:t);l[n]=r}}const u={filter:o,row_pivots:r,column_pivots:i,aggregates:l,columns:c,sort:a,computed_columns:this._get_view_parsed_computed_columns()};this._view&&(this._view.remove_update(this._view_updater),this._view.delete(),this._view=void 0);try{this._view=this._table.view(u),this._view_updater=()=>this._view_on_update(n),this._view.on_update(this._view_updater)}catch(t){throw this._view.delete(),t}const p=this._render_time();this._render_count=(this._render_count||0)+1,this._task&&this._task.cancel();const h=this._task=new xe(()=>this._render_count--,!0);try{const{max_cols:r,max_rows:i}=await this.get_maxes();e||await this._warn_render_size_exceeded(r,i),n?await this._plugin.create.call(this,this._datavis,this._view,h,r,i,t):await this._plugin.create.call(this,this._datavis,this._view,h,void 0,void 0,t)}catch(t){console.warn(t)}finally{this.__render_times||(this.__render_times=[],this.dispatchEvent(new Event("perspective-view-update"))),p(),h.cancel(),0===this._render_count&&(this.removeAttribute("updating"),this.dispatchEvent(new Event("perspective-update-complete")))}}_check_loaded_table(){if(this._table){const t=this._table;delete this._table,this._load_table(t)}}_render_time(){const t=performance.now();return()=>{this.__render_times.unshift(performance.now()-t),this.__render_times=this.__render_times.slice(0,5)}}_restyle_plugin(){if(this._plugin.styleElement){const t=this._task=new xe;this._plugin.styleElement.call(this,this._datavis,this._view,t)}}_clear_state(t=!0){this._task&&this._task.cancel();const e=[];if(this._view){const t=this._view;this._view=void 0,e.push(t.delete()),t.remove_update(this._view_updater),t.remove_delete()}if(this._table&&t){const t=this._table;this._table=void 0,t._owner_viewer&&t._owner_viewer===this&&e.push(t.delete())}return Promise.all(e)}_set_updating(){let t;return this.toggleAttribute("updating",!0),this._updating_promise=new Promise(e=>{t=e}),t}_register_debounce_instance(){const t=s()((t,e,n,r)=>{this._new_view({ignore_size_check:e,force_update:n,limit_points:r}).then(t)},0);this._debounce_update=async({force_update:e=!1,ignore_size_check:n=!1,limit_points:r=!0}={})=>{if(this._table){let i=this._set_updating();await new Promise(i=>t(i,n,e,r)),i()}}}_get_worker(){return this._table?this._table._worker:h.a.shared_worker()}}const je=t=>{const e=[];for(name in t)e.push(v.html`
38 <option value="${name}">${t[name].name||name}</option>
39 `);return e};class Pe extends Re{_clear_columns(){this._inactive_columns.innerHTML="",this._active_columns.innerHTML=""}set_aggregate_attribute(t){let e=!1,n=t.reduce((t,n)=>(this._aggregate_defaults[n.column]!==n.op&&(t[n.column]=n.op,e=!0),t),{});e?this.setAttribute("aggregates",JSON.stringify(n)):this.removeAttribute("aggregates")}_get_type(t){let e=this._get_view_inactive_columns();if(e.length>0){const n=e.find(e=>e.getAttribute("name")===t);return n?n.getAttribute("type"):"integer"}return""}_set_row_type(t){const e=this._get_view_inactive_columns().filter(t=>"integer"===t.getAttribute("type")||"float"===t.getAttribute("type")).map(t=>t.getAttribute("name"));t.set_weights(e),t.setAttribute("type",this._get_type(t.getAttribute("name")))}_new_row(t,e,n,r,i,o){let s=document.createElement("perspective-row");if(e=e||this._get_type(t),!n){let r=this.get_aggregate_attribute();n=r&&(n=r.find(e=>e.column===t))?n.op:Object(d.get_type_config)(e).aggregate}if(r&&(s.setAttribute("filter",r),"string"===e)){const e=this._table.view({row_pivots:[t],columns:[]});e.to_json().then(t=>{s.choices(this._autocomplete_choices(t))}),e.delete()}i?s.setAttribute("sort-order",i):this._get_view_column_pivots().indexOf(t)>-1?s.setAttribute("sort-order","col asc"):s.setAttribute("sort-order","asc");const a=this._get_view_inactive_columns().filter(t=>"integer"===t.getAttribute("type")||"float"===t.getAttribute("type")).map(t=>t.getAttribute("name"));return s.set_weights(a),null===t?s.classList.add("null-column"):(s.setAttribute("type",e),s.setAttribute("name",t)),s.setAttribute("aggregate",Array.isArray(n)?JSON.stringify(n):n),s.addEventListener("visibility-clicked",this._column_visibility_clicked.bind(this)),s.addEventListener("aggregate-selected",this._column_aggregate_clicked.bind(this)),s.addEventListener("filter-selected",this._column_filter_clicked.bind(this)),s.addEventListener("close-clicked",t=>ue.call(this,t.detail)),s.addEventListener("sort-order",this._sort_order_clicked.bind(this)),s.addEventListener("row-drag",()=>{this.classList.add("dragging"),this._active_columns.style.overflow="hidden",this._original_index=Array.prototype.slice.call(this._active_columns.children).findIndex(e=>e.getAttribute("name")===t),-1!==this._original_index?(this._drop_target_hover=this._active_columns.children[this._original_index],setTimeout(()=>s.setAttribute("drop-target",!0))):this._drop_target_hover=this._new_row(t,e,n)}),s.addEventListener("row-dragend",()=>{this._active_columns.style.overflow="auto",this.classList.remove("dragging")}),o&&(s.setAttribute("computed_column",JSON.stringify(o)),s.classList.add("computed")),s}_update_computed_column_view(t){const e=this._get_view_parsed_computed_columns(),n=this._get_view_all_column_names(),r=this._get_view_active_column_names();if(0===Object.keys(t).length||0===e.length)return;let i=0;const o=JSON.parse(this.getAttribute("columns"))||[];let s=!1;for(const a of e){const e=a.column;if(!n.includes(e)&&o.includes(e)&&(s=!0),n.includes(e)||r.includes(e))continue;const c=this._new_row(e,t[e],null,null,null,e);this._inactive_columns.insertBefore(c,this._inactive_columns.childNodes[0]||null),i++}s?this._update_column_view(o,!0):i>0&&this._inactive_columns.parentElement.classList.contains("collapse")&&this._inactive_columns.parentElement.classList.remove("collapse")}_diff_computed_column_view(t,e){const n=[],r=e.map(t=>t.column);for(const e of t)r.includes(e.column)||n.push(e);return n}_reset_computed_column_view(t){if(!t||0===t.length)return;const e=t.map(t=>t.column),n=this._get_view_active_column_names().filter(t=>!e.includes(t)),r=this._get_view_aggregates().filter(t=>!e.includes(t.column)),i=this._get_view_row_pivots().filter(t=>!e.includes(t)),o=this._get_view_column_pivots().filter(t=>!e.includes(t)),s=this._get_view_sorts().filter(t=>!e.includes(t[0])),a=this._get_view_filters().filter(t=>!e.includes(t[0]));this.set_aggregate_attribute(r),this.setAttribute("columns",JSON.stringify(n)),this.setAttribute("row-pivots",JSON.stringify(i)),this.setAttribute("column-pivots",JSON.stringify(o)),this.setAttribute("sort",JSON.stringify(s)),this.setAttribute("filters",JSON.stringify(a));const c=this._get_view_all_columns().filter(t=>t.classList.contains("computed"));for(const t of c)this._inactive_columns.removeChild(t);const l=this._get_view_active_columns().filter(t=>null!=t),u=this._get_view_inactive_columns();l.length===u.length?this._inactive_columns.parentElement.classList.add("collapse"):this._inactive_columns.parentElement.classList.remove("collapse")}_update_column_view(t,e=!1){if(t||(t=this._get_view_active_column_names()),this._plugin.initial&&this._plugin.initial.names)for(;t.length<this._plugin.initial.names.length;)t.push(null);this.setAttribute("columns",JSON.stringify(t));const n=t.filter(t=>null!=t),r=this._get_view_inactive_columns();n.length===r.length?this._inactive_columns.parentElement.classList.add("collapse"):this._inactive_columns.parentElement.classList.remove("collapse"),r.forEach(t=>{-1===n.indexOf(t.getAttribute("name"))?t.classList.remove("active"):t.classList.add("active")}),e&&this._update_column_list(t,this._active_columns,(t,e)=>{if(null===t)return this._new_row(null);{const n=r.find(e=>e.getAttribute("name")===t);if(n){const t=n.getAttribute("name");let r;return e.includes(t)&&(r=t),this._new_row(t,n.getAttribute("type"),void 0,void 0,void 0,r)}}})}_update_column_list(t,e,n,r){r=r||((t,e)=>e.getAttribute("name")===t);const i=Array.prototype.slice.call(e.children),o=this._get_view_parsed_computed_columns().map(t=>t.column);for(let s=0,a=0;s<i.length||a<t.length;s++,a++){const c=t[a],l=i[s],u=i[s+1];if(l)if(void 0===c)e.removeChild(l);else if(r(c,l))this._set_row_type(l);else if(l.classList.contains("null-column")){const t=n(c,o);t&&e.replaceChild(t,l)}else if(u&&r(c,u))e.removeChild(l),s++;else{const t=n(c,o);t&&(e.insertBefore(t,l),s--)}else{const t=n(c,o);t&&e.appendChild(t)}}}_set_row_styles(){let t="";if(this._plugin.initial&&this._plugin.initial.names)for(const e in this._plugin.initial.names){const n=this._plugin.initial.names[e];t+=`#active_columns perspective-row:nth-child(${parseInt(e)+1}){margin-top:23px;}`,t+=`#active_columns perspective-row:nth-child(${parseInt(e)+1}):before{content:"${n}";}`}this.shadowRoot.querySelector("#psp_styles").innerHTML=t}_show_column_container(){this.shadowRoot.querySelector("#columns_container").style.visibility="visible"}_show_side_panel_actions(){this.shadowRoot.querySelector("#side_panel__actions").style.visibility="visible"}_remove_null_columns(t=0){const e=this._get_view_active_columns();for(;++t<e.length;){const n=e[t];n.classList.contains("null-column")&&this.shadowRoot.querySelector("#active_columns").removeChild(n)}}_set_column_defaults(){const t=this._get_view_all_columns(),e=this._get_view_active_valid_columns(),n=this._get_view_active_valid_column_names();if(t.length>0)if(this._plugin.initial){let n=[],r=this._plugin.initial.count||2;this._fill_numeric(e,n),this._fill_numeric(t,n),this._fill_numeric(t,n,!0),n=n.slice(0,r);const i=this._plugin.initial.names;for(;i&&n.length<i.length;)n.push(null);this.setAttribute("columns",JSON.stringify(n))}else"select"===this._plugin.selectMode?this.setAttribute("columns",JSON.stringify([t[0].getAttribute("name")])):(this.setAttribute("columns",JSON.stringify(n)),this._remove_null_columns())}_fill_numeric(t,e,n=!1){for(let r of t){let t=r.getAttribute("type"),i=r.getAttribute("name");(n||["float","integer"].indexOf(t)>-1&&-1===e.indexOf(i))&&e.push(i)}}async _check_responsive_layout(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#app");if(this.clientHeight<500&&this.clientWidth>600&&this._get_view_columns({active:!1}).length>this._get_view_columns().length){if(!t.classList.contains("columns_horizontal")){const e=this._persisted_side_panel_width;this._persisted_side_panel_width=this._side_panel.style.width,this._side_panel.style.width=e||"",t.classList.add("columns_horizontal")}}else{if(t.classList.contains("columns_horizontal")){const e=this.shadowRoot.querySelector("#pivot_chart_container");e.clientWidth,this._side_panel.clientWidth;const n=this._persisted_side_panel_width||e.clientWidth+this._side_panel.clientWidth/2,r=e.clientHeight+50;return await this._pre_resize(n,r,()=>{const e=this._persisted_side_panel_width;this._persisted_side_panel_width=this._side_panel.style.width,this._side_panel.style.width=e||"",t.classList.remove("columns_horizontal")}),!0}this.clientWidth<600?t.classList.contains("narrow")||t.classList.add("narrow"):t.classList.contains("narrow")&&t.classList.remove("narrow")}return!1}return!1}_register_ids(){this._aggregate_selector=this.shadowRoot.querySelector("#aggregate_selector"),this._vis_selector=this.shadowRoot.querySelector("#vis_selector"),this._filters=this.shadowRoot.querySelector("#filters"),this._row_pivots=this.shadowRoot.querySelector("#row_pivots"),this._column_pivots=this.shadowRoot.querySelector("#column_pivots"),this._datavis=this.shadowRoot.querySelector("#pivot_chart"),this._active_columns=this.shadowRoot.querySelector("#active_columns"),this._inactive_columns=this.shadowRoot.querySelector("#inactive_columns"),this._side_panel_actions=this.shadowRoot.querySelector("#side_panel__actions"),this._add_computed_expression_button=this.shadowRoot.querySelector("#add-computed-expression"),this._computed_expression_widget=this.shadowRoot.querySelector("perspective-computed-expression-widget"),this._inner_drop_target=this.shadowRoot.querySelector("#drop_target_inner"),this._drop_target=this.shadowRoot.querySelector("#drop_target"),this._config_button=this.shadowRoot.querySelector("#config_button"),this._reset_button=this.shadowRoot.querySelector("#reset_button"),this._download_button=this.shadowRoot.querySelector("#download_button"),this._copy_button=this.shadowRoot.querySelector("#copy_button"),this._side_panel=this.shadowRoot.querySelector("#side_panel"),this._top_panel=this.shadowRoot.querySelector("#top_panel"),this._sort=this.shadowRoot.querySelector("#sort"),this._transpose_button=this.shadowRoot.querySelector("#transpose_button"),this._plugin_information=this.shadowRoot.querySelector(".plugin_information"),this._plugin_information_action=this.shadowRoot.querySelector(".plugin_information__action"),this._plugin_information_action_close=this.shadowRoot.querySelector(".plugin_information__action--close"),this._plugin_information_message=this.shadowRoot.querySelector("#plugin_information_count"),this._resize_bar=this.shadowRoot.querySelector("#resize_bar")}_register_view_options(){let t=i.b.getInstance();Object(v.render)(je(t),this._vis_selector)}_register_data_attribute(){if(this.getAttribute("data")){let t=this.getAttribute("data");try{t=JSON.parse(t)}catch(t){}this.load(t)}}_autocomplete_choices(t){const e=[];for(let n=1;n<t.length;n++){const r=t[n].__ROW_PATH__;Array.isArray(r)&&r.length>0&&r[0]&&e.push(r[0])}return e}}class Me extends Pe{_show_context_menu(t){return this.shadowRoot.querySelector("#app").classList.toggle("show_menu"),t.stopPropagation(),t.preventDefault(),!1}_hide_context_menu(){this.shadowRoot.querySelector("#app").classList.remove("show_menu")}async _toggle_config(t){if(!t||2!==t.button){this._show_config=!this._show_config,this._hide_context_menu();const t=this.shadowRoot.querySelector("#pivot_chart_container");this._show_config?await this._post_resize(()=>{this.toggleAttribute("settings",!0)},()=>{this._side_panel.style.display="flex",this._top_panel.style.display="flex",this.dispatchEvent(new CustomEvent("perspective-toggle-settings",{detail:this._show_config}))}):await this._pre_resize(t.clientWidth+this._side_panel.clientWidth,t.clientHeight+this._top_panel.clientHeight,()=>{this._side_panel.style.display="none",this._top_panel.style.display="none",this.removeAttribute("settings")},()=>this.dispatchEvent(new CustomEvent("perspective-toggle-settings",{detail:this._show_config})))}}async _pre_resize(t,e,n,r){this._datavis.style.width=`${t}px`,this._datavis.style.height=`${e}px`;try{!document.hidden&&this.offsetParent&&await this._plugin.resize.call(this)}finally{null==r||r(),this._datavis.style.width="100%",this._datavis.style.height="100%",n()}}async _post_resize(t,e){null==e||e();try{!document.hidden&&this.offsetParent&&await this._plugin.resize.call(this)}finally{t()}}_open_computed_expression_widget(t){t.stopImmediatePropagation(),this._computed_expression_widget._computed_expression_parser=this._computed_expression_parser,this._computed_expression_widget._get_type=this._get_type.bind(this),this._computed_expression_widget._get_view_all_column_names=this._get_view_all_column_names.bind(this),this._computed_expression_widget._get_view_column_names_by_types=this._get_view_column_names_by_types.bind(this),this._computed_expression_widget.style.display="flex",this._side_panel_actions.style.display="none",this._computed_expression_widget._observe_editor()}_save_computed_expression(t){const e=t.detail.expression;let n=this._get_view_computed_columns();n.includes(e)?console.warn(`"${e}" was not applied because it already exists.`):(n.push(e),this.setAttribute("computed-columns",JSON.stringify(n)))}async _type_check_computed_expression(t){const e=t.detail.parsed_expression||[];if(0===e.length)return void this._computed_expression_widget._type_check_expression({});const n={};for(const t of e)n[t.column]=t.computed_function_name;const r=await this._table.computed_schema(e),i={};for(const t in n)r[t]||(i[t]=await this._table.get_computation_input_types(n[t]));this._computed_expression_widget._type_check_expression(r,i)}_clear_all_computed_expressions(){this.setAttribute("computed-columns",JSON.stringify([]))}_set_computed_expression(t){return t}_column_visibility_clicked(t){const e=t.currentTarget;if("active_columns"===e.parentElement.getAttribute("id")){var n;const s=(null===(n=this._plugin.initial)||void 0===n?void 0:n.count)||1;if(this._get_view_active_valid_column_count()===s)return;if(t.detail.shiftKey)for(let t of Array.prototype.slice.call(this._active_columns.children))t!==e&&this._active_columns.removeChild(t);else{var r,i,o;const t=Array.prototype.slice.call(this._active_columns.children).indexOf(e);if(t<(null===(r=this._plugin.initial)||void 0===r?void 0:r.count))return;t<(null===(i=this._plugin.initial)||void 0===i?void 0:null===(o=i.names)||void 0===o?void 0:o.length)-1&&this._active_columns.insertBefore(this._new_row(null),e),this._active_columns.removeChild(e)}}else{var s;if(t.detail.shiftKey&&"toggle"===this._plugin.selectMode||!t.detail.shiftKey&&"select"===this._plugin.selectMode)for(let t of Array.prototype.slice.call(this._active_columns.children))this._active_columns.removeChild(t);let n=this._new_row(e.getAttribute("name"),e.getAttribute("type"));const r=this._get_view_active_columns();let i=r.length-1;if(r[i]&&(null===(s=r[i])||void 0===s?void 0:s.classList.contains("null-column"))){for(;i-- >0;)if(!r[i].classList.contains("null-column")){this._active_columns.replaceChild(n,r[i+1]);break}}else this._active_columns.appendChild(n)}this._check_responsive_layout(),this._update_column_view()}_column_aggregate_clicked(){let t=this.get_aggregate_attribute(),e=this._get_view_aggregates();for(let n of t){let t=e.find(t=>t.column===n.column);t&&(n.op=t.op)}this.set_aggregate_attribute(t),this._update_column_view(),this._debounce_update()}_column_filter_clicked(){let t=this._get_view_filters();this._updating_filter=!0,this.setAttribute("filters",JSON.stringify(t)),this._updating_filter=!1,this._debounce_update()}_increment_sort(t,e,n){let r=["asc","desc"];return e&&r.push("col asc","col desc"),n&&(r=r.map(t=>`${t} abs`)),r.push("none"),r[(r.indexOf(t)+1)%r.length]}_sort_order_clicked(t){const e=t.target,n=t.detail.shiftKey&&"string"!==e.getAttribute("type"),r=this._increment_sort(e.getAttribute("sort-order"),this._get_view_column_pivots().length>0,n);e.setAttribute("sort-order",r);const i=this._get_view_sorts();this.setAttribute("sort",JSON.stringify(i))}_transpose(){const t=this.hasAttribute("row-pivots"),e=this.hasAttribute("column-pivots");if(t&&e){let t=this.getAttribute("row-pivots");this.setAttribute("row-pivots",this.getAttribute("column-pivots")),this.setAttribute("column-pivots",t)}else if(t){let t=this.getAttribute("row-pivots");this.removeAttribute("row-pivots"),this.setAttribute("column-pivots",t)}else if(e){let t=this.getAttribute("column-pivots");this.removeAttribute("column-pivots"),this.setAttribute("row-pivots",t)}else this.removeAttribute("column-pivots"),this.removeAttribute("row-pivots")}_reset_sidepanel(){this._side_panel.style.width=""}_resize_sidepanel(t){const e=document.body.style.cursor;document.body.style.cursor="col-resize";const n=t.clientX,r=this._side_panel.offsetWidth,i=t=>{const e=Math.max(0,Math.min(r+(t.clientX-n),this.offsetWidth-10));this._side_panel.style.width=`${e}px`,this._plugin&&this.notifyResize()},o=()=>{document.body.style.cursor=e,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)}_vis_selector_changed(){var t;this._plugin_information.classList.add("hidden"),this.setAttribute("plugin",this._vis_selector.value),this._active_columns.classList.remove("one_lock","two_lock");const e=["one_lock","two_lock"][(null===(t=this._plugin.initial)||void 0===t?void 0:t.count)-1];e&&this._active_columns.classList.add(e),this._debounce_update()}_register_callbacks(){this._sort.addEventListener("drop",pe.bind(this)),this._sort.addEventListener("dragend",ue.bind(this)),this._sort.addEventListener("dragenter",ye.bind(this)),this._sort.addEventListener("dragover",be.bind(this)),this._sort.addEventListener("dragleave",we.bind(this)),this._row_pivots.addEventListener("drop",pe.bind(this)),this._row_pivots.addEventListener("dragend",ue.bind(this)),this._row_pivots.addEventListener("dragenter",ye.bind(this)),this._row_pivots.addEventListener("dragover",be.bind(this)),this._row_pivots.addEventListener("dragleave",we.bind(this)),this._column_pivots.addEventListener("drop",pe.bind(this)),this._column_pivots.addEventListener("dragend",ue.bind(this)),this._column_pivots.addEventListener("dragenter",ye.bind(this)),this._column_pivots.addEventListener("dragover",be.bind(this)),this._column_pivots.addEventListener("dragleave",we.bind(this)),this._filters.addEventListener("drop",pe.bind(this)),this._filters.addEventListener("dragend",ue.bind(this)),this._filters.addEventListener("dragenter",ye.bind(this)),this._filters.addEventListener("dragover",be.bind(this)),this._filters.addEventListener("dragleave",we.bind(this)),this._active_columns.addEventListener("drop",ve.bind(this)),this._active_columns.addEventListener("dragenter",ye.bind(this)),this._active_columns.addEventListener("dragend",he.bind(this)),this._active_columns.addEventListener("dragover",ge.bind(this)),this._active_columns.addEventListener("dragleave",de.bind(this)),this._add_computed_expression_button.addEventListener("click",this._open_computed_expression_widget.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-save",this._save_computed_expression.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-resize",this._reset_sidepanel.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-type-check",this._type_check_computed_expression.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-remove",this._clear_all_computed_expressions.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-update",this._set_computed_expression.bind(this)),this._config_button.addEventListener("mousedown",this._toggle_config.bind(this)),this._config_button.addEventListener("contextmenu",this._show_context_menu.bind(this)),this._reset_button.addEventListener("click",this.reset.bind(this)),this._copy_button.addEventListener("click",t=>this.copy(t.shiftKey)),this._download_button.addEventListener("click",t=>this.download(t.shiftKey)),this._transpose_button.addEventListener("click",this._transpose.bind(this)),this._drop_target.addEventListener("dragover",be.bind(this)),this._resize_bar.addEventListener("mousedown",this._resize_sidepanel.bind(this)),this._resize_bar.addEventListener("dblclick",this._reset_sidepanel.bind(this)),this._vis_selector.addEventListener("change",this._vis_selector_changed.bind(this)),this._plugin_information_action.addEventListener("click",()=>{this._debounce_update({ignore_size_check:!0,limit_points:!1}),this._plugin_information.classList.add("hidden")}),this._plugin_information_action_close.addEventListener("click",()=>{this._plugin_information.classList.add("hidden")})}}var De;function Ue(t,e,n,r,i){var o={};return Object.keys(r).forEach((function(t){o[t]=r[t]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(t,e,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}const Fe=["selectable","editable","plugin","computed-columns","row-pivots","column-pivots","aggregates","filters","sort","columns"];Object(r.b)(ie.a,se.a,ce.a)((Ue((De=class extends Me{constructor(){super(),this._register_debounce_instance(),this._show_config=!0,this._show_warnings=!0,this.__render_times=[],this._resize_handler=this.notifyResize.bind(this),this._computed_expression_parser=Qt,this._edit_port=null,this._edit_port_lock=Object(r.d)(),window.addEventListener("resize",this._resize_handler)}connectedCallback(){0===Object.keys(i.b.getInstance()).length&&Object(i.a)(),this.toggleAttribute("settings",!0),this._register_ids(),this._register_callbacks(),this._register_view_options(),this._register_data_attribute(),this.toggleConfig(),this._check_loaded_table()}sort(t){null!=t&&0!==t.length||(this.hasAttribute("sort")&&this.removeAttribute("sort"),t=[]);var e=this._sort.querySelector("ul");this._update_column_list(t,e,(t,e)=>{let n="asc";Array.isArray(t)&&(n=t[1],t=t[0]);let r=void 0;return e.includes(t)&&(r=t),this._new_row(t,!1,!1,!1,n,r)},(t,e)=>Array.isArray(t)?e.getAttribute("name")===t[0]&&e.getAttribute("sort-order")===t[1]:e.getAttribute("name")===t),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}columns(t){null!=t&&0!==t.length||(this.hasAttribute("columns")&&(this._initial_col_order?this.setAttribute("columns",JSON.stringify(this._initial_col_order)):this.removeAttribute("columns")),t=(this._initial_col_order||[]).slice()),this._update_column_view(t,!0),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}"computed-columns"(t){const e=this._set_updating();(async()=>{if("none"!==this._computed_expression_widget.style.display&&this._computed_expression_widget._close_expression_widget(),null==t||0===t.length){if(this.hasAttribute("computed-columns")){this.removeAttribute("computed-columns");const t=this._get_view_parsed_computed_columns();return this._reset_computed_column_view(t),this.removeAttribute("parsed-computed-columns"),void e()}t=[]}let n=[];for(const e of t)"string"==typeof e?this._computed_expression_parser.is_initialized&&(n=n.concat(this._computed_expression_parser.parse(e))):n.push(e);let r={};if(this._table){r=await this._table.computed_schema(n);const t=await this._validate_parsed_computed_columns(n,r);if(t.length!==n.length){const e=[];for(let r=0;r<n.length;r++)r>t.length-1?e.push(n[r]):n[r].column!==t[r].column&&e.push(n[r]);console.warn("Could not apply these computed columns:",JSON.stringify(e))}n=t}const i=this._get_view_parsed_computed_columns(),o=this._diff_computed_column_view(i,n);this._reset_computed_column_view(o),this.setAttribute("parsed-computed-columns",JSON.stringify(n)),this._update_computed_column_view(r),this.dispatchEvent(new Event("perspective-config-update")),await this._debounce_update(),e()})()}aggregates(t){null!=t&&0!==Object.keys(t).length||(this.hasAttribute("aggregates")&&this.removeAttribute("aggregates"),t={}),this._get_view_dom_columns().map(e=>{let n=t[e.getAttribute("name")];n&&e.setAttribute("aggregate",Array.isArray(n)?JSON.stringify(n):n)}),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}filters(t){if(null!=t&&0!==t.length||(this.hasAttribute("filters")&&this.removeAttribute("filters"),t=[]),!this._updating_filter){var e=this._filters.querySelector("ul");this._update_column_list(t,e,(t,e)=>{const n=JSON.stringify({operator:t[1],operand:t[2]}),r=t[0];let i=void 0;return e.includes(r)&&(i=r),this._new_row(r,void 0,void 0,n,void 0,i)},(t,e)=>e.getAttribute("name")===t[0]&&e.getAttribute("filter")===JSON.stringify({operator:t[1],operand:t[2]}))}this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}set plugin(t){if("null"===t||null==t)return void this.setAttribute("plugin",this._vis_selector.options[0].value);this.innerHTML="";const e=Object.keys(i.b.getInstance());if(this.hasAttribute("plugin")){let t=this.getAttribute("plugin");if(-1===e.indexOf(t)){const n=e.find(e=>e.indexOf(t)>-1);n?(console.warn(`Unknown plugin "${t}", using "${n}"`),this.setAttribute("plugin",n)):(console.error(`Unknown plugin "${t}"`),this.setAttribute("plugin",this._vis_selector.options[0].value))}else this._vis_selector.value!==t&&(this._vis_selector.value=t,this._vis_selector_changed()),this._set_row_styles(),this._set_column_defaults(),this.dispatchEvent(new Event("perspective-config-update"))}else this.setAttribute("plugin",this._vis_selector.options[0].value)}"column-pivots"(t){null!=t&&0!==t.length||(this.hasAttribute("column-pivots")&&this.removeAttribute("column-pivots"),t=[]);const e=this._column_pivots.querySelector("ul");this._update_column_list(t,e,(t,e)=>{let n=void 0;return e.includes(t)&&(n=t),this._new_row(t,void 0,void 0,void 0,void 0,n)}),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}"row-pivots"(t){null!=t&&0!==t.length||(this.hasAttribute("row-pivots")&&this.removeAttribute("row-pivots"),t=[]);const e=this._row_pivots.querySelector("ul");this._update_column_list(t,e,(t,e)=>{let n=void 0;return e.includes(t)&&(n=t),this._new_row(t,void 0,void 0,void 0,void 0,n)}),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}set editable(t){"null"===t?this.hasAttribute("editable")&&this.removeAttribute("editable"):this.toggleAttribute("editable",!0),this._debounce_update({force_update:!0}),this.dispatchEvent(new Event("perspective-config-update"))}set throttle(t){"null"===t&&this.hasAttribute("throttle")&&this.removeAttribute("throttle"),this._calculate_throttle_timeout()}set selectable(t){"null"===t?this.hasAttribute("selectable")&&this.removeAttribute("selectable"):this.toggleAttribute("selectable",!0),this._debounce_update({force_update:!0}),this.dispatchEvent(new Event("perspective-config-update"))}get worker(){return this._get_worker()}get table(){return this._table}get view(){return this._view}async load(t,e){let n;if(t instanceof Promise)n=await t;else{try{t=t.trim()}catch(t){}"table"===t.type?n=t:(n=this.worker.table(t,e),n._owner_viewer=this)}this.isConnected?await this._load_table(n):this._table=n}update(t){void 0===this._table?this.load(t):this._table.update(t)}async notifyResize(t){await this._check_responsive_layout()||document.hidden||!this.offsetParent||await this._plugin.resize.call(this,t)}clone(t){this._inner_drop_target&&(this._inner_drop_target.innerHTML=t._inner_drop_target.innerHTML),this._load_table(t.table),this.restore(t.save())}delete(t=!0){let e=this._clear_state(t);return this._plugin.delete&&this._plugin.delete.call(this),window.removeEventListener("load",this._resize_handler),window.removeEventListener("resize",this._resize_handler),e}restyleElement(){this._restyle_plugin()}save(){let t={};const e=new Set(Fe);for(let n=0;n<this.attributes.length;n++){let r=this.attributes[n];e.has(r.name)&&(""===r.value?t[r.name]=!0:"plugin"!==r.name&&void 0!==r.value&&null!==r.value?t[r.name]=JSON.parse(r.value):t[r.name]=r.value,e.delete(r.name))}for(const n of e)t[n]=null;return this._plugin.save&&(t.plugin_config=this._plugin.save.call(this)),t}async restore(t){"string"==typeof t&&(t=JSON.parse(t));for(const e of Fe)if(t.hasOwnProperty(e)){let n=t[e];!0===n?this.toggleAttribute(e,!0):null!=n&&!1!==n?("string"!=typeof n&&(n=JSON.stringify(n)),this.setAttribute(e,n)):this.removeAttribute(e)}this._plugin.restore&&t.plugin_config&&this._plugin.restore.call(this,t.plugin_config),await this._debounce_update()}async flush(){for(await new Promise(setTimeout);this.hasAttribute("updating");)await this._updating_promise}clear(){var t;null===(t=this._table)||void 0===t||t.clear()}replace(t){this._table?this._table.replace(t):this._load(t)}reset(){this.removeAttribute("row-pivots"),this.removeAttribute("column-pivots"),this.removeAttribute("filters"),this.removeAttribute("sort"),this._initial_col_order?this.setAttribute("columns",JSON.stringify(this._initial_col_order)):this.removeAttribute("columns"),this.setAttribute("plugin",Object.keys(i.b.getInstance())[0]),this.dispatchEvent(new Event("perspective-config-update")),this._hide_context_menu()}async download(t=!1){const e=t?this._table.view():this._view,n=await e.to_csv(),r=document.createElement("a"),i=n,o=i.length,s=new Uint8Array(o);for(let t=0;t<o;t++)s[t]=i.charCodeAt(t);const a=new Blob([s]);r.setAttribute("href",URL.createObjectURL(a)),r.setAttribute("download","perspective.csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),this._hide_context_menu()}copy(t=!1){let e;(t?this._table.view():this._view).to_csv().then(t=>{e=t}).catch(t=>{console.error(t),e=""});let n=0,i=()=>{void 0!==e?Object(r.c)(e):n<200?(n++,setTimeout(i,50)):console.warn("Timeout expired - copy to clipboard cancelled.")};i(),this._hide_context_menu()}async toggleConfig(){await this._toggle_config()}async getEditPort(){return this._edit_port_lock}}).prototype,"sort",[r.a],Object.getOwnPropertyDescriptor(De.prototype,"sort"),De.prototype),Ue(De.prototype,"columns",[r.a],Object.getOwnPropertyDescriptor(De.prototype,"columns"),De.prototype),Ue(De.prototype,"computed-columns",[r.a],Object.getOwnPropertyDescriptor(De.prototype,"computed-columns"),De.prototype),Ue(De.prototype,"aggregates",[r.e],Object.getOwnPropertyDescriptor(De.prototype,"aggregates"),De.prototype),Ue(De.prototype,"filters",[r.a],Object.getOwnPropertyDescriptor(De.prototype,"filters"),De.prototype),Ue(De.prototype,"column-pivots",[r.a],Object.getOwnPropertyDescriptor(De.prototype,"column-pivots"),De.prototype),Ue(De.prototype,"row-pivots",[r.a],Object.getOwnPropertyDescriptor(De.prototype,"row-pivots"),De.prototype),Ue(De.prototype,"notifyResize",[r.g],Object.getOwnPropertyDescriptor(De.prototype,"notifyResize"),De.prototype),De))}]))},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(69);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(29),i=n(12),o=n(73),s=function(t){return function(e,n,s){var a,c=r(e),l=i(c.length),u=o(s,l);if(t&&n!=n){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,n){var r=n(35);t.exports=r("document","documentElement")},function(t,e,n){var r=n(1);t.exports=r},function(t,e,n){var r=n(1),i=n(74),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},function(t,e,n){var r=n(3),i=n(107),o=n(54),s=n(8);t.exports=function(t,e){for(var n=i(e),a=s.f,c=o.f,l=0;l<n.length;l++){var u=n[l];r(t,u)||a(t,u,c(e,u))}}},function(t,e,n){var r=n(35),i=n(55),o=n(77),s=n(10);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(4),i=/#|\.prototype\./,o=function(t,e){var n=a[s(t)];return n==l||n!=c&&("function"==typeof e?r(e):!!e)},s=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},function(t,e,n){var r=n(4);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(9);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e){t.exports.default={types:{float:{filter_operator:"==",aggregate:"sum",format:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},string:{filter_operator:"==",aggregate:"count"},integer:{filter_operator:"==",aggregate:"sum",format:{}},boolean:{filter_operator:"==",aggregate:"count"},datetime:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric"},null_value:-1}}}},function(t,e){t.exports.default=function(){}},function(t,e,n){t.exports=n(233)},function(t,e,n){"use strict";n(115);var r=n(17),i=n(4),o=n(2),s=n(57),a=n(5),c=o("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u="$0"==="a".replace(/./,"$0"),p=o("replace"),h=!!/./[p]&&""===/./[p]("a","$0"),d=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,p){var f=o(t),_=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),m=_&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!_||!m||"replace"===t&&(!l||!u||h)||"split"===t&&!d){var g=/./[f],v=n(f,""[t],(function(t,e,n,r,i){return e.exec===s?_&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),y=v[0],b=v[1];r(String.prototype,t,y),r(RegExp.prototype,f,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}p&&a(RegExp.prototype[f],"sham",!0)}},function(t,e,n){"use strict";var r=n(24),i=n(57);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){"use strict";var r=n(10);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(4);function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){"use strict";var r=n(58).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(30),i=n(57);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e){t.exports=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)}},function(t,e,n){"use strict";n.r(e),n.d(e,"WebSocketClient",(function(){return a})),n.d(e,"WebSocketManager",(function(){return c}));n(13);var r=n(46),i=n(97);const o=15e3;let s=0;class a extends r.a{constructor(t){super(),this._ws=t,this._ws.binaryType="arraybuffer",this._ws.onopen=()=>{this.send({id:-1,cmd:"init"})};const e=()=>{this._ws.send("heartbeat"),setTimeout(e,o)};setTimeout(e,15e3),this._ws.onmessage=t=>{if("heartbeat"!==t.data)if(this._pending_arrow){let e={data:{id:this._pending_arrow,data:t.data}};if(void 0!==this._pending_port_id){const n={port_id:this._pending_port_id,delta:t.data};e.data.data=n}this._handle(e),delete this._pending_port_id,delete this._pending_arrow}else(t=JSON.parse(t.data)).is_transferable?(this._pending_arrow=t.id,t.data&&void 0!==t.data.port_id&&(this._pending_port_id=t.data.port_id)):this._handle({data:t})}}send(t){if(t.args&&t.args.length>0&&t.args[0]instanceof ArrayBuffer&&void 0!==t.args[0].byteLength){const e=t;return t.is_transferable=!0,this._ws.send(JSON.stringify(e)),void this._ws.send(t.args[0])}this._ws.send(JSON.stringify(t))}terminate(){return new Promise(t=>{this._ws.onclose=t,this._ws.close()})}}class c extends i.a{constructor(...t){super(...t),this.requests_id_map=new Map,this.requests={},this.websockets={},setInterval(()=>{Object.entries(this.websockets).forEach(([t,e])=>{if(!1===e.isAlive)return delete this.websockets[t],e.terminate();e.isAlive=!1})},3e4)}add_connection(t){t.isAlive=!0,t.binaryType="arraybuffer",t.id=s++,t.on("message",e=>{if(t.isAlive=!0,"heartbeat"!==e){if(this._is_transferable){let t=[e];(e=this._is_transferable_pre_message).args&&e.args.length>1&&(t=t.concat(e.args.slice(1))),e.args=t,delete e.is_transferable,this._is_transferable=!1,this._is_transferable_pre_message=void 0}else if((e=JSON.parse(e)).is_transferable)return this._is_transferable=!0,void(this._is_transferable_pre_message=e);try{const n=`${e.id}/${t.id}`;this.requests_id_map.set(n,e.id),e.id=n,this.requests[e.id]={ws:t,msg:e},this.process(e,t.id)}catch(t){console.error(t)}}else t.send("heartbeat")}),t.on("close",()=>{this.clear_views(t.id)}),t.on("error",console.error)}post(t,e){const n=this.requests[t.id],r=t.id;if(n.ws.readyState>1)throw delete this.requests[r],new Error("Connection closed");t.id=this.requests_id_map.get(r),e?(t.is_transferable=!0,n.ws.send(JSON.stringify(t)),n.ws.send(e[0])):n.ws.send(JSON.stringify(t)),n.msg.subscribe||(this.requests_id_map.delete(r),delete this.requests[r])}_host(t,e,n){if(void 0!==t[e])throw new Error(`"${e}" already exists`);n.on_delete(()=>{delete t[e]}),t[e]=n}host_table(t,e){this._host(this._tables,t,e)}host_view(t,e){this._host(this._views,t,e)}eject_table(t){delete this._tables[t]}eject_view(t){delete this._views[t]}}},function(t,e,n){var r=n(37),i=n(123),o=n(124),s="Expected a function",a=Math.max,c=Math.min;t.exports=function(t,e,n){var l,u,p,h,d,f,_=0,m=!1,g=!1,v=!0;if("function"!=typeof t)throw new TypeError(s);function y(e){var n=l,r=u;return l=u=void 0,_=e,h=t.apply(r,n)}function b(t){var n=t-f;return void 0===f||n>=e||n<0||g&&t-_>=p}function w(){var t=i();if(b(t))return E(t);d=setTimeout(w,function(t){var n=e-(t-f);return g?c(n,p-(t-_)):n}(t))}function E(t){return d=void 0,v&&l?y(t):(l=u=void 0,h)}function O(){var t=i(),n=b(t);if(l=arguments,u=this,f=t,n){if(void 0===d)return function(t){return _=t,d=setTimeout(w,e),m?y(t):h}(f);if(g)return clearTimeout(d),d=setTimeout(w,e),y(f)}return void 0===d&&(d=setTimeout(w,e)),h}return e=o(e)||0,r(n)&&(m=!!n.leading,p=(g="maxWait"in n)?a(o(n.maxWait)||0,e):p,v="trailing"in n?!!n.trailing:v),O.cancel=function(){void 0!==d&&clearTimeout(d),_=0,l=f=u=d=void 0},O.flush=function(){return void 0===d?h:E(i())},O}},function(t,e,n){var r=n(11);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(37),i=n(125),o=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var n=c.test(t);return n||l.test(t)?u(t.slice(2),n?2:8):a.test(t)?o:+t}},function(t,e,n){var r=n(27),i=n(28),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==o}},function(t,e,n){var r=n(59),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected?(t.preventDefault(),r.select(void 0,void 0,t)):9===e&&r.selected&&r.tabSelect?r.select(void 0,void 0,t):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach((function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}})),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map((function(r){return new n(t.data(r,e))})).filter((function(n){return t.filter(n,e)})),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach((function(n,r){t.ul.appendChild(t.item(n,e,r))})),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function s(){o("input.awesomplete").forEach((function(t){new e(t)}))}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var s=i(o);s.parentNode.insertBefore(n,s),n.appendChild(s),null!=s.getAttribute("autofocus")&&s.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach((function(e){t.addEventListener(e,r)}))}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach((function(e){t.removeEventListener(e,r)}))}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",s)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},function(t,e,n){var r=n(130);t.exports=function(t,e){return r(t,e)}},function(t,e,n){var r=n(131),i=n(28);t.exports=function t(e,n,o,s,a){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,s,t,a))}},function(t,e,n){var r=n(132),i=n(86),o=n(164),s=n(168),a=n(190),c=n(61),l=n(87),u=n(89),p=1,h="[object Arguments]",d="[object Array]",f="[object Object]",_=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,g,v){var y=c(t),b=c(e),w=y?d:a(t),E=b?d:a(e),O=(w=w==h?f:w)==f,x=(E=E==h?f:E)==f,T=w==E;if(T&&l(t)){if(!l(e))return!1;y=!0,O=!1}if(T&&!O)return v||(v=new r),y||u(t)?i(t,e,n,m,g,v):o(t,e,w,n,m,g,v);if(!(n&p)){var A=O&&_.call(t,"__wrapped__"),S=x&&_.call(e,"__wrapped__");if(A||S){var N=A?t.value():t,C=S?e.value():e;return v||(v=new r),g(N,C,n,m,v)}}return!!T&&(v||(v=new r),s(t,e,n,m,g,v))}},function(t,e,n){var r=n(38),i=n(138),o=n(139),s=n(140),a=n(141),c=n(142);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=c,t.exports=l},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(39),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(39);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(39);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(39);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(38);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(38),i=n(60),o=n(85),s=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<s-1)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(83),i=n(144),o=n(37),s=n(84),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,h=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:a).test(s(t))}},function(t,e,n){var r,i=n(145),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(11)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(148),i=n(38),o=n(60);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(149),i=n(150),o=n(151),s=n(152),a=n(153);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var r=n(40);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(40),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(40),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(40),i="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?i:e,this}},function(t,e,n){var r=n(41);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(41);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(41);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(41);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(85),i=n(160),o=n(161);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,t.exports=s},function(t,e){var n="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,n),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(59),i=n(165),o=n(82),s=n(86),a=n(166),c=n(167),l=1,u=2,p="[object Boolean]",h="[object Date]",d="[object Error]",f="[object Map]",_="[object Number]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",E=r?r.prototype:void 0,O=E?E.valueOf:void 0;t.exports=function(t,e,n,r,E,x,T){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case b:return!(t.byteLength!=e.byteLength||!x(new i(t),new i(e)));case p:case h:case _:return o(+t,+e);case d:return t.name==e.name&&t.message==e.message;case m:case v:return t==e+"";case f:var A=a;case g:var S=r&l;if(A||(A=c),t.size!=e.size&&!S)return!1;var N=T.get(t);if(N)return N==e;r|=u,T.set(t,e);var C=s(A(t),A(e),r,E,x,T);return T.delete(t),C;case y:if(O)return O.call(t)==O.call(e)}return!1}},function(t,e,n){var r=n(11).Uint8Array;t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(169),i=1,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,a,c){var l=n&i,u=r(t),p=u.length;if(p!=r(e).length&&!l)return!1;for(var h=p;h--;){var d=u[h];if(!(l?d in e:o.call(e,d)))return!1}var f=c.get(t);if(f&&c.get(e))return f==e;var _=!0;c.set(t,e),c.set(e,t);for(var m=l;++h<p;){var g=t[d=u[h]],v=e[d];if(s)var y=l?s(v,g,d,e,t,c):s(g,v,d,t,e,c);if(!(void 0===y?g===v||a(g,v,n,s,c):y)){_=!1;break}m||(m="constructor"==d)}if(_&&!m){var b=t.constructor,w=e.constructor;b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(_=!1)}return c.delete(t),c.delete(e),_}},function(t,e,n){var r=n(170),i=n(172),o=n(175);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(171),i=n(61);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(173),i=n(174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),r(s(t),(function(e){return o.call(t,e)})))}:i;t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(176),i=n(185),o=n(189);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(177),i=n(178),o=n(61),s=n(87),a=n(181),c=n(89),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),u=!n&&i(t),p=!n&&!u&&s(t),h=!n&&!u&&!p&&c(t),d=n||u||p||h,f=d?r(t.length,String):[],_=f.length;for(var m in t)!e&&!l.call(t,m)||d&&("length"==m||p&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,_))||f.push(m);return f}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(179),i=n(28),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(27),i=n(28),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e){t.exports=function(){return!1}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?n:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(27),i=n(90),o=n(28),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(81),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(this,n(88)(t))},function(t,e,n){var r=n(186),i=n(187),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(188)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(83),i=n(90);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(191),i=n(60),o=n(192),s=n(193),a=n(194),c=n(27),l=n(84),u=l(r),p=l(i),h=l(o),d=l(s),f=l(a),_=c;(r&&"[object DataView]"!=_(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=_(new i)||o&&"[object Promise]"!=_(o.resolve())||s&&"[object Set]"!=_(new s)||a&&"[object WeakMap]"!=_(new a))&&(_=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?l(n):"";if(r)switch(r){case u:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case f:return"[object WeakMap]"}return e}),t.exports=_},function(t,e,n){var r=n(22)(n(11),"DataView");t.exports=r},function(t,e,n){var r=n(22)(n(11),"Promise");t.exports=r},function(t,e,n){var r=n(22)(n(11),"Set");t.exports=r},function(t,e,n){var r=n(22)(n(11),"WeakMap");t.exports=r},function(t,e,n){n(196)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(24),i=n(1),o=n(6),s=n(197),a=n(62),c=n(200),l=n(43),u=n(21),p=n(5),h=n(12),d=n(93),f=n(203),_=n(33),m=n(3),g=n(42),v=n(9),y=n(34),b=n(26),w=n(55).f,E=n(205),O=n(207).forEach,x=n(210),T=n(8),A=n(54),S=n(16),N=n(211),C=S.get,k=S.set,L=T.f,I=A.f,R=Math.round,j=i.RangeError,P=c.ArrayBuffer,M=c.DataView,D=a.NATIVE_ARRAY_BUFFER_VIEWS,U=a.TYPED_ARRAY_TAG,F=a.TypedArray,B=a.TypedArrayPrototype,z=a.aTypedArrayConstructor,H=a.isTypedArray,q=function(t,e){for(var n=0,r=e.length,i=new(z(t))(r);r>n;)i[n]=e[n++];return i},W=function(t,e){L(t,e,{get:function(){return C(this)[e]}})},V=function(t){var e;return t instanceof P||"ArrayBuffer"==(e=g(t))||"SharedArrayBuffer"==e},$=function(t,e){return H(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},G=function(t,e){return $(t,e=_(e,!0))?u(2,t[e]):I(t,e)},K=function(t,e,n){return!($(t,e=_(e,!0))&&v(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?L(t,e,n):(t[e]=n.value,t)};o?(D||(A.f=G,T.f=K,W(B,"buffer"),W(B,"byteOffset"),W(B,"byteLength"),W(B,"length")),r({target:"Object",stat:!0,forced:!D},{getOwnPropertyDescriptor:G,defineProperty:K}),t.exports=function(t,e,n){var o=t.match(/\d+$/)[0]/8,a=t+(n?"Clamped":"")+"Array",c="get"+t,u="set"+t,_=i[a],m=_,g=m&&m.prototype,T={},A=function(t,e){L(t,e,{get:function(){return function(t,e){var n=C(t);return n.view[c](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=C(t);n&&(r=(r=R(r))<0?0:r>255?255:255&r),i.view[u](e*o+i.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};D?s&&(m=e((function(t,e,n,r){return l(t,m,a),N(v(e)?V(e)?void 0!==r?new _(e,f(n,o),r):void 0!==n?new _(e,f(n,o)):new _(e):H(e)?q(m,e):E.call(m,e):new _(d(e)),t,m)})),b&&b(m,F),O(w(_),(function(t){t in m||p(m,t,_[t])})),m.prototype=g):(m=e((function(t,e,n,r){l(t,m,a);var i,s,c,u=0,p=0;if(v(e)){if(!V(e))return H(e)?q(m,e):E.call(m,e);i=e,p=f(n,o);var _=e.byteLength;if(void 0===r){if(_%o)throw j("Wrong length");if((s=_-p)<0)throw j("Wrong length")}else if((s=h(r)*o)+p>_)throw j("Wrong length");c=s/o}else c=d(e),i=new P(s=c*o);for(k(t,{buffer:i,byteOffset:p,byteLength:s,length:c,view:new M(i)});u<c;)A(t,u++)})),b&&b(m,F),g=m.prototype=y(B)),g.constructor!==m&&p(g,"constructor",m),U&&p(g,U,a),T[a]=m,r({global:!0,forced:m!=_,sham:!D},T),"BYTES_PER_ELEMENT"in m||p(m,"BYTES_PER_ELEMENT",o),"BYTES_PER_ELEMENT"in g||p(g,"BYTES_PER_ELEMENT",o),x(a)}):t.exports=function(){}},function(t,e,n){var r=n(1),i=n(4),o=n(198),s=n(62).NATIVE_ARRAY_BUFFER_VIEWS,a=r.ArrayBuffer,c=r.Int8Array;t.exports=!s||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||i((function(){return 1!==new c(new a(2),1,void 0).length}))},function(t,e,n){var r=n(2)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){var r={};r[n(2)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){"use strict";var r=n(1),i=n(6),o=n(91),s=n(5),a=n(92),c=n(4),l=n(43),u=n(15),p=n(12),h=n(93),d=n(201),f=n(36),_=n(26),m=n(55).f,g=n(8).f,v=n(202),y=n(25),b=n(16),w=b.get,E=b.set,O=r.ArrayBuffer,x=O,T=r.DataView,A=T&&T.prototype,S=Object.prototype,N=r.RangeError,C=d.pack,k=d.unpack,L=function(t){return[255&t]},I=function(t){return[255&t,t>>8&255]},R=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},j=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},P=function(t){return C(t,23,4)},M=function(t){return C(t,52,8)},D=function(t,e){g(t.prototype,e,{get:function(){return w(this)[e]}})},U=function(t,e,n,r){var i=h(n),o=w(t);if(i+e>o.byteLength)throw N("Wrong index");var s=w(o.buffer).bytes,a=i+o.byteOffset,c=s.slice(a,a+e);return r?c:c.reverse()},F=function(t,e,n,r,i,o){var s=h(n),a=w(t);if(s+e>a.byteLength)throw N("Wrong index");for(var c=w(a.buffer).bytes,l=s+a.byteOffset,u=r(+i),p=0;p<e;p++)c[l+p]=u[o?p:e-p-1]};if(o){if(!c((function(){O(1)}))||!c((function(){new O(-1)}))||c((function(){return new O,new O(1.5),new O(NaN),"ArrayBuffer"!=O.name}))){for(var B,z=(x=function(t){return l(this,x),new O(h(t))}).prototype=O.prototype,H=m(O),q=0;H.length>q;)(B=H[q++])in x||s(x,B,O[B]);z.constructor=x}_&&f(A)!==S&&_(A,S);var W=new T(new x(2)),V=A.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||a(A,{setInt8:function(t,e){V.call(this,t,e<<24>>24)},setUint8:function(t,e){V.call(this,t,e<<24>>24)}},{unsafe:!0})}else x=function(t){l(this,x,"ArrayBuffer");var e=h(t);E(this,{bytes:v.call(new Array(e),0),byteLength:e}),i||(this.byteLength=e)},T=function(t,e,n){l(this,T,"DataView"),l(t,x,"DataView");var r=w(t).byteLength,o=u(e);if(o<0||o>r)throw N("Wrong offset");if(o+(n=void 0===n?r-o:p(n))>r)throw N("Wrong length");E(this,{buffer:t,byteLength:n,byteOffset:o}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},i&&(D(x,"byteLength"),D(T,"buffer"),D(T,"byteLength"),D(T,"byteOffset")),a(T.prototype,{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return j(U(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return j(U(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return k(U(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return k(U(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){F(this,1,t,L,e)},setUint8:function(t,e){F(this,1,t,L,e)},setInt16:function(t,e){F(this,2,t,I,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){F(this,2,t,I,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){F(this,4,t,R,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){F(this,4,t,R,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){F(this,4,t,P,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){F(this,8,t,M,e,arguments.length>2?arguments[2]:void 0)}});y(x,"ArrayBuffer"),y(T,"DataView"),t.exports={ArrayBuffer:x,DataView:T}},function(t,e){var n=Math.abs,r=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;t.exports={pack:function(t,e,a){var c,l,u,p=new Array(a),h=8*a-e-1,d=(1<<h)-1,f=d>>1,_=23===e?r(2,-24)-r(2,-77):0,m=t<0||0===t&&1/t<0?1:0,g=0;for((t=n(t))!=t||t===1/0?(l=t!=t?1:0,c=d):(c=i(o(t)/s),t*(u=r(2,-c))<1&&(c--,u*=2),(t+=c+f>=1?_/u:_*r(2,1-f))*u>=2&&(c++,u/=2),c+f>=d?(l=0,c=d):c+f>=1?(l=(t*u-1)*r(2,e),c+=f):(l=t*r(2,f-1)*r(2,e),c=0));e>=8;p[g++]=255&l,l/=256,e-=8);for(c=c<<e|l,h+=e;h>0;p[g++]=255&c,c/=256,h-=8);return p[--g]|=128*m,p},unpack:function(t,e){var n,i=t.length,o=8*i-e-1,s=(1<<o)-1,a=s>>1,c=o-7,l=i-1,u=t[l--],p=127&u;for(u>>=7;c>0;p=256*p+t[l],l--,c-=8);for(n=p&(1<<-c)-1,p>>=-c,c+=e;c>0;n=256*n+t[l],l--,c-=8);if(0===p)p=1-a;else{if(p===s)return n?NaN:u?-1/0:1/0;n+=r(2,e),p-=a}return(u?-1:1)*n*r(2,p-e)}}},function(t,e,n){"use strict";var r=n(18),i=n(73),o=n(12);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,l=void 0===c?n:i(c,n);l>a;)e[a++]=t;return e}},function(t,e,n){var r=n(204);t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},function(t,e,n){var r=n(15);t.exports=function(t){var e=r(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},function(t,e,n){var r=n(18),i=n(12),o=n(44),s=n(94),a=n(45),c=n(62).aTypedArrayConstructor;t.exports=function(t){var e,n,l,u,p,h,d=r(t),f=arguments.length,_=f>1?arguments[1]:void 0,m=void 0!==_,g=o(d);if(null!=g&&!s(g))for(h=(p=g.call(d)).next,d=[];!(u=h.call(p)).done;)d.push(u.value);for(m&&f>2&&(_=a(_,arguments[2],2)),n=i(d.length),l=new(c(this))(n),e=0;n>e;e++)l[e]=m?_(d[e],e):d[e];return l}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(45),i=n(48),o=n(18),s=n(12),a=n(208),c=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,p=6==t,h=5==t||p;return function(d,f,_,m){for(var g,v,y=o(d),b=i(y),w=r(f,_,3),E=s(b.length),O=0,x=m||a,T=e?x(d,E):n?x(d,0):void 0;E>O;O++)if((h||O in b)&&(v=w(g=b[O],O,y),t))if(e)T[O]=v;else if(v)switch(t){case 3:return!0;case 5:return g;case 6:return O;case 2:c.call(T,g)}else if(u)return!1;return p?-1:l||u?u:T}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(t,e,n){var r=n(9),i=n(209),o=n(2)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){var r=n(30);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(35),i=n(8),o=n(2),s=n(6),a=o("species");t.exports=function(t){var e=r(t),n=i.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(9),i=n(26);t.exports=function(t,e,n){var o,s;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&i(t,s),t}},function(t,e,n){"use strict";n(213);var r,i=n(24),o=n(6),s=n(95),a=n(1),c=n(70),l=n(17),u=n(43),p=n(3),h=n(214),d=n(215),f=n(58).codeAt,_=n(218),m=n(25),g=n(219),v=n(16),y=a.URL,b=g.URLSearchParams,w=g.getState,E=v.set,O=v.getterFor("URL"),x=Math.floor,T=Math.pow,A=/[A-Za-z]/,S=/[\d+\-.A-Za-z]/,N=/\d/,C=/^(0x|0X)/,k=/^[0-7]+$/,L=/^\d+$/,I=/^[\dA-Fa-f]+$/,R=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,j=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,P=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\u0009\u000A\u000D]/g,D=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(n=F(e.slice(1,-1))))return"Invalid host";t.host=n}else if(G(t)){if(e=_(e),R.test(e))return"Invalid host";if(null===(n=U(e)))return"Invalid host";t.host=n}else{if(j.test(e))return"Invalid host";for(n="",r=d(e),i=0;i<r.length;i++)n+=V(r[i],z);t.host=n}},U=function(t){var e,n,r,i,o,s,a,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=c[r]))return t;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=C.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)s=0;else{if(!(10==o?L:8==o?k:I).test(i))return t;s=parseInt(i,o)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=T(256,5-e))return null}else if(s>255)return null;for(a=n.pop(),r=0;r<n.length;r++)a+=n[r]*T(256,3-r);return a},F=function(t){var e,n,r,i,o,s,a,c=[0,0,0,0,0,0,0,0],l=0,u=null,p=0,h=function(){return t.charAt(p)};if(":"==h()){if(":"!=t.charAt(1))return;p+=2,u=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&I.test(h());)e=16*e+parseInt(h(),16),p++,n++;if("."==h()){if(0==n)return;if(p-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;p++}if(!N.test(h()))return;for(;N.test(h());){if(o=parseInt(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;p++}c[l]=256*c[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(p++,!h())return}else if(h())return;c[l++]=e}else{if(null!==u)return;p++,u=++l}}if(null!==u)for(s=l-u,l=7;0!=l&&s>0;)a=c[l],c[l--]=c[u+s-1],c[u+--s]=a;else if(8!=l)return;return c},B=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=x(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},z={},H=h({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),q=h({},H,{"#":1,"?":1,"{":1,"}":1}),W=h({},q,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),V=function(t,e){var n=f(t,0);return n>32&&n<127&&!p(e,t)?t:encodeURIComponent(t)},$={ftp:21,file:null,http:80,https:443,ws:80,wss:443},G=function(t){return p($,t.scheme)},K=function(t){return""!=t.username||""!=t.password},Y=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},X=function(t,e){var n;return 2==t.length&&A.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},J=function(t){var e;return t.length>1&&X(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},Z=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&X(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},nt={},rt={},it={},ot={},st={},at={},ct={},lt={},ut={},pt={},ht={},dt={},ft={},_t={},mt={},gt={},vt={},yt={},bt={},wt=function(t,e,n,i){var o,s,a,c,l,u=n||tt,h=0,f="",_=!1,m=!1,g=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(P,"")),e=e.replace(M,""),o=d(e);h<=o.length;){switch(s=o[h],u){case tt:if(!s||!A.test(s)){if(n)return"Invalid scheme";u=nt;continue}f+=s.toLowerCase(),u=et;break;case et:if(s&&(S.test(s)||"+"==s||"-"==s||"."==s))f+=s.toLowerCase();else{if(":"!=s){if(n)return"Invalid scheme";f="",u=nt,h=0;continue}if(n&&(G(t)!=p($,f)||"file"==f&&(K(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,n)return void(G(t)&&$[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?u=dt:G(t)&&i&&i.scheme==t.scheme?u=rt:G(t)?u=at:"/"==o[h+1]?(u=it,h++):(t.cannotBeABaseURL=!0,t.path.push(""),u=vt)}break;case nt:if(!i||i.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==s){t.scheme=i.scheme,t.path=i.path.slice(),t.query=i.query,t.fragment="",t.cannotBeABaseURL=!0,u=bt;break}u="file"==i.scheme?dt:ot;continue;case rt:if("/"!=s||"/"!=o[h+1]){u=ot;continue}u=ct,h++;break;case it:if("/"==s){u=lt;break}u=gt;continue;case ot:if(t.scheme=i.scheme,s==r)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query;else if("/"==s||"\\"==s&&G(t))u=st;else if("?"==s)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query="",u=yt;else{if("#"!=s){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.path.pop(),u=gt;continue}t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query,t.fragment="",u=bt}break;case st:if(!G(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,u=gt;continue}u=lt}else u=ct;break;case at:if(u=ct,"/"!=s||"/"!=f.charAt(h+1))continue;h++;break;case ct:if("/"!=s&&"\\"!=s){u=lt;continue}break;case lt:if("@"==s){_&&(f="%40"+f),_=!0,a=d(f);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||g){var b=V(y,W);g?t.password+=b:t.username+=b}else g=!0}f=""}else if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&G(t)){if(_&&""==f)return"Invalid authority";h-=d(f).length+1,f="",u=ut}else f+=s;break;case ut:case pt:if(n&&"file"==t.scheme){u=_t;continue}if(":"!=s||m){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&G(t)){if(G(t)&&""==f)return"Invalid host";if(n&&""==f&&(K(t)||null!==t.port))return;if(c=D(t,f))return c;if(f="",u=mt,n)return;continue}"["==s?m=!0:"]"==s&&(m=!1),f+=s}else{if(""==f)return"Invalid host";if(c=D(t,f))return c;if(f="",u=ht,n==pt)return}break;case ht:if(!N.test(s)){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&G(t)||n){if(""!=f){var w=parseInt(f,10);if(w>65535)return"Invalid port";t.port=G(t)&&w===$[t.scheme]?null:w,f=""}if(n)return;u=mt;continue}return"Invalid port"}f+=s;break;case dt:if(t.scheme="file","/"==s||"\\"==s)u=ft;else{if(!i||"file"!=i.scheme){u=gt;continue}if(s==r)t.host=i.host,t.path=i.path.slice(),t.query=i.query;else if("?"==s)t.host=i.host,t.path=i.path.slice(),t.query="",u=yt;else{if("#"!=s){J(o.slice(h).join(""))||(t.host=i.host,t.path=i.path.slice(),Z(t)),u=gt;continue}t.host=i.host,t.path=i.path.slice(),t.query=i.query,t.fragment="",u=bt}}break;case ft:if("/"==s||"\\"==s){u=_t;break}i&&"file"==i.scheme&&!J(o.slice(h).join(""))&&(X(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host),u=gt;continue;case _t:if(s==r||"/"==s||"\\"==s||"?"==s||"#"==s){if(!n&&X(f))u=gt;else if(""==f){if(t.host="",n)return;u=mt}else{if(c=D(t,f))return c;if("localhost"==t.host&&(t.host=""),n)return;f="",u=mt}continue}f+=s;break;case mt:if(G(t)){if(u=gt,"/"!=s&&"\\"!=s)continue}else if(n||"?"!=s)if(n||"#"!=s){if(s!=r&&(u=gt,"/"!=s))continue}else t.fragment="",u=bt;else t.query="",u=yt;break;case gt:if(s==r||"/"==s||"\\"==s&&G(t)||!n&&("?"==s||"#"==s)){if(".."===(l=(l=f).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(Z(t),"/"==s||"\\"==s&&G(t)||t.path.push("")):Q(f)?"/"==s||"\\"==s&&G(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&X(f)&&(t.host&&(t.host=""),f=f.charAt(0)+":"),t.path.push(f)),f="","file"==t.scheme&&(s==r||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",u=yt):"#"==s&&(t.fragment="",u=bt)}else f+=V(s,q);break;case vt:"?"==s?(t.query="",u=yt):"#"==s?(t.fragment="",u=bt):s!=r&&(t.path[0]+=V(s,z));break;case yt:n||"#"!=s?s!=r&&("'"==s&&G(t)?t.query+="%27":t.query+="#"==s?"%23":V(s,z)):(t.fragment="",u=bt);break;case bt:s!=r&&(t.fragment+=V(s,H))}h++}},Et=function(t){var e,n,r=u(this,Et,"URL"),i=arguments.length>1?arguments[1]:void 0,s=String(t),a=E(r,{type:"URL"});if(void 0!==i)if(i instanceof Et)e=O(i);else if(n=wt(e={},String(i)))throw TypeError(n);if(n=wt(a,s,null,e))throw TypeError(n);var c=a.searchParams=new b,l=w(c);l.updateSearchParams(a.query),l.updateURL=function(){a.query=String(c)||null},o||(r.href=xt.call(r),r.origin=Tt.call(r),r.protocol=At.call(r),r.username=St.call(r),r.password=Nt.call(r),r.host=Ct.call(r),r.hostname=kt.call(r),r.port=Lt.call(r),r.pathname=It.call(r),r.search=Rt.call(r),r.searchParams=jt.call(r),r.hash=Pt.call(r))},Ot=Et.prototype,xt=function(){var t=O(this),e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,s=t.path,a=t.query,c=t.fragment,l=e+":";return null!==i?(l+="//",K(t)&&(l+=n+(r?":"+r:"")+"@"),l+=B(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(l+="?"+a),null!==c&&(l+="#"+c),l},Tt=function(){var t=O(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&G(t)?e+"://"+B(t.host)+(null!==n?":"+n:""):"null"},At=function(){return O(this).scheme+":"},St=function(){return O(this).username},Nt=function(){return O(this).password},Ct=function(){var t=O(this),e=t.host,n=t.port;return null===e?"":null===n?B(e):B(e)+":"+n},kt=function(){var t=O(this).host;return null===t?"":B(t)},Lt=function(){var t=O(this).port;return null===t?"":String(t)},It=function(){var t=O(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Rt=function(){var t=O(this).query;return t?"?"+t:""},jt=function(){return O(this).searchParams},Pt=function(){var t=O(this).fragment;return t?"#"+t:""},Mt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&c(Ot,{href:Mt(xt,(function(t){var e=O(this),n=String(t),r=wt(e,n);if(r)throw TypeError(r);w(e.searchParams).updateSearchParams(e.query)})),origin:Mt(Tt),protocol:Mt(At,(function(t){var e=O(this);wt(e,String(t)+":",tt)})),username:Mt(St,(function(t){var e=O(this),n=d(String(t));if(!Y(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=V(n[r],W)}})),password:Mt(Nt,(function(t){var e=O(this),n=d(String(t));if(!Y(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=V(n[r],W)}})),host:Mt(Ct,(function(t){var e=O(this);e.cannotBeABaseURL||wt(e,String(t),ut)})),hostname:Mt(kt,(function(t){var e=O(this);e.cannotBeABaseURL||wt(e,String(t),pt)})),port:Mt(Lt,(function(t){var e=O(this);Y(e)||(""==(t=String(t))?e.port=null:wt(e,t,ht))})),pathname:Mt(It,(function(t){var e=O(this);e.cannotBeABaseURL||(e.path=[],wt(e,t+"",mt))})),search:Mt(Rt,(function(t){var e=O(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",wt(e,t,yt)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:Mt(jt),hash:Mt(Pt,(function(t){var e=O(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",wt(e,t,bt)):e.fragment=null}))}),l(Ot,"toJSON",(function(){return xt.call(this)}),{enumerable:!0}),l(Ot,"toString",(function(){return xt.call(this)}),{enumerable:!0}),y){var Dt=y.createObjectURL,Ut=y.revokeObjectURL;Dt&&l(Et,"createObjectURL",(function(t){return Dt.apply(y,arguments)})),Ut&&l(Et,"revokeObjectURL",(function(t){return Ut.apply(y,arguments)}))}m(Et,"URL"),i({global:!0,forced:!s,sham:!o},{URL:Et})},function(t,e,n){"use strict";var r=n(58).charAt,i=n(16),o=n(75),s=i.set,a=i.getterFor("String Iterator");o(String,"String",(function(t){s(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=a(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(6),i=n(4),o=n(71),s=n(77),a=n(76),c=n(18),l=n(48),u=Object.assign,p=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||"abcdefghijklmnopqrst"!=o(u({},e)).join("")}))?function(t,e){for(var n=c(t),i=arguments.length,u=1,p=s.f,h=a.f;i>u;)for(var d,f=l(arguments[u++]),_=p?o(f).concat(p(f)):o(f),m=_.length,g=0;m>g;)d=_[g++],r&&!h.call(f,d)||(n[d]=f[d]);return n}:u},function(t,e,n){"use strict";var r=n(45),i=n(18),o=n(216),s=n(94),a=n(12),c=n(217),l=n(44);t.exports=function(t){var e,n,u,p,h,d,f=i(t),_="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,v=void 0!==g,y=l(f),b=0;if(v&&(g=r(g,m>2?arguments[2]:void 0,2)),null==y||_==Array&&s(y))for(n=new _(e=a(f.length));e>b;b++)d=v?g(f[b],b):f[b],c(n,b,d);else for(h=(p=y.call(f)).next,n=new _;!(u=h.call(p)).done;b++)d=v?o(p,g,[u.value,b],!0):u.value,c(n,b,d);return n.length=b,n}},function(t,e,n){var r=n(10);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(33),i=n(8),o=n(21);t.exports=function(t,e,n){var s=r(e);s in t?i.f(t,s,o(0,n)):t[s]=n}},function(t,e,n){"use strict";var r=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",s=Math.floor,a=String.fromCharCode,c=function(t){return t+22+75*(t<26)},l=function(t,e,n){var r=0;for(t=n?s(t/700):t>>1,t+=s(t/e);t>455;r+=36)t=s(t/35);return s(r+36*t/(t+38))},u=function(t){var e,n,r=[],i=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}(t)).length,u=128,p=0,h=72;for(e=0;e<t.length;e++)(n=t[e])<128&&r.push(a(n));var d=r.length,f=d;for(d&&r.push("-");f<i;){var _=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=u&&n<_&&(_=n);var m=f+1;if(_-u>s((2147483647-p)/m))throw RangeError(o);for(p+=(_-u)*m,u=_,e=0;e<t.length;e++){if((n=t[e])<u&&++p>2147483647)throw RangeError(o);if(n==u){for(var g=p,v=36;;v+=36){var y=v<=h?1:v>=h+26?26:v-h;if(g<y)break;var b=g-y,w=36-y;r.push(a(c(y+b%w))),g=s(b/w)}r.push(a(c(g))),h=l(p,m,f==d),p=0,++f}}++p,++u}return r.join("")};t.exports=function(t){var e,n,o=[],s=t.toLowerCase().replace(i,".").split(".");for(e=0;e<s.length;e++)n=s[e],o.push(r.test(n)?"xn--"+u(n):n);return o.join(".")}},function(t,e,n){"use strict";n(63);var r=n(24),i=n(35),o=n(95),s=n(17),a=n(92),c=n(25),l=n(78),u=n(16),p=n(43),h=n(3),d=n(45),f=n(42),_=n(10),m=n(9),g=n(34),v=n(21),y=n(220),b=n(44),w=n(2),E=i("fetch"),O=i("Headers"),x=w("iterator"),T=u.set,A=u.getterFor("URLSearchParams"),S=u.getterFor("URLSearchParamsIterator"),N=/\+/g,C=Array(4),k=function(t){return C[t-1]||(C[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},L=function(t){try{return decodeURIComponent(t)}catch(e){return t}},I=function(t){var e=t.replace(N," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(k(n--),L);return e}},R=/[!'()~]|%20/g,j={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},P=function(t){return j[t]},M=function(t){return encodeURIComponent(t).replace(R,P)},D=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:I(r.shift()),value:I(r.join("="))}))},U=function(t){this.entries.length=0,D(this.entries,t)},F=function(t,e){if(t<e)throw TypeError("Not enough arguments")},B=l((function(t,e){T(this,{type:"URLSearchParamsIterator",iterator:y(A(t).entries),kind:e})}),"Iterator",(function(){var t=S(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),z=function(){p(this,z,"URLSearchParams");var t,e,n,r,i,o,s,a,c,l=arguments.length>0?arguments[0]:void 0,u=this,d=[];if(T(u,{type:"URLSearchParams",entries:d,updateURL:function(){},updateSearchParams:U}),void 0!==l)if(m(l))if("function"==typeof(t=b(l)))for(n=(e=t.call(l)).next;!(r=n.call(e)).done;){if((s=(o=(i=y(_(r.value))).next).call(i)).done||(a=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:s.value+"",value:a.value+""})}else for(c in l)h(l,c)&&d.push({key:c,value:l[c]+""});else D(d,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},H=z.prototype;a(H,{append:function(t,e){F(arguments.length,2);var n=A(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){F(arguments.length,1);for(var e=A(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){F(arguments.length,1);for(var e=A(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){F(arguments.length,1);for(var e=A(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){F(arguments.length,1);for(var e=A(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){F(arguments.length,1);for(var n,r=A(this),i=r.entries,o=!1,s=t+"",a=e+"",c=0;c<i.length;c++)(n=i[c]).key===s&&(o?i.splice(c--,1):(o=!0,n.value=a));o||i.push({key:s,value:a}),r.updateURL()},sort:function(){var t,e,n,r=A(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=A(this).entries,r=d(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new B(this,"keys")},values:function(){return new B(this,"values")},entries:function(){return new B(this,"entries")}},{enumerable:!0}),s(H,x,H.entries),s(H,"toString",(function(){for(var t,e=A(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(M(t.key)+"="+M(t.value));return n.join("&")}),{enumerable:!0}),c(z,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:z}),o||"function"!=typeof E||"function"!=typeof O||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(e=arguments[1],m(e)&&(n=e.body,"URLSearchParams"===f(n)&&((r=e.headers?new O(e.headers):new O).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=g(e,{body:v(0,String(n)),headers:v(0,r)}))),i.push(e)),E.apply(this,i)}}),t.exports={URLSearchParams:z,getState:A}},function(t,e,n){var r=n(10),i=n(44);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},function(t,e,n){(function(t,e){(function(){"use strict";var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},i="undefined"!=typeof window&&window===this?this:void 0!==t&&null!=t?t:this;function o(){o=function(){},i.Symbol||(i.Symbol=c)}var s,a,c=(s=0,function(t){return"jscomp_symbol_"+(t||"")+s++});function l(){o();var t=i.Symbol.iterator;t||(t=i.Symbol.iterator=i.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&r(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return u(this)}}),l=function(){}}function u(t){var e=0;return function(t){return l(),(t={next:t})[i.Symbol.iterator]=function(){return this},t}((function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}))}function p(t){l();var e=t[Symbol.iterator];return e?e.call(t):u(t)}if("function"==typeof Object.setPrototypeOf)a=Object.setPrototypeOf;else{var h;t:{var d={};try{d.__proto__={Pa:!0},h=d.Pa;break t}catch(s){}h=!1}a=h?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var f=a;function _(){this.f=!1,this.b=null,this.fa=void 0,this.a=1,this.G=0,this.c=null}function m(t){if(t.f)throw new TypeError("Generator is already running");t.f=!0}function g(t,e){t.c={Ra:e,Va:!0},t.a=t.G}function v(t,e){return t.a=3,{value:e}}function y(t){this.a=new _,this.b=t}function b(t,e,n,r){try{var i=e.call(t.a.b,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return t.a.f=!1,i;var o=i.value}catch(e){return t.a.b=null,g(t.a,e),w(t)}return t.a.b=null,r.call(t.a,o),w(t)}function w(t){for(;t.a.a;)try{var e=t.b(t.a);if(e)return t.a.f=!1,{value:e.value,done:!1}}catch(e){t.a.fa=void 0,g(t.a,e)}if(t.a.f=!1,t.a.c){if(e=t.a.c,t.a.c=null,e.Va)throw e.Ra;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function E(t){this.next=function(e){return m(t.a),t.a.b?e=b(t,t.a.b.next,e,t.a.m):(t.a.m(e),e=w(t)),e},this.throw=function(e){return m(t.a),t.a.b?e=b(t,t.a.b.throw,e,t.a.m):(g(t.a,e),e=w(t)),e},this.return=function(e){return function(t,e){m(t.a);var n=t.a.b;return n?b(t,"return"in n?n.return:function(t){return{value:t,done:!0}},e,t.a.return):(t.a.return(e),w(t))}(t,e)},l(),this[Symbol.iterator]=function(){return this}}function O(t,e){return e=new E(new y(e)),f&&f(e,t.prototype),e}_.prototype.m=function(t){this.fa=t},_.prototype.return=function(t){this.c={return:t},this.a=this.G},function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,s=n,a=Object.getOwnPropertyNames(s),c=0;c<a.length;c++)o[n=a[c]]=s[n];return t})}(window.WebComponents),function(){function t(){}function e(t,e){if(!t.childNodes.length)return[];switch(t.nodeType){case Node.DOCUMENT_NODE:return _.call(t,e);case Node.DOCUMENT_FRAGMENT_NODE:return m.call(t,e);default:return f.call(t,e)}}var n="undefined"==typeof HTMLTemplateElement,r=!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment),i=!1;/Trident/.test(navigator.userAgent)&&function(){function t(t,e){if(t instanceof DocumentFragment)for(var r;r=t.firstChild;)n.call(this,r,e);else n.call(this,t,e);return t}i=!0;var e=Node.prototype.cloneNode;Node.prototype.cloneNode=function(t){return t=e.call(this,t),this instanceof DocumentFragment&&(t.__proto__=DocumentFragment.prototype),t},DocumentFragment.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll,DocumentFragment.prototype.querySelector=HTMLElement.prototype.querySelector,Object.defineProperties(DocumentFragment.prototype,{nodeType:{get:function(){return Node.DOCUMENT_FRAGMENT_NODE},configurable:!0},localName:{get:function(){},configurable:!0},nodeName:{get:function(){return"#document-fragment"},configurable:!0}});var n=Node.prototype.insertBefore;Node.prototype.insertBefore=t;var r=Node.prototype.appendChild;Node.prototype.appendChild=function(e){return e instanceof DocumentFragment?t.call(this,e,null):r.call(this,e),e};var o=Node.prototype.removeChild,s=Node.prototype.replaceChild;Node.prototype.replaceChild=function(e,n){return e instanceof DocumentFragment?(t.call(this,e,n),o.call(this,n)):s.call(this,e,n),n},Document.prototype.createDocumentFragment=function(){var t=this.createElement("df");return t.__proto__=DocumentFragment.prototype,t};var a=Document.prototype.importNode;Document.prototype.importNode=function(t,e){return e=a.call(this,t,e||!1),t instanceof DocumentFragment&&(e.__proto__=DocumentFragment.prototype),e}}();var o=Node.prototype.cloneNode,s=Document.prototype.createElement,a=Document.prototype.importNode,c=Node.prototype.removeChild,l=Node.prototype.appendChild,u=Node.prototype.replaceChild,p=DOMParser.prototype.parseFromString,h=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),d=Object.getOwnPropertyDescriptor(window.Node.prototype,"childNodes"),f=Element.prototype.querySelectorAll,_=Document.prototype.querySelectorAll,m=DocumentFragment.prototype.querySelectorAll,g=function(){if(!n){var t=document.createElement("template"),e=document.createElement("template");return e.content.appendChild(document.createElement("div")),t.content.appendChild(e),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||r}}();if(n){var v=document.implementation.createHTMLDocument("template"),y=!0,b=document.createElement("style");b.textContent="template{display:none;}";var w=document.head;w.insertBefore(b,w.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var E=!document.createElement("div").hasOwnProperty("innerHTML");t.R=function(e){if(!e.content&&e.namespaceURI===document.documentElement.namespaceURI){e.content=v.createDocumentFragment();for(var n;n=e.firstChild;)l.call(e.content,n);if(E)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.b(this,e)},y)try{x(e),T(e)}catch(t){y=!1}t.a(e.content)}};var O={option:["select"],thead:["table"],col:["colgroup","table"],tr:["tbody","table"],th:["tr","tbody","table"],td:["tr","tbody","table"]},x=function(e){Object.defineProperty(e,"innerHTML",{get:function(){return L(this)},set:function(e){var n=O[(/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(e)||["",""])[1].toLowerCase()];if(n)for(var r=0;r<n.length;r++)e="<"+n[r]+">"+e+"</"+n[r]+">";for(v.body.innerHTML=e,t.a(v);this.content.firstChild;)c.call(this.content,this.content.firstChild);if(e=v.body,n)for(r=0;r<n.length;r++)e=e.lastChild;for(;e.firstChild;)l.call(this.content,e.firstChild)},configurable:!0})},T=function(t){Object.defineProperty(t,"outerHTML",{get:function(){return"<template>"+this.innerHTML+"</template>"},set:function(t){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(v.body.innerHTML=t,t=this.ownerDocument.createDocumentFragment();v.body.firstChild;)l.call(t,v.body.firstChild);u.call(this.parentNode,t,this)},configurable:!0})};x(t.prototype),T(t.prototype),t.a=function(n){for(var r,i=0,o=(n=e(n,"template")).length;i<o&&(r=n[i]);i++)t.R(r)},document.addEventListener("DOMContentLoaded",(function(){t.a(document)})),Document.prototype.createElement=function(){var e=s.apply(this,arguments);return"template"===e.localName&&t.R(e),e},DOMParser.prototype.parseFromString=function(){var e=p.apply(this,arguments);return t.a(e),e},Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return L(this)},set:function(e){h.set.call(this,e),t.a(this)},configurable:!0,enumerable:!0});var A=/[&\u00A0"]/g,S=/[&\u00A0<>]/g,N=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"\xa0":return"&nbsp;"}},C=(b=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e})("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),k=b("style script xmp iframe noembed noframes plaintext noscript".split(" ")),L=function(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):d.get.call(t),o=0,s=i.length;o<s&&(n=i[o]);o++){t:{var a=n,c=t,l=e;switch(a.nodeType){case Node.ELEMENT_NODE:for(var u=a.localName,p="<"+u,h=a.attributes,f=0;c=h[f];f++)p+=" "+c.name+'="'+c.value.replace(A,N)+'"';p+=">",a=C[u]?p:p+L(a,l)+"</"+u+">";break t;case Node.TEXT_NODE:a=a.data,a=c&&k[c.localName]?a:a.replace(S,N);break t;case Node.COMMENT_NODE:a="\x3c!--"+a.data+"--\x3e";break t;default:throw window.console.error(a),Error("not implemented")}}r+=a}return r}}if(n||g){t.b=function(t,e){var n=o.call(t,!1);return this.R&&this.R(n),e&&(l.call(n.content,o.call(t.content,!0)),I(n.content,t.content)),n};var I=function(n,r){if(r.querySelectorAll&&0!==(r=e(r,"template")).length)for(var i,o,s=0,a=(n=e(n,"template")).length;s<a;s++)o=r[s],i=n[s],t&&t.R&&t.R(o),u.call(i.parentNode,R.call(o,!0),i)},R=Node.prototype.cloneNode=function(e){if(!i&&r&&this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();var n=j.call(this.ownerDocument,this,!0)}else n=this.nodeType===Node.ELEMENT_NODE&&"template"===this.localName&&this.namespaceURI==document.documentElement.namespaceURI?t.b(this,e):o.call(this,e);return e&&I(n,this),n},j=Document.prototype.importNode=function(n,r){if(r=r||!1,"template"===n.localName)return t.b(n,r);var i=a.call(this,n,r);if(r){I(i,n),n=e(i,'script:not([type]),script[type="application/javascript"],script[type="text/javascript"]');for(var o,c=0;c<n.length;c++){o=n[c],(r=s.call(document,"script")).textContent=o.textContent;for(var l,p=o.attributes,h=0;h<p.length;h++)l=p[h],r.setAttribute(l.name,l.value);u.call(o.parentNode,r,o)}}return i}}n&&(window.HTMLTemplateElement=t)}();var x=setTimeout;function T(){}function A(t){if(!(this instanceof A))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this.J=0,this.wa=!1,this.A=void 0,this.U=[],I(t,this)}function S(t,e){for(;3===t.J;)t=t.A;0===t.J?t.U.push(e):(t.wa=!0,A.a((function(){var n=1===t.J?e.Xa:e.Ya;if(null===n)(1===t.J?N:C)(e.qa,t.A);else{try{var r=n(t.A)}catch(t){return void C(e.qa,t)}N(e.qa,r)}})))}function N(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof A)return t.J=3,t.A=e,void k(t);if("function"==typeof n)return void I(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t.J=1,t.A=e,k(t)}catch(e){C(t,e)}}function C(t,e){t.J=2,t.A=e,k(t)}function k(t){2===t.J&&0===t.U.length&&A.a((function(){t.wa||A.b(t.A)}));for(var e=0,n=t.U.length;e<n;e++)S(t,t.U[e]);t.U=null}function L(t,e,n){this.Xa="function"==typeof t?t:null,this.Ya="function"==typeof e?e:null,this.qa=n}function I(t,e){var n=!1;try{t((function(t){n||(n=!0,N(e,t))}),(function(t){n||(n=!0,C(e,t))}))}catch(t){n||(n=!0,C(e,t))}}if(A.prototype.catch=function(t){return this.then(null,t)},A.prototype.then=function(t,e){var n=new this.constructor(T);return S(this,new L(t,e,n)),n},A.prototype.finally=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},A.c=function(t){return new A((function(e,n){function r(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(e){r(t,e)}),n)}i[t]=s,0==--o&&e(i)}catch(t){n(t)}}if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);for(var o=i.length,s=0;s<i.length;s++)r(s,i[s])}))},A.resolve=function(t){return t&&"object"==typeof t&&t.constructor===A?t:new A((function(e){e(t)}))},A.reject=function(t){return new A((function(e,n){n(t)}))},A.f=function(t){return new A((function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)}))},A.a="function"==typeof e&&function(t){e(t)}||function(t){x(t,0)},A.b=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},!window.Promise&&(window.Promise=A,A.prototype.then=A.prototype.then,A.all=A.c,A.race=A.f,A.resolve=A.resolve,A.reject=A.reject,!window.setImmediate)){var R=document.createTextNode(""),j=[];new MutationObserver((function(){for(var t=j.length,e=0;e<t;e++)j[e]();j.splice(0,t)})).observe(R,{characterData:!0}),A.a=function(t){j.push(t),R.textContent=0<R.textContent.length?"":"a"}}var P={},M=Object.create,D=Object.defineProperties,U=Object.defineProperty;function F(t,e){return{value:t,configurable:!!(e=void 0===e?{}:e).xa,writable:!!e.eb,enumerable:!!e.e}}var B=void 0;try{B=1===U({},"y",{get:function(){return 1}}).y}catch(s){B=!1}var z={};var H=M(null);function q(t){if(this instanceof q)throw new TypeError("Symbol is not a constructor");var e=function(t){t=String(t);for(var e="",n=0;z[t+e];)e=n+=1;z[t+e]=1;var r="Symbol("+t+e+")";return B&&U(Object.prototype,r,{get:void 0,set:function(t){U(this,r,F(t,{xa:!0,eb:!0}))},configurable:!0,enumerable:!1}),r}(t=void 0===t?"":String(t));return B?M(H,{ta:F(t),Ja:F(e)}):e}D(q,{for:F((function(t){if(t=String(t),P[t])return P[t];var e=q(t);return P[t]=e})),keyFor:F((function(t){if(B&&(!t||"Symbol"!==t[q.toStringTag]))throw new TypeError(t+" is not a symbol");for(var e in P)if(P[e]===t)return B?P[e].ta:P[e].substr(7,P[e].length-8)}))}),D(q,{vb:F(q("hasInstance")),wb:F(q("isConcatSpreadable")),iterator:F(q("iterator")),match:F(q("match")),replace:F(q("replace")),search:F(q("search")),yb:F(q("species")),split:F(q("split")),zb:F(q("toPrimitive")),toStringTag:F(q("toStringTag")),unscopables:F(q("unscopables"))}),D(H,{constructor:F(q),toString:F((function(){return this.Ja})),valueOf:F((function(){return"Symbol("+this.ta+")"}))}),B&&U(H,q.toStringTag,F("Symbol",{xa:!0}));var W="function"==typeof Symbol?Symbol:q;if(!window.Symbol){window.Symbol=W;var V=window.Symbol.iterator;Array.prototype[V]=function t(){var e,n=this;return O(t,(function(t){if(1==t.a&&(e=0),3!=t.a)return e<n.length?t=v(t,n[e]):(t.a=0,t=void 0),t;e++,t.a=2}))},Set.prototype[V]=function t(){var e,n,r=this;return O(t,(function(t){if(1==t.a&&(e=[],r.forEach((function(t){e.push(t)})),n=0),3!=t.a)return n<e.length?t=v(t,e[n]):(t.a=0,t=void 0),t;n++,t.a=2}))},Map.prototype[V]=function t(){var e,n,r=this;return O(t,(function(t){if(1==t.a&&(e=[],r.forEach((function(t,n){e.push([n,t])})),n=0),3!=t.a)return n<e.length?t=v(t,e[n]):(t.a=0,t=void 0),t;n++,t.a=2}))},String.prototype[V]=function t(){var e,n=this;return O(t,(function(t){if(1==t.a&&(e=0),3!=t.a)return e<n.length?t=v(t,n[e]):(t.a=0,t=void 0),t;e++,t.a=2}))}}window.WebComponents=window.WebComponents||{flags:{}};var $=document.querySelector('script[src*="webcomponents-bundle"]'),G=/wc-(.+)/,K={};if(!K.noOpts){if(location.search.slice(1).split("&").forEach((function(t){var e;(t=t.split("="))[0]&&(e=t[0].match(G))&&(K[e[1]]=t[1]||!0)})),$)for(var Y,X=0;Y=$.attributes[X];X++)"src"!==Y.name&&(K[Y.name]=Y.value||!0);if(K.log&&K.log.split){var J=K.log.split(",");K.log={},J.forEach((function(t){K.log[t]=!0}))}else K.log={}}window.WebComponents.flags=K;var Z=K.shadydom;Z&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=Z);var Q=K.register||K.ce;function tt(){this.Aa=this.root=null,this.da=!1,this.N=this.$=this.ma=this.assignedSlot=this.assignedNodes=this.S=null,this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.V=void 0,this.Fa=this.ua=!1,this.Z={}}function et(t){return t.ka||(t.ka=new tt),t.ka}function nt(t){return t&&t.ka}Q&&window.customElements&&(window.customElements.forcePolyfill=Q),tt.prototype.toJSON=function(){return{}};var rt=window.ShadyDOM||{};rt.Ta=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var it=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");rt.K=!!(it&&it.configurable&&it.get),rt.oa=rt.force||!rt.Ta;var ot=navigator.userAgent.match("Trident"),st=navigator.userAgent.match("Edge");function at(t){return(t=nt(t))&&void 0!==t.firstChild}function ct(t){return"ShadyRoot"===t.La}function lt(t){if(ct(t=t.getRootNode()))return t}void 0===rt.Ca&&(rt.Ca=rt.K&&(ot||st));var ut=Element.prototype,pt=ut.matches||ut.matchesSelector||ut.mozMatchesSelector||ut.msMatchesSelector||ut.oMatchesSelector||ut.webkitMatchesSelector;function ht(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=n,s=t,a=Object.getOwnPropertyDescriptor(e,o);a&&Object.defineProperty(s,o,a)}}function dt(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)ht(t,n[r]);return t}var ft=document.createTextNode(""),_t=0,mt=[];function gt(t){mt.push(t),ft.textContent=_t++}new MutationObserver((function(){for(;mt.length;)try{mt.shift()()}catch(t){throw ft.textContent=_t++,t}})).observe(ft,{characterData:!0});var vt=!!document.contains;function yt(t,e){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function bt(t){for(var e=t.length-1;0<=e;e--){var n=t[e],r=n.getAttribute("id")||n.getAttribute("name");r&&"length"!==r&&isNaN(r)&&(t[r]=n)}return t.item=function(e){return t[e]},t.namedItem=function(e){if("length"!==e&&isNaN(e)&&t[e])return t[e];for(var n=p(t),r=n.next();!r.done;r=n.next())if(((r=r.value).getAttribute("id")||r.getAttribute("name"))==e)return r;return null},t}var wt,Et=[];function Ot(t){wt||(wt=!0,gt(xt)),Et.push(t)}function xt(){wt=!1;for(var t=!!Et.length;Et.length;)Et.shift()();return t}function Tt(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ca=new Set}xt.list=Et,Tt.prototype.flush=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ca.forEach((function(e){e(t)}))}},Tt.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var At=Element.prototype.insertBefore,St=Element.prototype.replaceChild,Nt=Element.prototype.removeChild,Ct=Element.prototype.setAttribute,kt=Element.prototype.removeAttribute,Lt=Element.prototype.cloneNode,It=Document.prototype.importNode,Rt=Element.prototype.addEventListener,jt=Element.prototype.removeEventListener,Pt=Window.prototype.addEventListener,Mt=Window.prototype.removeEventListener,Dt=Element.prototype.dispatchEvent,Ut=Node.prototype.contains||HTMLElement.prototype.contains,Ft=Document.prototype.getElementById,Bt=Element.prototype.querySelector,zt=DocumentFragment.prototype.querySelector,Ht=Document.prototype.querySelector,qt=Element.prototype.querySelectorAll,Wt=DocumentFragment.prototype.querySelectorAll,Vt=Document.prototype.querySelectorAll,$t={};$t.appendChild=Element.prototype.appendChild,$t.insertBefore=At,$t.replaceChild=St,$t.removeChild=Nt,$t.setAttribute=Ct,$t.removeAttribute=kt,$t.cloneNode=Lt,$t.importNode=It,$t.addEventListener=Rt,$t.removeEventListener=jt,$t.fb=Pt,$t.gb=Mt,$t.dispatchEvent=Dt,$t.contains=Ut,$t.getElementById=Ft,$t.pb=Bt,$t.tb=zt,$t.nb=Ht,$t.querySelector=function(t){switch(this.nodeType){case Node.ELEMENT_NODE:return Bt.call(this,t);case Node.DOCUMENT_NODE:return Ht.call(this,t);default:return zt.call(this,t)}},$t.qb=qt,$t.ub=Wt,$t.ob=Vt,$t.querySelectorAll=function(t){switch(this.nodeType){case Node.ELEMENT_NODE:return qt.call(this,t);case Node.DOCUMENT_NODE:return Vt.call(this,t);default:return Wt.call(this,t)}};var Gt=/[&\u00A0"]/g,Kt=/[&\u00A0<>]/g;function Yt(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"\xa0":return"&nbsp;"}}function Xt(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}var Jt=Xt("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Zt=Xt("style script xmp iframe noembed noframes plaintext noscript".split(" "));function Qt(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,s=i.length;o<s&&(n=i[o]);o++){t:{var a=n,c=t,l=e;switch(a.nodeType){case Node.ELEMENT_NODE:for(var u=a.localName,p="<"+u,h=a.attributes,d=0;c=h[d];d++)p+=" "+c.name+'="'+c.value.replace(Gt,Yt)+'"';p+=">",a=Jt[u]?p:p+Qt(a,l)+"</"+u+">";break t;case Node.TEXT_NODE:a=a.data,a=c&&Zt[c.localName]?a:a.replace(Kt,Yt);break t;case Node.COMMENT_NODE:a="\x3c!--"+a.data+"--\x3e";break t;default:throw window.console.error(a),Error("not implemented")}}r+=a}return r}var te=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),ee=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function ne(t){var e=[];for(te.currentNode=t,t=te.firstChild();t;)e.push(t),t=te.nextSibling();return e}var re={parentNode:function(t){return te.currentNode=t,te.parentNode()},firstChild:function(t){return te.currentNode=t,te.firstChild()},lastChild:function(t){return te.currentNode=t,te.lastChild()},previousSibling:function(t){return te.currentNode=t,te.previousSibling()},nextSibling:function(t){return te.currentNode=t,te.nextSibling()}};re.childNodes=ne,re.parentElement=function(t){return ee.currentNode=t,ee.parentNode()},re.firstElementChild=function(t){return ee.currentNode=t,ee.firstChild()},re.lastElementChild=function(t){return ee.currentNode=t,ee.lastChild()},re.previousElementSibling=function(t){return ee.currentNode=t,ee.previousSibling()},re.nextElementSibling=function(t){return ee.currentNode=t,ee.nextSibling()},re.children=function(t){var e=[];for(ee.currentNode=t,t=ee.firstChild();t;)e.push(t),t=ee.nextSibling();return bt(e)},re.innerHTML=function(t){return Qt(t,(function(t){return ne(t)}))},re.textContent=function(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n;default:return t.nodeValue}};var ie=rt.K,oe=[Node.prototype,Element.prototype,HTMLElement.prototype];function se(t){var e;t:{for(e=0;e<oe.length;e++){var n=oe[e];if(n.hasOwnProperty(t)){e=n;break t}}e=void 0}if(!e)throw Error("Could not find descriptor for "+t);return Object.getOwnPropertyDescriptor(e,t)}var ae=ie?{parentNode:se("parentNode"),firstChild:se("firstChild"),lastChild:se("lastChild"),previousSibling:se("previousSibling"),nextSibling:se("nextSibling"),childNodes:se("childNodes"),parentElement:se("parentElement"),previousElementSibling:se("previousElementSibling"),nextElementSibling:se("nextElementSibling"),innerHTML:se("innerHTML"),textContent:se("textContent"),firstElementChild:se("firstElementChild"),lastElementChild:se("lastElementChild"),children:se("children")}:{},ce=ie?{firstElementChild:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"firstElementChild"),lastElementChild:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"lastElementChild"),children:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"children")}:{},le=ie?{firstElementChild:Object.getOwnPropertyDescriptor(Document.prototype,"firstElementChild"),lastElementChild:Object.getOwnPropertyDescriptor(Document.prototype,"lastElementChild"),children:Object.getOwnPropertyDescriptor(Document.prototype,"children")}:{},ue={za:ae,sb:ce,mb:le,parentNode:function(t){return ae.parentNode.get.call(t)},firstChild:function(t){return ae.firstChild.get.call(t)},lastChild:function(t){return ae.lastChild.get.call(t)},previousSibling:function(t){return ae.previousSibling.get.call(t)},nextSibling:function(t){return ae.nextSibling.get.call(t)},childNodes:function(t){return Array.prototype.slice.call(ae.childNodes.get.call(t))},parentElement:function(t){return ae.parentElement.get.call(t)},previousElementSibling:function(t){return ae.previousElementSibling.get.call(t)},nextElementSibling:function(t){return ae.nextElementSibling.get.call(t)},innerHTML:function(t){return ae.innerHTML.get.call(t)},textContent:function(t){return ae.textContent.get.call(t)},children:function(t){switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ce.children.get.call(t);case Node.DOCUMENT_NODE:return le.children.get.call(t);default:return ae.children.get.call(t)}},firstElementChild:function(t){switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ce.firstElementChild.get.call(t);case Node.DOCUMENT_NODE:return le.firstElementChild.get.call(t);default:return ae.firstElementChild.get.call(t)}},lastElementChild:function(t){switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ce.lastElementChild.get.call(t);case Node.DOCUMENT_NODE:return le.lastElementChild.get.call(t);default:return ae.lastElementChild.get.call(t)}}},pe=rt.Ca?ue:re;function he(t){for(;t.firstChild;)t.removeChild(t.firstChild)}var de=rt.K,fe=document.implementation.createHTMLDocument("inert"),_e=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),me=_e&&_e.get,ge=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ve={parentElement:{get:function(){var t=nt(this);return(t=t&&t.parentNode)&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:pe.parentElement(this)},configurable:!0},parentNode:{get:function(){var t=nt(this);return void 0!==(t=t&&t.parentNode)?t:pe.parentNode(this)},configurable:!0},nextSibling:{get:function(){var t=nt(this);return void 0!==(t=t&&t.nextSibling)?t:pe.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var t=nt(this);return void 0!==(t=t&&t.previousSibling)?t:pe.previousSibling(this)},configurable:!0},nextElementSibling:{get:function(){var t=nt(this);if(t&&void 0!==t.nextSibling){for(t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return pe.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){var t=nt(this);if(t&&void 0!==t.previousSibling){for(t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return pe.previousElementSibling(this)},configurable:!0}},ye={className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0}},be={childNodes:{get:function(){if(at(this)){var t=nt(this);if(!t.childNodes){t.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)t.childNodes.push(e)}var n=t.childNodes}else n=pe.childNodes(this);return n.item=function(t){return n[t]},n},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=nt(this);return void 0!==(t=t&&t.firstChild)?t:pe.firstChild(this)},configurable:!0},lastChild:{get:function(){var t=nt(this);return void 0!==(t=t&&t.lastChild)?t:pe.lastChild(this)},configurable:!0},textContent:{get:function(){if(at(this)){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return pe.textContent(this)},set:function(t){switch(null==t&&(t=""),this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!at(this)&&de){var e=this.firstChild;(e!=this.lastChild||e&&e.nodeType!=Node.TEXT_NODE)&&he(this),ue.za.textContent.set.call(this,t)}else he(this),(0<t.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(t));break;default:this.nodeValue=t}},configurable:!0},firstElementChild:{get:function(){var t=nt(this);if(t&&void 0!==t.firstChild){for(t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return pe.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){var t=nt(this);if(t&&void 0!==t.lastChild){for(t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return pe.lastElementChild(this)},configurable:!0},children:{get:function(){return at(this)?bt(Array.prototype.filter.call(this.childNodes,(function(t){return t.nodeType===Node.ELEMENT_NODE}))):pe.children(this)},configurable:!0},innerHTML:{get:function(){return at(this)?Qt("template"===this.localName?this.content:this):pe.innerHTML(this)},set:function(t){var e="template"===this.localName?this.content:this;he(e);var n=this.localName||"div";for(n=this.namespaceURI&&this.namespaceURI!==fe.namespaceURI?fe.createElementNS(this.namespaceURI,n):fe.createElement(n),de?ue.za.innerHTML.set.call(n,t):n.innerHTML=t,t="template"===this.localName?n.content:n;t.firstChild;)e.appendChild(t.firstChild)},configurable:!0}},we={shadowRoot:{get:function(){var t=nt(this);return t&&t.Aa||null},configurable:!0}},Ee={activeElement:{get:function(){var t=ge&&ge.get?ge.get.call(document):rt.K?void 0:document.activeElement;if(t&&t.nodeType){var e=!!ct(this);if(this===document||e&&this.host!==t&&$t.contains.call(this.host,t)){for(e=lt(t);e&&e!==this;)e=lt(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}};function Oe(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function xe(t){Oe(t,ve),Oe(t,ye),Oe(t,be),Oe(t,Ee)}var Te=rt.K?function(){}:function(t){var e=et(t);e.ua||(e.ua=!0,Oe(t,ve,!0),Oe(t,ye,!0))},Ae=rt.K?function(){}:function(t){et(t).Fa||(Oe(t,be,!0),Oe(t,we,!0))},Se=pe.childNodes;function Ne(t,e,n){Te(t),n=n||null;var r=et(t),i=et(e),o=n?et(n):null;r.previousSibling=n?o.previousSibling:e.lastChild,(o=nt(r.previousSibling))&&(o.nextSibling=t),(o=nt(r.nextSibling=n))&&(o.previousSibling=t),r.parentNode=e,n?n===i.firstChild&&(i.firstChild=t):(i.lastChild=t,i.firstChild||(i.firstChild=t)),i.childNodes=null}function Ce(t){var e=et(t);if(void 0===e.firstChild){e.childNodes=null;var n=Se(t);for(e.firstChild=n[0]||null,e.lastChild=n[n.length-1]||null,Ae(t),e=0;e<n.length;e++){var r=n[e],i=et(r);i.parentNode=t,i.nextSibling=n[e+1]||null,i.previousSibling=n[e-1]||null,Te(r)}}}var ke=pe.parentNode;function Le(t,e,n){if(e===t)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(n){var r=nt(n);if(void 0!==(r=r&&r.parentNode)&&r!==t||void 0===r&&ke(n)!==t)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.")}if(n===e)return e;var i,o;if(e.parentNode&&Ie(e.parentNode,e),r=!0,!e.__noInsertionPoint){var s;if(o=i=lt(t))"slot"===e.localName?s=[e]:e.querySelectorAll&&(s=e.querySelectorAll("slot")),o=s&&s.length?s:void 0;if(o){var a=o;(s=i).a=s.a||[],s.o=s.o||[],s.w=s.w||{},s.a.push.apply(s.a,a instanceof Array?a:function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(p(a)))}}if(("slot"===t.localName||o)&&(i=i||lt(t))&&_n(i),at(t)){if(i=n,Ae(t),void 0!==(o=et(t)).firstChild&&(o.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(o=e.childNodes,s=0;s<o.length;s++)Ne(o[s],t,i);o=void 0!==(i=et(e)).firstChild?null:void 0,i.firstChild=i.lastChild=o,i.childNodes=o}else Ne(e,t,i);i=nt(t),Re(t)?(_n(i.root),r=!1):i.root&&(r=!1)}return r?(r=ct(t)?t.host:t,n?(n=function t(e){var n=e;return e&&"slot"===e.localName&&(n=(n=(n=nt(e))&&n.N)&&n.length?n[0]:t(e.nextSibling)),n}(n),$t.insertBefore.call(r,e,n)):$t.appendChild.call(r,e)):e.ownerDocument!==t.ownerDocument&&t.ownerDocument.adoptNode(e),Pe(t,e),e}function Ie(t,e){if(e.parentNode!==t)throw Error("The node to be removed is not a child of this node: "+e);var n=lt(e),r=nt(t);if(at(t)){var i=et(e),o=et(t);e===o.firstChild&&(o.firstChild=i.nextSibling),e===o.lastChild&&(o.lastChild=i.previousSibling);var s=i.previousSibling,a=i.nextSibling;if(s&&(et(s).nextSibling=a),a&&(et(a).previousSibling=s),i.parentNode=i.previousSibling=i.nextSibling=void 0,void 0!==o.childNodes&&(o.childNodes=null),Re(t)){_n(r.root);var c=!0}}if(function t(e){var n=nt(e);if(n&&void 0!==n.V){n=e.childNodes;for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)t(r)}(e=nt(e))&&(e.V=void 0)}(e),n){if((i=t&&"slot"===t.localName)&&(c=!0),n.o){for(f in bn(n),o=n.w)for(s=o[f],a=0;a<s.length;a++){var l=s[a];if(yt(e,l)){s.splice(a,1);var u=n.o.indexOf(l);if(0<=u&&n.o.splice(u,1),a--,l=(u=nt(l)).N)for(var p=0;p<l.length;p++){var h=l[p],d=ln(h);d&&$t.removeChild.call(d,h)}u.N=[],u.assignedNodes=[],u=!0}}var f=u}else f=void 0;(f||i)&&_n(n)}return c||(c=ct(t)?t.host:t,(!r.root&&"slot"!==e.localName||c===ke(e))&&$t.removeChild.call(c,e)),Pe(t,null,e),e}function Re(t){return(t=(t=nt(t))&&t.root)&&On(t)}function je(t,e){if("slot"===e)Re(t=t.parentNode)&&_n(nt(t).root);else if("slot"===t.localName&&"name"===e&&(e=lt(t))){if(e.o){bn(e);var n=t.Ia,r=wn(t);if(r!==n){var i=(n=e.w[n]).indexOf(t);0<=i&&n.splice(i,1),(n=e.w[r]||(e.w[r]=[])).push(t),1<n.length&&(e.w[r]=En(n))}}_n(e)}}function Pe(t,e,n){(t=(t=nt(t))&&t.S)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),function(t){t.a||(t.a=!0,gt((function(){t.flush()})))}(t))}function Me(t,e,n){var r=[];return function t(e,n,r,i){for(var o,s=0,a=e.length;s<a&&(o=e[s]);s++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var l=n,u=r,p=i,h=l(c=o);h&&p.push(c),u&&u(h)?c=h:(t(c.childNodes,l,u,p),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}var De=null;function Ue(t,e,n){De||(De=window.ShadyCSS&&window.ShadyCSS.ScopingShim),De&&"class"===e?De.setElementClass(t,n):($t.setAttribute.call(t,e,n),je(t,e))}var Fe="__eventWrappers"+Date.now(),Be=function(){var t=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return t?function(e){return t.get.call(e)}:null}(),ze={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},He={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function qe(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function We(t,e){if(!ct)return t;t=qe(t,!0);for(var n,r,i,o,s=0;s<e.length;s++)if((i=(n=e[s])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!ct(i)||-1<o)return n}var Ve={get composed(){return void 0===this.Y&&(Be?this.Y=Be(this):!1!==this.isTrusted&&(this.Y=ze[this.type])),this.Y||!1},composedPath:function(){return this.sa||(this.sa=qe(this.__target,this.composed)),this.sa},get target(){return We(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){return this.ja?(this.va||(this.va=qe(this.ja,!0)),We(this.currentTarget||this.__previousCurrentTarget,this.va)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.ia=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.ia=this.Ea=!0}};function $e(t){function e(e,n){return(e=new t(e,n)).Y=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}var Ge={focus:!0,blur:!0};function Ke(t){return t.__target!==t.target||t.ja!==t.relatedTarget}function Ye(t,e,n){if(n=e.__handlers&&e.__handlers[t.type]&&e.__handlers[t.type][n])for(var r,i=0;(r=n[i])&&(!Ke(t)||t.target!==t.relatedTarget)&&(r.call(e,t),!t.Ea);i++);}function Xe(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return i},configurable:!0});for(var r=n.length-1;0<=r;r--){var i=n[r];if(Ye(t,i,"capture"),t.ia)return}for(Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}}),r=0;r<n.length;r++){var o=nt(i=n[r]);if(o=o&&o.root,(0===r||o&&o===e)&&(Ye(t,i,"bubble"),i!==window&&(e=i.getRootNode()),t.ia))break}}function Je(t,e,n,r,i,o){for(var s=0;s<t.length;s++){var a=t[s],c=a.type,l=a.capture,u=a.once,p=a.passive;if(e===a.node&&n===c&&r===l&&i===u&&o===p)return s}return-1}function Ze(t,e,n){if(e){var r=typeof e;if(("function"===r||"object"===r)&&("object"!==r||e.handleEvent&&"function"==typeof e.handleEvent)){var i=this instanceof Window?$t.fb:$t.addEventListener;if(He[t])return i.call(this,t,e,n);if(n&&"object"==typeof n)var o=!!n.capture,s=!!n.once,a=!!n.passive;else o=!!n,a=s=!1;var c=n&&n.la||this,l=e[Fe];if(l){if(-1<Je(l,c,t,o,s,a))return}else e[Fe]=[];l=function(i){if(s&&this.removeEventListener(t,e,n),i.__target||tn(i),c!==this){var o=Object.getOwnPropertyDescriptor(i,"currentTarget");Object.defineProperty(i,"currentTarget",{get:function(){return c},configurable:!0})}if(i.__previousCurrentTarget=i.currentTarget,(!ct(c)||-1!=i.composedPath().indexOf(c))&&(i.composed||-1<i.composedPath().indexOf(c)))if(Ke(i)&&i.target===i.relatedTarget)i.eventPhase===Event.BUBBLING_PHASE&&i.stopImmediatePropagation();else if(i.eventPhase===Event.CAPTURING_PHASE||i.bubbles||i.target===c||c instanceof Window){var a="function"===r?e.call(c,i):e.handleEvent&&e.handleEvent(i);return c!==this&&(o?(Object.defineProperty(i,"currentTarget",o),o=null):delete i.currentTarget),a}},e[Fe].push({node:c,type:t,capture:o,once:s,passive:a,hb:l}),Ge[t]?(this.__handlers=this.__handlers||{},this.__handlers[t]=this.__handlers[t]||{capture:[],bubble:[]},this.__handlers[t][o?"capture":"bubble"].push(l)):i.call(this,t,l,n)}}}function Qe(t,e,n){if(e){var r=this instanceof Window?$t.gb:$t.removeEventListener;if(He[t])return r.call(this,t,e,n);if(n&&"object"==typeof n)var i=!!n.capture,o=!!n.once,s=!!n.passive;else i=!!n,s=o=!1;var a=n&&n.la||this,c=void 0,l=null;try{l=e[Fe]}catch(t){}l&&(-1<(o=Je(l,a,t,i,o,s))&&(c=l.splice(o,1)[0].hb,l.length||(e[Fe]=void 0))),r.call(this,t,c||e,n),c&&Ge[t]&&this.__handlers&&this.__handlers[t]&&(-1<(c=(t=this.__handlers[t][i?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function tn(t){if(t.__target=t.target,t.ja=t.relatedTarget,rt.K){var e=Object.getPrototypeOf(t);if(!e.hasOwnProperty("__patchProto")){var n=Object.create(e);n.jb=e,ht(n,Ve),e.__patchProto=n}t.__proto__=e.__patchProto}else ht(t,Ve)}var en=$e(window.Event),nn=$e(window.CustomEvent),rn=$e(window.MouseEvent);function on(t,e){return{index:t,W:[],ba:e}}function sn(t,e,n,r){var i=0,o=0,s=0,a=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(s=0;s<c;s++)if(t[s]!==n[s])break t;s=c}if(e==t.length&&r==n.length){a=t.length;for(var l=n.length,u=0;u<c-s&&an(t[--a],n[--l]);)u++;a=u}if(o+=s,r-=a,0==(e-=a)-(i+=s)&&0==r-o)return[];if(i==e){for(e=on(i,0);o<r;)e.W.push(n[o++]);return[e]}if(o==r)return[on(i,e-i)];for(r=r-(s=o)+1,a=e-(c=i)+1,e=Array(r),l=0;l<r;l++)e[l]=Array(a),e[l][0]=l;for(l=0;l<a;l++)e[0][l]=l;for(l=1;l<r;l++)for(u=1;u<a;u++)if(t[c+u-1]===n[s+l-1])e[l][u]=e[l-1][u-1];else{var p=e[l-1][u]+1,h=e[l][u-1]+1;e[l][u]=p<h?p:h}for(c=e.length-1,s=e[0].length-1,r=e[c][s],t=[];0<c||0<s;)0==c?(t.push(2),s--):0==s?(t.push(3),c--):(a=e[c-1][s-1],(p=(l=e[c-1][s])<(u=e[c][s-1])?l<a?l:a:u<a?u:a)==a?(a==r?t.push(0):(t.push(1),r=a),c--,s--):p==l?(t.push(3),c--,r=l):(t.push(2),s--,r=u));for(t.reverse(),e=void 0,c=[],s=0;s<t.length;s++)switch(t[s]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=on(i,0)),e.ba++,i++,e.W.push(n[o]),o++;break;case 2:e||(e=on(i,0)),e.ba++,i++;break;case 3:e||(e=on(i,0)),e.W.push(n[o]),o++}return e&&c.push(e),c}function an(t,e){return t===e}var cn,ln=pe.parentNode,un=pe.childNodes,pn={},hn=rt.deferConnectionCallbacks&&"loading"===document.readyState;function dn(t){var e=[];do{e.unshift(t)}while(t=t.parentNode);return e}function fn(t,e,n){if(t!==pn)throw new TypeError("Illegal constructor");this.La="ShadyRoot",this.host=e,this.c=n&&n.mode,Ce(e),(t=et(e)).root=this,t.Aa="closed"!==this.c?this:null,(t=et(this)).firstChild=t.lastChild=t.parentNode=t.nextSibling=t.previousSibling=null,t.childNodes=[],this.b=this.aa=!1,this.a=this.w=this.o=null,_n(this)}function _n(t){t.aa||(t.aa=!0,Ot((function(){return mn(t)})))}function mn(t){for(var e;t;){t.aa&&(e=t);t:{var n=t;if(ct(t=n.host.getRootNode()))for(var r=n.host.childNodes,i=0;i<r.length;i++)if("slot"==(n=r[i]).localName)break t;t=void 0}}e&&e._renderRoot()}function gn(t,e,n){var r=et(e),i=r.$;r.$=null,n||(n=(t=t.w[e.slot||"__catchall"])&&t[0]),n?(et(n).assignedNodes.push(e),r.assignedSlot=n):r.assignedSlot=void 0,i!==r.assignedSlot&&r.assignedSlot&&(et(r.assignedSlot).da=!0)}function vn(t,e,n){for(var r,i=0;i<n.length&&(r=n[i]);i++)if("slot"==r.localName){var o=nt(r).assignedNodes;o&&o.length&&vn(t,e,o)}else e.push(n[i])}function yn(t,e){$t.dispatchEvent.call(e,new Event("slotchange")),(e=nt(e)).assignedSlot&&yn(t,e.assignedSlot)}function bn(t){if(t.a&&t.a.length){for(var e,n=t.a,r=0;r<n.length;r++){var i=n[r];Ce(i),Ce(i.parentNode);var o=wn(i);t.w[o]?((e=e||{})[o]=!0,t.w[o].push(i)):t.w[o]=[i],t.o.push(i)}if(e)for(var s in e)t.w[s]=En(t.w[s]);t.a=[]}}function wn(t){var e=t.name||t.getAttribute("name")||"__catchall";return t.Ia=e}function En(t){return t.sort((function(t,e){t=dn(t);for(var n=dn(e),r=0;r<t.length;r++){e=t[r];var i=n[r];if(e!==i)return(t=Array.from(e.parentNode.childNodes)).indexOf(e)-t.indexOf(i)}}))}function On(t){return bn(t),!(!t.o||!t.o.length)}if(fn.prototype._renderRoot=function(){var t=hn;if(hn=!0,this.aa=!1,this.o){bn(this);for(var e,n=0;n<this.o.length;n++){var r=nt(e=this.o[n]),i=r.assignedNodes;if(r.assignedNodes=[],r.N=[],r.ma=i)for(r=0;r<i.length;r++){var o=nt(i[r]);o.$=o.assignedSlot,o.assignedSlot===e&&(o.assignedSlot=null)}}for(e=this.host.firstChild;e;e=e.nextSibling)gn(this,e);for(n=0;n<this.o.length;n++){if(!(i=nt(e=this.o[n])).assignedNodes.length)for(r=e.firstChild;r;r=r.nextSibling)gn(this,r,e);if((r=(r=nt(e.parentNode))&&r.root)&&On(r)&&r._renderRoot(),vn(this,i.N,i.assignedNodes),r=i.ma){for(o=0;o<r.length;o++)nt(r[o]).$=null;i.ma=null,r.length>i.assignedNodes.length&&(i.da=!0)}i.da&&(i.da=!1,yn(this,e))}for(n=this.o,e=[],i=0;i<n.length;i++)(o=nt(r=n[i].parentNode))&&o.root||!(0>e.indexOf(r))||e.push(r);for(n=0;n<e.length;n++){r=(i=e[n])===this?this.host:i,o=[],i=i.childNodes;for(var s=0;s<i.length;s++){var a=i[s];if("slot"==a.localName){a=nt(a).N;for(var c=0;c<a.length;c++)o.push(a[c])}else o.push(a)}i=void 0,s=un(r),a=sn(o,o.length,s,s.length);for(var l=c=0;c<a.length&&(i=a[c]);c++){for(var u,p=0;p<i.W.length&&(u=i.W[p]);p++)ln(u)===r&&$t.removeChild.call(r,u),s.splice(i.index+l,1);l-=i.ba}for(l=0;l<a.length&&(i=a[l]);l++)for(c=s[i.index],p=i.index;p<i.index+i.ba;p++)u=o[p],$t.insertBefore.call(r,u,c),s.splice(p,0,u)}}if(!this.b)for(e=0,n=(u=this.host.childNodes).length;e<n;e++)r=nt(i=u[e]),ln(i)!==this.host||"slot"!==i.localName&&r.assignedSlot||$t.removeChild.call(this.host,i);this.b=!0,hn=t,cn&&cn()},window.customElements&&rt.oa){var xn=new Map;cn=function(){var t=Array.from(xn);xn.clear();for(var e=(t=p(t)).next();!e.done;e=t.next()){var n=(e=p(e.value)).next().value;e.next().value?n.Ga():n.Ha()}},hn&&document.addEventListener("readystatechange",(function(){hn=!1,cn()}),{once:!0});var Tn=window.customElements.define;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:function(t,e){var n=e.prototype.connectedCallback,r=e.prototype.disconnectedCallback;Tn.call(window.customElements,t,function(t,e,n){var r=0,i="__isConnected"+r++;return(e||n)&&(t.prototype.connectedCallback=t.prototype.Ga=function(){hn?xn.set(this,!0):this[i]||(this[i]=!0,e&&e.call(this))},t.prototype.disconnectedCallback=t.prototype.Ha=function(){hn?this.isConnected||xn.set(this,!1):this[i]&&(this[i]=!1,n&&n.call(this))}),t}(e,n,r)),e.prototype.connectedCallback=n,e.prototype.disconnectedCallback=r}})}function An(t){var e=t.getRootNode();return ct(e)&&mn(e),(t=nt(t))&&t.assignedSlot||null}var Sn={addEventListener:Ze.bind(window),removeEventListener:Qe.bind(window)},Nn={addEventListener:Ze,removeEventListener:Qe,appendChild:function(t){return Le(this,t)},insertBefore:function(t,e){return Le(this,t,e)},removeChild:function(t){return Ie(this,t)},replaceChild:function(t,e){return Le(this,t,e),Ie(this,e),t},cloneNode:function(t){if("template"==this.localName)var e=$t.cloneNode.call(this,t);else if(e=$t.cloneNode.call(this,!1),t&&e.nodeType!==Node.ATTRIBUTE_NODE){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return function t(e){if(e&&e.nodeType){var n=et(e),r=n.V;return void 0===r&&(ct(e)?(r=e,n.V=r):(r=(r=e.parentNode)?t(r):e,$t.contains.call(document.documentElement,e)&&(n.V=r))),r}}(this)},contains:function(t){return yt(this,t)},dispatchEvent:function(t){return xt(),$t.dispatchEvent.call(this,t)}};Object.defineProperties(Nn,{isConnected:{get:function(){if(me&&me.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;var t=this.ownerDocument;if(vt){if($t.contains.call(t,this))return!0}else if(t.documentElement&&$t.contains.call(t.documentElement,this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(ct(t)?t.host:void 0);return!!(t&&t instanceof Document)},configurable:!0}});var Cn={get assignedSlot(){return An(this)}},kn={querySelector:function(t){return Me(this,(function(e){return pt.call(e,t)}),(function(t){return!!t}))[0]||null},querySelectorAll:function(t,e){if(e){e=Array.prototype.slice.call($t.querySelectorAll.call(this,t));var n=this.getRootNode();return e.filter((function(t){return t.getRootNode()==n}))}return Me(this,(function(e){return pt.call(e,t)}))}},Ln={assignedNodes:function(t){if("slot"===this.localName){var e=this.getRootNode();return ct(e)&&mn(e),(e=nt(this))&&(t&&t.flatten?e.N:e.assignedNodes)||[]}}},In=dt({setAttribute:function(t,e){Ue(this,t,e)},removeAttribute:function(t){$t.removeAttribute.call(this,t),je(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new fn(pn,this,t)},get slot(){return this.getAttribute("slot")},set slot(t){Ue(this,"slot",t)},get assignedSlot(){return An(this)}},kn,Ln);Object.defineProperties(In,we);var Rn=dt({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document||"template"===e.localName)return $t.importNode.call(document,e,n);var r=$t.importNode.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return Me(this,(function(e){return e.id==t}),(function(t){return!!t}))[0]||null}},kn);Object.defineProperties(Rn,{_activeElement:Ee.activeElement});for(var jn=HTMLElement.prototype.blur,Pn={blur:function(){var t=nt(this);(t=(t=t&&t.root)&&t.activeElement)?t.blur():jn.call(this)}},Mn={},Dn=p(Object.getOwnPropertyNames(Document.prototype)),Un=Dn.next();!Un.done;Mn={H:Mn.H},Un=Dn.next())Mn.H=Un.value,"on"===Mn.H.substring(0,2)&&Object.defineProperty(Pn,Mn.H,{set:function(t){return function(e){var n=et(this),r=t.H.substring(2);n.Z[t.H]&&this.removeEventListener(r,n.Z[t.H]),this.addEventListener(r,e,{}),n.Z[t.H]=e}}(Mn),get:function(t){return function(){var e=nt(this);return e&&e.Z[t.H]}}(Mn),configurable:!0});var Fn={addEventListener:function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.la=this,this.host.addEventListener(t,e,n)},removeEventListener:function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.la=this,this.host.removeEventListener(t,e,n)},getElementById:function(t){return Me(this,(function(e){return e.id==t}),(function(t){return!!t}))[0]||null}};function Bn(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}if(rt.oa){var zn={inUse:rt.oa,patch:function(t){return Ae(t),Te(t),t},isShadyRoot:ct,enqueue:Ot,flush:xt,settings:rt,filterMutations:function(t,e){var n=e.getRootNode();return t.map((function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter((function(t){return n===t.getRootNode()}))).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t})).filter((function(t){return t}))},observeChildren:function(t,e){var n=et(t);n.S||(n.S=new Tt),n.S.ca.add(e);var r=n.S;return{Ka:e,P:r,Ma:t,takeRecords:function(){return r.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.P;e&&(e.ca.delete(t.Ka),e.ca.size||(et(t.Ma).S=null))},nativeMethods:$t,nativeTree:pe,deferConnectionCallbacks:rt.deferConnectionCallbacks};window.ShadyDOM=zn,function(){if(window.Event=en,window.CustomEvent=nn,window.MouseEvent=rn,function(){for(var t in Ge)window.addEventListener(t,(function(t){t.__target||(tn(t),Xe(t))}),!0)}(),!Be&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var t=function(){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(t)};Element.prototype.click?Element.prototype.click=t:HTMLElement.prototype.click&&(HTMLElement.prototype.click=t)}}();var Hn=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;Bn(fn.prototype,Fn),Bn(window.Node.prototype,Nn),Bn(window.Window.prototype,Sn),Bn(window.Text.prototype,Cn),Bn(window.DocumentFragment.prototype,kn),Bn(window.Element.prototype,In),Bn(window.Document.prototype,Rn),window.HTMLSlotElement&&Bn(window.HTMLSlotElement.prototype,Ln),Bn(Hn.prototype,Pn),rt.K&&(xe(window.Node.prototype),xe(window.Text.prototype),xe(window.DocumentFragment.prototype),xe(window.Element.prototype),xe(Hn.prototype),xe(window.Document.prototype),window.HTMLSlotElement&&xe(window.HTMLSlotElement.prototype)),function(){var t=fn.prototype;t.__proto__=DocumentFragment.prototype,Oe(t,ve,!0),Oe(t,be,!0),Oe(t,Ee,!0),Object.defineProperties(t,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}}),["localName","namespaceURI","prefix"].forEach((function(e){Object.defineProperty(t,e,{value:void 0,configurable:!0})})),["ownerDocument","baseURI","isConnected"].forEach((function(e){Object.defineProperty(t,e,{get:function(){return this.host[e]},configurable:!0})}))}(),window.ShadowRoot=fn}var qn=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function Wn(t){var e=qn.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!e&&t}function Vn(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function $n(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function Gn(t,e,n){n=void 0===n?new Set:n;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)Gn(r,e,n);r=$n(t,i);continue}if("template"===o){r=$n(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)Gn(i,e,n)}r=r.firstChild?r.firstChild:$n(t,r)}}function Kn(t,e,n){t[e]=n}function Yn(){this.a=new Map,this.m=new Map,this.f=[],this.c=!1}function Xn(t,e){t.c=!0,t.f.push(e)}function Jn(t,e){t.c&&Gn(e,(function(e){return t.b(e)}))}function Zn(t,e){var n=[];for(Gn(e,(function(t){return n.push(t)})),e=0;e<n.length;e++){var r=n[e];1===r.__CE_state?t.connectedCallback(r):er(t,r)}}function Qn(t,e){var n=[];for(Gn(e,(function(t){return n.push(t)})),e=0;e<n.length;e++){var r=n[e];1===r.__CE_state&&t.disconnectedCallback(r)}}function tr(t,e,n){var r=(n=void 0===n?{}:n).cb||new Set,i=n.ha||function(e){return er(t,e)},o=[];if(Gn(e,(function(e){if("link"===e.localName&&"import"===e.getAttribute("rel")){var n=e.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:e.addEventListener("load",(function(){var n=e.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var o=new Set(r);o.delete(n),tr(t,n,{cb:o,ha:i})}}))}else o.push(e)}),r),t.c)for(e=0;e<o.length;e++)t.b(o[e]);for(e=0;e<o.length;e++)i(o[e])}function er(t,e){if(void 0===e.__CE_state){var n=e.ownerDocument;if((n.defaultView||n.__CE_isImportDocument&&n.__CE_hasRegistry)&&(n=t.a.get(e.localName))){n.constructionStack.push(e);var r=n.constructor;try{try{if(new r!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{n.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}if(e.__CE_state=1,e.__CE_definition=n,n.attributeChangedCallback)for(n=n.observedAttributes,r=0;r<n.length;r++){var i=n[r],o=e.getAttribute(i);null!==o&&t.attributeChangedCallback(e,i,null,o,null)}Vn(e)&&t.connectedCallback(e)}}}function nr(t){var e=document;this.b=t,this.a=e,this.P=void 0,tr(this.b,this.a),"loading"===this.a.readyState&&(this.P=new MutationObserver(this.c.bind(this)),this.P.observe(this.a,{childList:!0,subtree:!0}))}function rr(t){t.P&&t.P.disconnect()}function ir(){var t=this;this.a=this.A=void 0,this.b=new Promise((function(e){t.a=e,t.A&&e(t.A)}))}function or(t){this.c=!1,this.a=t,this.G=new Map,this.f=function(t){return t()},this.b=!1,this.m=[],this.fa=new nr(t)}Yn.prototype.b=function(t){if(this.c&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.f.length;e++)this.f[e](t)}},Yn.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},Yn.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},Yn.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},nr.prototype.c=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||rr(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)tr(this.b,n[r])},ir.prototype.resolve=function(t){if(this.A)throw Error("Already resolved.");this.A=t,this.a&&this.a(t)},(n=or.prototype).define=function(t,e){var n=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!Wn(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.a.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var r=function(t){var e=i[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},i=e.prototype;if(!(i instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var o=r("connectedCallback"),s=r("disconnectedCallback"),a=r("adoptedCallback"),c=r("attributeChangedCallback"),l=e.observedAttributes||[]}catch(t){return}finally{this.c=!1}e={localName:t,constructor:e,connectedCallback:o,disconnectedCallback:s,adoptedCallback:a,attributeChangedCallback:c,observedAttributes:l,constructionStack:[]},function(t,e,n){t.a.set(e,n),t.m.set(n.constructor,n)}(this.a,t,e),this.m.push(e),this.b||(this.b=!0,this.f((function(){return function(t){if(!1!==t.b){t.b=!1;for(var e=t.m,n=[],r=new Map,i=0;i<e.length;i++)r.set(e[i].localName,[]);for(tr(t.a,document,{ha:function(e){if(void 0===e.__CE_state){var i=e.localName,o=r.get(i);o?o.push(e):t.a.a.get(i)&&n.push(e)}}}),i=0;i<n.length;i++)er(t.a,n[i]);for(;0<e.length;){var o=e.shift();i=o.localName,o=r.get(o.localName);for(var s=0;s<o.length;s++)er(t.a,o[s]);(i=t.G.get(i))&&i.resolve(void 0)}}}(n)})))},n.ha=function(t){tr(this.a,t)},n.get=function(t){if(t=this.a.a.get(t))return t.constructor},n.Da=function(t){if(!Wn(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var e=this.G.get(t);return e?e.b:(e=new ir,this.G.set(t,e),this.a.a.get(t)&&!this.m.some((function(e){return e.localName===t}))&&e.resolve(void 0),e.b)},n.Za=function(t){rr(this.fa);var e=this.f;this.f=function(n){return t((function(){return e(n)}))}},window.CustomElementRegistry=or,or.prototype.define=or.prototype.define,or.prototype.upgrade=or.prototype.ha,or.prototype.get=or.prototype.get,or.prototype.whenDefined=or.prototype.Da,or.prototype.polyfillWrapFlushCallback=or.prototype.Za;var sr=window.Document.prototype.createElement,ar=window.Document.prototype.createElementNS,cr=window.Document.prototype.importNode,lr=window.Document.prototype.prepend,ur=window.Document.prototype.append,pr=window.DocumentFragment.prototype.prepend,hr=window.DocumentFragment.prototype.append,dr=window.Node.prototype.cloneNode,fr=window.Node.prototype.appendChild,_r=window.Node.prototype.insertBefore,mr=window.Node.prototype.removeChild,gr=window.Node.prototype.replaceChild,vr=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),yr=window.Element.prototype.attachShadow,br=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),wr=window.Element.prototype.getAttribute,Er=window.Element.prototype.setAttribute,Or=window.Element.prototype.removeAttribute,xr=window.Element.prototype.getAttributeNS,Tr=window.Element.prototype.setAttributeNS,Ar=window.Element.prototype.removeAttributeNS,Sr=window.Element.prototype.insertAdjacentElement,Nr=window.Element.prototype.insertAdjacentHTML,Cr=window.Element.prototype.prepend,kr=window.Element.prototype.append,Lr=window.Element.prototype.before,Ir=window.Element.prototype.after,Rr=window.Element.prototype.replaceWith,jr=window.Element.prototype.remove,Pr=window.HTMLElement,Mr=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Dr=window.HTMLElement.prototype.insertAdjacentElement,Ur=window.HTMLElement.prototype.insertAdjacentHTML,Fr=new function(){};function Br(t,e,n){function r(e){return function(n){for(var r=[],i=0;i<arguments.length;++i)r[i]=arguments[i];i=[];for(var o=[],s=0;s<r.length;s++){var a=r[s];if(a instanceof Element&&Vn(a)&&o.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)i.push(a);else i.push(a)}for(e.apply(this,r),r=0;r<o.length;r++)Qn(t,o[r]);if(Vn(this))for(r=0;r<i.length;r++)(o=i[r])instanceof Element&&Zn(t,o)}}void 0!==n.ga&&(e.prepend=r(n.ga)),void 0!==n.append&&(e.append=r(n.append))}var zr=window.customElements;if(!zr||zr.forcePolyfill||"function"!=typeof zr.define||"function"!=typeof zr.get){var Hr=new Yn;!function(){var t=Hr;window.HTMLElement=function(){function e(){var e=this.constructor,n=t.m.get(e);if(!n)throw Error("The custom element being constructed was not registered with `customElements`.");var r=n.constructionStack;if(0===r.length)return r=sr.call(document,n.localName),Object.setPrototypeOf(r,e.prototype),r.__CE_state=1,r.__CE_definition=n,t.b(r),r;var i=r[n=r.length-1];if(i===Fr)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return r[n]=Fr,Object.setPrototypeOf(i,e.prototype),t.b(i),i}return e.prototype=Pr.prototype,Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}()}(),function(){var t=Hr;Kn(Document.prototype,"createElement",(function(e){if(this.__CE_hasRegistry){var n=t.a.get(e);if(n)return new n.constructor}return e=sr.call(this,e),t.b(e),e})),Kn(Document.prototype,"importNode",(function(e,n){return e=cr.call(this,e,n),this.__CE_hasRegistry?tr(t,e):Jn(t,e),e})),Kn(Document.prototype,"createElementNS",(function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.a.get(n);if(r)return new r.constructor}return e=ar.call(this,e,n),t.b(e),e})),Br(t,Document.prototype,{ga:lr,append:ur})}(),Br(Hr,DocumentFragment.prototype,{ga:pr,append:hr}),function(){function t(t,n){Object.defineProperty(t,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,t);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&Vn(this)){r=Array(o);for(var s=0;s<o;s++)r[s]=i[s]}}if(n.set.call(this,t),r)for(t=0;t<r.length;t++)Qn(e,r[t])}}})}var e=Hr;Kn(Node.prototype,"insertBefore",(function(t,n){if(t instanceof DocumentFragment){var r=Array.prototype.slice.apply(t.childNodes);if(t=_r.call(this,t,n),Vn(this))for(n=0;n<r.length;n++)Zn(e,r[n]);return t}return r=Vn(t),n=_r.call(this,t,n),r&&Qn(e,t),Vn(this)&&Zn(e,t),n})),Kn(Node.prototype,"appendChild",(function(t){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=fr.call(this,t),Vn(this))for(var r=0;r<n.length;r++)Zn(e,n[r]);return t}return n=Vn(t),r=fr.call(this,t),n&&Qn(e,t),Vn(this)&&Zn(e,t),r})),Kn(Node.prototype,"cloneNode",(function(t){return t=dr.call(this,t),this.ownerDocument.__CE_hasRegistry?tr(e,t):Jn(e,t),t})),Kn(Node.prototype,"removeChild",(function(t){var n=Vn(t),r=mr.call(this,t);return n&&Qn(e,t),r})),Kn(Node.prototype,"replaceChild",(function(t,n){if(t instanceof DocumentFragment){var r=Array.prototype.slice.apply(t.childNodes);if(t=gr.call(this,t,n),Vn(this))for(Qn(e,n),n=0;n<r.length;n++)Zn(e,r[n]);return t}r=Vn(t);var i=gr.call(this,t,n),o=Vn(this);return o&&Qn(e,n),r&&Qn(e,t),o&&Zn(e,t),i})),vr&&vr.get?t(Node.prototype,vr):Xn(e,(function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)mr.call(this,this.firstChild);fr.call(this,document.createTextNode(t))}})}))}(),function(){function t(t,e){Object.defineProperty(t,"innerHTML",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(t){var n=this,i=void 0;if(Vn(this)&&(i=[],Gn(this,(function(t){t!==n&&i.push(t)}))),e.set.call(this,t),i)for(var o=0;o<i.length;o++){var s=i[o];1===s.__CE_state&&r.disconnectedCallback(s)}return this.ownerDocument.__CE_hasRegistry?tr(r,this):Jn(r,this),t}})}function e(t,e){Kn(t,"insertAdjacentElement",(function(t,n){var i=Vn(n);return t=e.call(this,t,n),i&&Qn(r,n),Vn(t)&&Zn(r,n),t}))}function n(t,e){function n(t,e){for(var n=[];t!==e;t=t.nextSibling)n.push(t);for(e=0;e<n.length;e++)tr(r,n[e])}Kn(t,"insertAdjacentHTML",(function(t,r){if("beforebegin"===(t=t.toLowerCase())){var i=this.previousSibling;e.call(this,t,r),n(i||this.parentNode.firstChild,this)}else if("afterbegin"===t)i=this.firstChild,e.call(this,t,r),n(this.firstChild,i);else if("beforeend"===t)i=this.lastChild,e.call(this,t,r),n(i||this.firstChild,null);else{if("afterend"!==t)throw new SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");i=this.nextSibling,e.call(this,t,r),n(this.nextSibling,i)}}))}var r=Hr;yr&&Kn(Element.prototype,"attachShadow",(function(t){return this.__CE_shadowRoot=yr.call(this,t)})),br&&br.get?t(Element.prototype,br):Mr&&Mr.get?t(HTMLElement.prototype,Mr):Xn(r,(function(e){t(e,{enumerable:!0,configurable:!0,get:function(){return dr.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName,n=e?this.content:this,r=ar.call(document,this.namespaceURI,this.localName);for(r.innerHTML=t;0<n.childNodes.length;)mr.call(n,n.childNodes[0]);for(t=e?r.content:r;0<t.childNodes.length;)fr.call(n,t.childNodes[0])}})})),Kn(Element.prototype,"setAttribute",(function(t,e){if(1!==this.__CE_state)return Er.call(this,t,e);var n=wr.call(this,t);Er.call(this,t,e),e=wr.call(this,t),r.attributeChangedCallback(this,t,n,e,null)})),Kn(Element.prototype,"setAttributeNS",(function(t,e,n){if(1!==this.__CE_state)return Tr.call(this,t,e,n);var i=xr.call(this,t,e);Tr.call(this,t,e,n),n=xr.call(this,t,e),r.attributeChangedCallback(this,e,i,n,t)})),Kn(Element.prototype,"removeAttribute",(function(t){if(1!==this.__CE_state)return Or.call(this,t);var e=wr.call(this,t);Or.call(this,t),null!==e&&r.attributeChangedCallback(this,t,e,null,null)})),Kn(Element.prototype,"removeAttributeNS",(function(t,e){if(1!==this.__CE_state)return Ar.call(this,t,e);var n=xr.call(this,t,e);Ar.call(this,t,e);var i=xr.call(this,t,e);n!==i&&r.attributeChangedCallback(this,e,n,i,t)})),Dr?e(HTMLElement.prototype,Dr):Sr?e(Element.prototype,Sr):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),Ur?n(HTMLElement.prototype,Ur):Nr?n(Element.prototype,Nr):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),Br(r,Element.prototype,{ga:Cr,append:kr}),function(t){function e(e){return function(n){for(var r=[],i=0;i<arguments.length;++i)r[i]=arguments[i];i=[];for(var o=[],s=0;s<r.length;s++){var a=r[s];if(a instanceof Element&&Vn(a)&&o.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)i.push(a);else i.push(a)}for(e.apply(this,r),r=0;r<o.length;r++)Qn(t,o[r]);if(Vn(this))for(r=0;r<i.length;r++)(o=i[r])instanceof Element&&Zn(t,o)}}var n=Element.prototype;void 0!==Lr&&(n.before=e(Lr)),void 0!==Lr&&(n.after=e(Ir)),void 0!==Rr&&Kn(n,"replaceWith",(function(e){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];r=[];for(var i=[],o=0;o<n.length;o++){var s=n[o];if(s instanceof Element&&Vn(s)&&i.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)r.push(s);else r.push(s)}for(o=Vn(this),Rr.apply(this,n),n=0;n<i.length;n++)Qn(t,i[n]);if(o)for(Qn(t,this),n=0;n<r.length;n++)(i=r[n])instanceof Element&&Zn(t,i)})),void 0!==jr&&Kn(n,"remove",(function(){var e=Vn(this);jr.call(this),e&&Qn(t,this)}))}(r)}(),document.__CE_hasRegistry=!0;var qr=new or(Hr);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:qr})}function Wr(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function Vr(t){var e=$r,n=t=t.replace(Zr,"").replace(Qr,""),r=new Wr;r.start=0,r.end=n.length;for(var i=r,o=0,s=n.length;o<s;o++)if("{"===n[o]){i.rules||(i.rules=[]);var a=i,c=a.rules[a.rules.length-1]||null;(i=new Wr).start=o+1,i.parent=a,i.previous=c,a.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function $r(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\"+t}))}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(oi," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=0===n.indexOf("@"),t.atRule?0===n.indexOf("@media")?t.type=Xr:n.match(ii)&&(t.type=Yr,t.keyframesName=t.selector.split(oi).pop()):t.type=0===n.indexOf("--")?Jr:Kr),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)$r(r,e);return t}var Gr,Kr=1,Yr=7,Xr=4,Jr=1e3,Zr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,Qr=/@import[^;]*;/gim,ti=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,ei=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ni=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ri=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ii=/^@[^\s]*keyframes/,oi=/\s+/g,si=!(window.ShadyDOM&&window.ShadyDOM.inUse);function ai(t){Gr=(!t||!t.shimcssproperties)&&(si||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Gr=window.ShadyCSS.nativeCss:window.ShadyCSS?(ai(window.ShadyCSS),window.ShadyCSS=void 0):ai(window.WebComponents&&window.WebComponents.flags);var ci=Gr,li=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,ui=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,pi=/(--[\w-]+)\s*([:,;)]|$)/gi,hi=/(animation\s*:)|(animation-name\s*:)/,di=/@media\s(.*)/,fi=/\{[^}]*\}/g,_i=new Set;function mi(t,e){return t?("string"==typeof t&&(t=Vr(t)),e&&yi(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,s=e.rules;if((o=s)&&(o=!((o=s[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var a,c=s.length;o<c&&(a=s[o]);o++)i=t(a,n,i)}else n?n=e.cssText:n=(n=(n=e.cssText).replace(ti,"").replace(ei,"")).replace(ni,"").replace(ri,""),(i=n.trim())&&(i=" "+i+"\n")}return i&&(e.selector&&(r+=e.selector+" {\n"),r+=i,e.selector&&(r+="}\n\n")),r}(t,ci)):""}function gi(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Vr(t.textContent)),t.__cssRules||null}function vi(t){return!!t.parent&&t.parent.type===Yr}function yi(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Xr){var s=t.selector.match(di);s&&(window.matchMedia(s[1]).matches||(i=!0))}if(o===Kr?e(t):n&&o===Yr?n(t):o===Jr&&(i=!0),(t=t.rules)&&!i){i=0,o=t.length;for(var a;i<o&&(a=t[i]);i++)yi(a,e,n,r)}}}function bi(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Oi(i,n,r),i}var wi=null;function Ei(t){t=document.createComment(" Shady DOM styles for "+t+" ");var e=document.head;return e.insertBefore(t,(wi?wi.nextSibling:null)||e.firstChild),wi=t}function Oi(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),wi?t.compareDocumentPosition(wi)===Node.DOCUMENT_POSITION_PRECEDING&&(wi=t):wi=t}function xi(t,e){for(var n=0,r=t.length;e<r;e++)if("("===t[e])n++;else if(")"===t[e]&&0==--n)return e;return-1}function Ti(t,e){si?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function Ai(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,X:n}}function Si(t){for(var e=[],n="",r=0;0<=r&&r<t.length;r++)if("("===t[r]){var i=xi(t,r);n+=t.slice(r,i+1),r=i}else","===t[r]?(e.push(n),n=""):n+=t[r];return n&&e.push(n),e}function Ni(){}function Ci(t,e,n){if(e.nodeType===Node.ELEMENT_NODE&&n(e),e="template"===e.localName?(e.content||e.kb||e).childNodes:e.children||e.childNodes)for(var r=0;r<e.length;r++)Ci(t,e[r],n)}function ki(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Qi);n?r&&Ti(t,e=r.replace("style-scope","").replace(e,"")):Ti(t,(r?r+" ":"")+"style-scope "+e)}}function Li(t,e,n){var r=no;t.__styleScoped?t.__styleScoped=null:Ci(r,t,(function(t){ki(t,e,!0),ki(t,n)}))}function Ii(t,e){var n=no;t.__styleScoped?t.__styleScoped=null:Ci(n,t,(function(t){ki(t,e||"",!0)}))}function Ri(t,e,n){var r=no,i=t.__cssBuild;return si||"shady"===i?e=mi(e,n):e=function(t,e,n,r,i){var o=ji(n,r);return n=n?Ji+n:"",mi(e,(function(e){e.c||(e.selector=e.F=Pi(t,e,t.b,n,o),e.c=!0),i&&i(e,n,o)}))}(r,e,(t=Ai(t)).is,t.X,n)+"\n\n",e.trim()}function ji(t,e){return e?"[is="+t+"]":t}function Pi(t,e,n,r,i){var o=Si(e.selector);if(!vi(e)){e=0;for(var s,a=o.length;e<a&&(s=o[e]);e++)o[e]=n.call(t,s,r,i)}return o.filter((function(t){return!!t})).join(zi)}function Mi(t){return t.replace(Fi,(function(t,e,n){return-1<n.indexOf("+")?n=n.replace(/\+/g,"___"):-1<n.indexOf("___")&&(n=n.replace(/___/g,"+")),":"+e+"("+n+")"}))}function Di(t,e){return(t=t.split(Zi))[0]+=e,t.join(Zi)}function Ui(t){t.selector===Vi&&(t.selector="html")}Ni.prototype.b=function(t,e,n){var r=!1;t=t.trim();var i=Fi.test(t);i&&(t=Mi(t=t.replace(Fi,(function(t,e,n){return":"+e+"("+n.replace(/\s/g,"")+")"}))));var o=eo.test(t);if(o){var s=function(t){for(var e,n=[];e=t.match(eo);){var r=e.index,i=xi(t,r);if(-1===i)throw Error(e.input+" selector missing ')'");e=t.slice(r,i+1),t=t.replace(e,"\ue000"),n.push(e)}return{ra:t,matches:n}}(t);t=s.ra,s=s.matches}return t=(t=t.replace(Gi,Wi+" $1")).replace(Hi,(function(t,i,o){return r||(t=function(t,e,n,r){var i=t.indexOf($i);if(0<=t.indexOf(Wi)?t=function(t,e){var n=t.match(Ki);return(n=n&&n[2].trim()||"")?n[0].match(qi)?t.replace(Ki,(function(t,n,r){return e+r})):n.split(qi)[0]===e?n:to:t.replace(Wi,e)}(t,r):0!==i&&(t=n?Di(t,n):t),n=!1,0<=i&&(e="",n=!0),n){var o=!0;n&&(t=t.replace(Yi,(function(t,e){return" > "+e})))}return{value:t=t.replace(Xi,(function(t,e,n){return'[dir="'+n+'"] '+e+", "+e+'[dir="'+n+'"]'})),Qa:e,stop:o}}(o,i,e,n),r=r||t.stop,i=t.Qa,o=t.value),i+o})),o&&(t=function(t,e){var n=t.split("\ue000");return e.reduce((function(t,e,r){return t+e+n[r+1]}),n[0])}(t,s)),i&&(t=Mi(t)),t},Ni.prototype.c=function(t){return t.match(Wi)?"":t.match($i)?this.b(t,Bi):Di(t.trim(),Bi)},i.Object.defineProperties(Ni.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Fi=/:(nth[-\w]+)\(([^)]+)\)/,Bi=":not(.style-scope)",zi=",",Hi=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,qi=/[[.:#*]/,Wi=":host",Vi=":root",$i="::slotted",Gi=new RegExp("^("+$i+")"),Ki=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Yi=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Xi=/(.*):dir\((?:(ltr|rtl))\)/,Ji=".",Zi=":",Qi="class",to="should_not_match",eo=/:(?:matches|any|-(?:webkit|moz)-any)/,no=new Ni;function ro(t,e,n,r){this.M=t||null,this.b=e||null,this.pa=n||[],this.T=null,this.X=r||"",this.a=this.I=this.O=null}function io(t){return t?t.__styleInfo:null}function oo(t,e){return t.__styleInfo=e}function so(t){var e=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return e&&e.call(this,t)}ro.prototype.c=function(){return this.M},ro.prototype._getStyleRules=ro.prototype.c;var ao=navigator.userAgent.match("Trident");function co(){}function lo(t){if(!t.B){var e={},n={};uo(t,n)&&(e.L=n,t.rules=null),e.cssText=t.parsedCssText.replace(fi,"").replace(li,""),t.B=e}}function uo(t,e){var n=t.B;if(!n){n=t.parsedCssText;for(var r;t=li.exec(n);)"inherit"===(r=(t[2]||t[3]).trim())&&"unset"===r||(e[t[1].trim()]=r),r=!0;return r}if(n.L)return Object.assign(e,n.L),!0}function po(t,e,n){return e&&(e=0<=e.indexOf(";")?ho(t,e,n):function t(e,n){var r=e.indexOf("var(");if(-1===r)return n(e,"","","");var i=xi(e,r+3),o=e.substring(r+4,i);return r=e.substring(0,r),e=t(e.substring(i+1),n),-1===(i=o.indexOf(","))?n(r,o.trim(),"",e):n(r,o.substring(0,i).trim(),o.substring(i+1).trim(),e)}(e,(function(e,r,i,o){return r?((r=po(t,n[r],n))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=po(t,n[i]||i,n)||i,e+(r||"")+o):e+o}))),e&&e.trim()||""}function ho(t,e,n){e=e.split(";");for(var r,i,o=0;o<e.length;o++)if(r=e[o]){if(ui.lastIndex=0,i=ui.exec(r))r=po(t,n[i[1]],n);else if(-1!==(i=r.indexOf(":"))){var s=r.substring(i);s=po(t,s=s.trim(),n)||s,r=r.substring(0,i)+s}e[o]=r&&r.lastIndexOf(";")===r.length-1?r.slice(0,-1):r||""}return e.join(";")}function fo(t,e){var n={},r={},i=e&&e.__cssBuild;return yi(e,(function(e){!function(t,e,n,r){if(e.B||lo(e),e.B.L){var i=Ai(t);t=i.is,i=i.X,i=t?ji(t,i):"html";var o=e.parsedSelector,s=":host > *"===o||"html"===o,a=0===o.indexOf(":host")&&!s;"shady"===n&&(a=!(s=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(s=":host > *"===o||"html"===o,a=a&&!s),(s||a)&&(n=i,a&&(e.F||(e.F=Pi(no,e,no.b,t?Ji+t:"",i)),n=e.F||i),r({ra:n,Wa:a,xb:s}))}}(t,e,i,(function(i){so.call(t.lb||t,i.ra)&&(i.Wa?uo(e,n):uo(e,r))}))}),null,!0),{$a:r,Ua:n}}function _o(t,e,n,r){var i=Ai(e),o=ji(i.is,i.X),s=new RegExp("(?:^|[^.#[:])"+(e.extends?"\\"+o.slice(0,-1)+"\\]":o)+"($|[.:[\\s>+~])"),a=function(t,e){t=t.b;var n={};if(!si&&t)for(var r=0,i=t[r];r<t.length;i=t[++r]){var o=i,s=e;o.f=new RegExp("\\b"+o.keyframesName+"(?!\\B|-)","g"),o.a=o.keyframesName+"-"+s,o.F=o.F||o.selector,o.selector=o.F.replace(o.keyframesName,o.a),n[i.keyframesName]=mo(i)}return n}(i=io(e).M,r);return Ri(e,i,(function(e){var i="";if(e.B||lo(e),e.B.cssText&&(i=ho(t,e.B.cssText,n)),e.cssText=i,!si&&!vi(e)&&e.cssText){var c=i=e.cssText;if(null==e.ya&&(e.ya=hi.test(i)),e.ya)if(null==e.ea)for(var l in e.ea=[],a)i!==(c=(c=a[l])(i))&&(i=c,e.ea.push(l));else{for(l=0;l<e.ea.length;++l)i=(c=a[e.ea[l]])(i);c=i}e.cssText=c,e.F=e.F||e.selector,i="."+r,c=0;for(var u,p=(l=Si(e.F)).length;c<p&&(u=l[c]);c++)l[c]=u.match(s)?u.replace(o,i):i+" "+u;e.selector=l.join(",")}}))}function mo(t){return function(e){return e.replace(t.f,t.a)}}function go(t,e){var n=vo,r=gi(t);t.textContent=mi(r,(function(t){var r=t.cssText=t.parsedCssText;t.B&&t.B.cssText&&(r=r.replace(ti,"").replace(ei,""),t.cssText=ho(n,r,e))}))}i.Object.defineProperties(co.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var vo=new co,yo={},bo=window.customElements;if(bo&&!si){var wo=bo.define;bo.define=function(t,e,n){yo[t]||(yo[t]=Ei(t)),wo.call(bo,t,e,n)}}function Eo(){this.cache={}}function Oo(){}function xo(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o=i.getRootNode(),s=i,a=[];if(s.classList?a=Array.from(s.classList):s instanceof window.SVGElement&&s.hasAttribute("class")&&(a=s.getAttribute("class").split(/\s+/)),a=(s=a).indexOf(no.a),(s=-1<a?s[a+1]:"")&&o===i.ownerDocument)Ii(i,s);else if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(o=o.host))for((o=Ai(o).is)!==s&&Li(i,s,o),i=window.ShadyDOM.nativeMethods.querySelectorAll.call(i,":not(."+no.a+")"),o=0;o<i.length;o++)(a=(s=i[o]).getRootNode().host)&&ki(s,a=Ai(a).is)}}}}if(Eo.prototype.store=function(t,e,n,r){var i=this.cache[t]||[];i.push({L:e,styleElement:n,I:r}),100<i.length&&i.shift(),this.cache[t]=i},Eo.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i,o=t[r];t:{for(i=0;i<n.length;i++){var s=n[i];if(o.L[s]!==e[s]){i=!1;break t}}i=!0}if(i)return o}},!si){var To=new MutationObserver(xo),Ao=function(t){To.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Ao(document);else{var So=function(){Ao(document.body)};window.HTMLImports?window.HTMLImports.whenReady(So):requestAnimationFrame((function(){if("loading"===document.readyState){var t=function(){So(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else So()}))}Oo=function(){xo(To.takeRecords())}}var No=Oo,Co={},ko=Promise.resolve();function Lo(t){(t=Co[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Io(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}var Ro=new Eo;function jo(){this.G={},this.c=document.documentElement;var t=new Wr;t.rules=[],this.f=oo(this.c,new ro(t)),this.m=!1,this.b=this.a=null}function Po(t){!t.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(t.a=window.ShadyCSS.ApplyShim,t.a.invalidCallback=Lo),function(t){!t.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(t.b=window.ShadyCSS.CustomStyleInterface,t.b.transformCallback=function(e){t.Ba(e)},t.b.validateCallback=function(){requestAnimationFrame((function(){(t.b.enqueued||t.m)&&t.flushCustomStyles()}))})}(t)}function Mo(t,e){return(e=e.getRootNode().host)?io(e)?e:Mo(t,e):t.c}function Do(t,e,n){var r=io(t=Mo(t,e));t=Object.create(r.O||null);var i=fo(e,n.M);for(var o in e=function(t,e){var n={},r=[];return yi(t,(function(t){t.B||lo(t);var i=t.F||t.parsedSelector;e&&t.B.L&&i&&so.call(e,i)&&(uo(t,n),t=t.index,i=parseInt(t/32,10),r[i]=(r[i]||0)|1<<t%32)}),null,!0),{L:n,key:r}}(r.M,e).L,Object.assign(t,i.Ua,e,i.$a),e=n.T)((i=e[o])||0===i)&&(t[o]=i);for(o=vo,e=Object.getOwnPropertyNames(t),i=0;i<e.length;i++)t[r=e[i]]=po(o,t[r],t);n.O=t}(n=jo.prototype).flush=function(){No()},n.Sa=function(t){return gi(t)},n.bb=function(t){return mi(t)},n.prepareTemplate=function(t,e,n){this.prepareTemplateDom(t,e),this.prepareTemplateStyles(t,e,n)},n.prepareTemplateStyles=function(t,e,n){if(!t.m){si||yo[e]||(yo[e]=Ei(e)),t.m=!0,t.name=e,t.extends=n,Co[e]=t;for(var r=(r=t.content.querySelector("style"))&&r.getAttribute("css-build")||"",i=[],o=t.content.querySelectorAll("style"),s=0;s<o.length;s++){var a=o[s];if(a.hasAttribute("shady-unscoped")){if(!si){var c=a.textContent;_i.has(c)||(_i.add(c),c=a.cloneNode(!0),document.head.appendChild(c)),a.parentNode.removeChild(a)}}else i.push(a.textContent),a.parentNode.removeChild(a)}i=i.join("").trim(),n={is:e,extends:n,ib:r},Po(this),o=ui.test(i)||li.test(i),ui.lastIndex=0,li.lastIndex=0,i=Vr(i),o&&ci&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.G=r,r=[],ci||(r=function(t){var e={},n=[],r=0;for(var i in yi(t,(function(t){lo(t),t.index=r++,t=t.B.cssText;for(var n;n=pi.exec(t);){var i=n[1];":"!==n[2]&&(e[i]=!0)}}),(function(t){n.push(t)})),t.b=n,t=[],e)t.push(i);return t}(t._styleAst)),r.length&&!ci||(i=si?t.content:null,e=yo[e]||null,e=(o=Ri(n,t._styleAst)).length?bi(o,n.is,i,e):void 0,t.a=e),t.f=r}},n.prepareTemplateDom=function(t,e){si||t.c||(t.c=!0,function(t,e){var n=no;t.__styleScoped?t.__styleScoped=null:Ci(n,t,(function(t){ki(t,e||"")}))}(t.content,e))},n.flushCustomStyles=function(){if(Po(this),this.b){var t=this.b.processStyles();if(this.b.enqueued){if(ci)for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);if(n&&ci&&this.a){var r=gi(n);Po(this),this.a.transformRules(r),n.textContent=mi(r)}}else for(Do(this,this.c,this.f),e=0;e<t.length;e++)(n=this.b.getStyleForCustomStyle(t[e]))&&go(n,this.f.O);this.b.enqueued=!1,this.m&&!ci&&this.styleDocument()}}},n.styleElement=function(t,e){var n=Ai(t).is,r=io(t);if(!r){var i=Ai(t);r=i.is,i=i.X;var o=yo[r]||null;if(r=Co[r])var s=r._styleAst,a=r.f;s=new ro(s,o,a,i),r&&oo(t,s),r=s}if(t!==this.c&&(this.m=!0),e&&(r.T=r.T||{},Object.assign(r.T,e)),ci){if(r.T)for(var c in e=r.T)null===c?t.style.removeProperty(c):t.style.setProperty(c,e[c]);((c=Co[n])||t===this.c)&&c&&c.a&&!Io(c)&&((Io(c)||c._applyShimValidatingVersion!==c._applyShimNextVersion)&&(Po(this),this.a&&this.a.transformRules(c._styleAst,n),c.a.textContent=Ri(t,r.M),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,ko.then((function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1})))}(c)),si&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Ri(t,r.M)),r.M=c._styleAst)}else if(this.flush(),Do(this,t,r),r.pa&&r.pa.length){n=r,c=Ai(t).is,r=(e=Ro.fetch(c,n.O,n.pa))?e.styleElement:null,s=n.I,(a=e&&e.I)||(a=c+"-"+(a=this.G[c]=(this.G[c]||0)+1)),n.I=a,a=n.I,i=vo,i=r?r.textContent||"":_o(i,t,n.O,a);var l=(o=io(t)).a;l&&!si&&l!==r&&(l._useCount--,0>=l._useCount&&l.parentNode&&l.parentNode.removeChild(l)),si?o.a?(o.a.textContent=i,r=o.a):i&&(r=bi(i,a,t.shadowRoot,o.b)):r?r.parentNode||(ao&&-1<i.indexOf("@media")&&(r.textContent=i),Oi(r,null,o.b)):i&&(r=bi(i,a,null,o.b)),r&&(r._useCount=r._useCount||0,o.a!=r&&r._useCount++,o.a=r),a=r,si||(r=n.I,o=i=t.getAttribute("class")||"",s&&(o=i.replace(new RegExp("\\s*x-scope\\s*"+s+"\\s*","g")," ")),i!==(o+=(o?" ":"")+"x-scope "+r)&&Ti(t,o)),e||Ro.store(c,n.O,a,n.I)}},n.styleDocument=function(t){this.styleSubtree(this.c,t)},n.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||t===this.c)&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},n.Ba=function(t){var e=this,n=gi(t);yi(n,(function(t){if(si)Ui(t);else{var n=no;t.selector=t.parsedSelector,Ui(t),t.selector=t.F=Pi(n,t,n.c,void 0,void 0)}ci&&(Po(e),e.a&&e.a.transformRule(t))})),ci?t.textContent=mi(n):this.f.M.rules.push(n)},n.getComputedStyleValue=function(t,e){var n;return ci||(n=(io(t)||io(Mo(this,t))).O[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},n.ab=function(t,e){var n=t.getRootNode();if(e=e?e.split(/\s/):[],!(n=n.host&&n.host.localName)){var r=t.getAttribute("class");if(r){r=r.split(/\s/);for(var i=0;i<r.length;i++)if(r[i]===no.a){n=r[i+1];break}}}n&&e.push(no.a,n),ci||(n=io(t))&&n.I&&e.push(vo.a,n.I),Ti(t,e.join(" "))},n.Na=function(t){return io(t)},jo.prototype.flush=jo.prototype.flush,jo.prototype.prepareTemplate=jo.prototype.prepareTemplate,jo.prototype.styleElement=jo.prototype.styleElement,jo.prototype.styleDocument=jo.prototype.styleDocument,jo.prototype.styleSubtree=jo.prototype.styleSubtree,jo.prototype.getComputedStyleValue=jo.prototype.getComputedStyleValue,jo.prototype.setElementClass=jo.prototype.ab,jo.prototype._styleInfoForNode=jo.prototype.Na,jo.prototype.transformCustomStyleForDocument=jo.prototype.Ba,jo.prototype.getStyleAst=jo.prototype.Sa,jo.prototype.styleAstToString=jo.prototype.bb,jo.prototype.flushCustomStyles=jo.prototype.flushCustomStyles,Object.defineProperties(jo.prototype,{nativeShadow:{get:function(){return si}},nativeCss:{get:function(){return ci}}});var Uo,Fo,Bo=new jo;window.ShadyCSS&&(Uo=window.ShadyCSS.ApplyShim,Fo=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:Bo,prepareTemplate:function(t,e,n){Bo.flushCustomStyles(),Bo.prepareTemplate(t,e,n)},prepareTemplateDom:function(t,e){Bo.prepareTemplateDom(t,e)},prepareTemplateStyles:function(t,e,n){Bo.flushCustomStyles(),Bo.prepareTemplateStyles(t,e,n)},styleSubtree:function(t,e){Bo.flushCustomStyles(),Bo.styleSubtree(t,e)},styleElement:function(t){Bo.flushCustomStyles(),Bo.styleElement(t)},styleDocument:function(t){Bo.flushCustomStyles(),Bo.styleDocument(t)},flushCustomStyles:function(){Bo.flushCustomStyles()},getComputedStyleValue:function(t,e){return Bo.getComputedStyleValue(t,e)},nativeCss:ci,nativeShadow:si},Uo&&(window.ShadyCSS.ApplyShim=Uo),Fo&&(window.ShadyCSS.CustomStyleInterface=Fo),function(t){function e(t){return""==t&&(o.call(this),this.i=!0),t.toLowerCase()}function n(t){var e=t.charCodeAt(0);return 32<e&&127>e&&-1==[34,35,60,62,63,96].indexOf(e)?t:encodeURIComponent(t)}function r(t){var e=t.charCodeAt(0);return 32<e&&127>e&&-1==[34,35,60,62,96].indexOf(e)?t:encodeURIComponent(t)}function i(t,i,s){function a(t){g.push(t)}var c=i||"scheme start",d=0,f="",_=!1,m=!1,g=[];t:for(;(null!=t[d-1]||0==d)&&!this.i;){var v=t[d];switch(c){case"scheme start":if(!v||!p.test(v)){if(i){a("Invalid scheme.");break t}f="",c="no scheme";continue}f+=v.toLowerCase(),c="scheme";break;case"scheme":if(v&&h.test(v))f+=v.toLowerCase();else{if(":"!=v){if(i){null!=v&&a("Code point not allowed in scheme: "+v);break t}f="",d=0,c="no scheme";continue}if(this.h=f,f="",i)break t;void 0!==l[this.h]&&(this.D=!0),c="file"==this.h?"relative":this.D&&s&&s.h==this.h?"relative or authority":this.D?"authority first slash":"scheme data"}break;case"scheme data":"?"==v?(this.u="?",c="query"):"#"==v?(this.C="#",c="fragment"):null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.na+=n(v));break;case"no scheme":if(s&&void 0!==l[s.h]){c="relative";continue}a("Missing scheme."),o.call(this),this.i=!0;break;case"relative or authority":if("/"!=v||"/"!=t[d+1]){a("Expected /, got: "+v),c="relative";continue}c="authority ignore slashes";break;case"relative":if(this.D=!0,"file"!=this.h&&(this.h=s.h),null==v){this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u=s.u,this.v=s.v,this.g=s.g;break t}if("/"==v||"\\"==v)"\\"==v&&a("\\ is an invalid code point."),c="relative slash";else if("?"==v)this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u="?",this.v=s.v,this.g=s.g,c="query";else{if("#"!=v){c=t[d+1];var y=t[d+2];("file"!=this.h||!p.test(v)||":"!=c&&"|"!=c||null!=y&&"/"!=y&&"\\"!=y&&"?"!=y&&"#"!=y)&&(this.j=s.j,this.s=s.s,this.v=s.v,this.g=s.g,this.l=s.l.slice(),this.l.pop()),c="relative path";continue}this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u=s.u,this.C="#",this.v=s.v,this.g=s.g,c="fragment"}break;case"relative slash":if("/"!=v&&"\\"!=v){"file"!=this.h&&(this.j=s.j,this.s=s.s,this.v=s.v,this.g=s.g),c="relative path";continue}"\\"==v&&a("\\ is an invalid code point."),c="file"==this.h?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=v){a("Expected '/', got: "+v),c="authority ignore slashes";continue}c="authority second slash";break;case"authority second slash":if(c="authority ignore slashes","/"!=v){a("Expected '/', got: "+v);continue}break;case"authority ignore slashes":if("/"!=v&&"\\"!=v){c="authority";continue}a("Expected authority, got: "+v);break;case"authority":if("@"==v){for(_&&(a("@ already seen."),f+="%40"),_=!0,v=0;v<f.length;v++)"\t"==(y=f[v])||"\n"==y||"\r"==y?a("Invalid whitespace in authority."):":"==y&&null===this.g?this.g="":(y=n(y),null!==this.g?this.g+=y:this.v+=y);f=""}else{if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v){d-=f.length,f="",c="host";continue}f+=v}break;case"file host":if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v){2!=f.length||!p.test(f[0])||":"!=f[1]&&"|"!=f[1]?(0!=f.length&&(this.j=e.call(this,f),f=""),c="relative path start"):c="relative path";continue}"\t"==v||"\n"==v||"\r"==v?a("Invalid whitespace in file host."):f+=v;break;case"host":case"hostname":if(":"!=v||m){if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v){if(this.j=e.call(this,f),f="",c="relative path start",i)break t;continue}"\t"!=v&&"\n"!=v&&"\r"!=v?("["==v?m=!0:"]"==v&&(m=!1),f+=v):a("Invalid code point in host/hostname: "+v)}else if(this.j=e.call(this,f),f="",c="port","hostname"==i)break t;break;case"port":if(/[0-9]/.test(v))f+=v;else{if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v||i){if(""!=f&&((f=parseInt(f,10))!=l[this.h]&&(this.s=f+""),f=""),i)break t;c="relative path start";continue}"\t"==v||"\n"==v||"\r"==v?a("Invalid code point in port: "+v):(o.call(this),this.i=!0)}break;case"relative path start":if("\\"==v&&a("'\\' not allowed in path."),c="relative path","/"!=v&&"\\"!=v)continue;break;case"relative path":null!=v&&"/"!=v&&"\\"!=v&&(i||"?"!=v&&"#"!=v)?"\t"!=v&&"\n"!=v&&"\r"!=v&&(f+=n(v)):("\\"==v&&a("\\ not allowed in relative path."),(y=u[f.toLowerCase()])&&(f=y),".."==f?(this.l.pop(),"/"!=v&&"\\"!=v&&this.l.push("")):"."==f&&"/"!=v&&"\\"!=v?this.l.push(""):"."!=f&&("file"==this.h&&0==this.l.length&&2==f.length&&p.test(f[0])&&"|"==f[1]&&(f=f[0]+":"),this.l.push(f)),f="","?"==v?(this.u="?",c="query"):"#"==v&&(this.C="#",c="fragment"));break;case"query":i||"#"!=v?null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.u+=r(v)):(this.C="#",c="fragment");break;case"fragment":null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.C+=v)}d++}}function o(){this.v=this.na=this.h="",this.g=null,this.s=this.j="",this.l=[],this.C=this.u="",this.D=this.i=!1}function s(t,e){void 0===e||e instanceof s||(e=new s(String(e))),this.Oa=t,o.call(this),t=t.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,""),i.call(this,t,null,e)}var a=!1;if(!t.rb)try{var c=new URL("b","http://a");c.pathname="c%20d",a="http://a/c%20d"===c.href}catch(t){}if(!a){var l=Object.create(null);l.ftp=21,l.file=0,l.gopher=70,l.http=80,l.https=443,l.ws=80,l.wss=443;var u=Object.create(null);u["%2e"]=".",u[".%2e"]="..",u["%2e."]="..",u["%2e%2e"]="..";var p=/[a-zA-Z]/,h=/[a-zA-Z0-9\+\-\.]/;s.prototype={toString:function(){return this.href},get href(){if(this.i)return this.Oa;var t="";return""==this.v&&null==this.g||(t=this.v+(null!=this.g?":"+this.g:"")+"@"),this.protocol+(this.D?"//"+t+this.host:"")+this.pathname+this.u+this.C},set href(t){o.call(this),i.call(this,t)},get protocol(){return this.h+":"},set protocol(t){this.i||i.call(this,t+":","scheme start")},get host(){return this.i?"":this.s?this.j+":"+this.s:this.j},set host(t){!this.i&&this.D&&i.call(this,t,"host")},get hostname(){return this.j},set hostname(t){!this.i&&this.D&&i.call(this,t,"hostname")},get port(){return this.s},set port(t){!this.i&&this.D&&i.call(this,t,"port")},get pathname(){return this.i?"":this.D?"/"+this.l.join("/"):this.na},set pathname(t){!this.i&&this.D&&(this.l=[],i.call(this,t,"relative path start"))},get search(){return this.i||!this.u||"?"==this.u?"":this.u},set search(t){!this.i&&this.D&&(this.u="?","?"==t[0]&&(t=t.slice(1)),i.call(this,t,"query"))},get hash(){return this.i||!this.C||"#"==this.C?"":this.C},set hash(t){this.i||(this.C="#","#"==t[0]&&(t=t.slice(1)),i.call(this,t,"fragment"))},get origin(){var t;if(this.i||!this.h)return"";switch(this.h){case"data":case"file":case"javascript":case"mailto":return"null"}return(t=this.host)?this.h+"://"+t:""}};var d=t.URL;d&&(s.createObjectURL=function(t){return d.createObjectURL.apply(d,arguments)},s.revokeObjectURL=function(t){d.revokeObjectURL(t)}),t.URL=s}}(window),Object.getOwnPropertyDescriptor(Node.prototype,"baseURI")||Object.defineProperty(Node.prototype,"baseURI",{get:function(){var t=(this.ownerDocument||this).querySelector("base[href]");return t&&t.href||window.location.href},configurable:!0,enumerable:!0});var zo=document.createElement("style");zo.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var Ho=document.querySelector("head");Ho.insertBefore(zo,Ho.firstChild);var qo=window.customElements,Wo=!1,Vo=null;function $o(){window.HTMLTemplateElement.bootstrap&&window.HTMLTemplateElement.bootstrap(window.document),Vo&&Vo(),Wo=!0,window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}qo.polyfillWrapFlushCallback&&qo.polyfillWrapFlushCallback((function(t){Vo=t,Wo&&t()})),"complete"!==document.readyState?(window.addEventListener("load",$o),window.addEventListener("DOMContentLoaded",(function(){window.removeEventListener("load",$o),$o()}))):$o()}).call(this)}).call(this,n(20),n(222).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(223),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,s,a,c=1,l={},u=!1,p=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){f(t.data)},r=function(t){o.port2.postMessage(t)}):p&&"onreadystatechange"in p.createElement("script")?(i=p.documentElement,r=function(t){var e=p.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return l[c]=i,r(c),c++},h.clearImmediate=d}function d(t){delete l[t]}function f(t){if(u)setTimeout(f,0,t);else{var e=l[t];if(e){u=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{d(t),u=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(20),n(224))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,l=[],u=!1,p=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):p=-1,l.length&&d())}function d(){if(!u){var t=a(h);u=!0;for(var e=l.length;e;){for(c=l,l=[];++p<e;)c&&c[p].run();p=-1,e=l.length}c=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function _(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new f(t,e)),1!==l.length||u||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){n(64)("flatMap")},,,,,,,function(t,e,n){"use strict";n.r(e);const r=new WeakMap,i=t=>(...e)=>{const n=t(...e);return r.set(n,!0),n},o=t=>"function"==typeof t&&r.has(t),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,a=(t,e,n=null,r=null)=>{for(;e!==n;){const n=e.nextSibling;t.insertBefore(e,r),e=n}},c=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},l={},u={},p=`{{lit-${String(Math.random()).slice(2)}}}`,h=`\x3c!--${p}--\x3e`,d=new RegExp(`${p}|${h}`),f="$lit$";class _{constructor(t,e){this.parts=[],this.element=e;const n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1);let o=0,s=-1,a=0;const{strings:c,values:{length:l}}=t;for(;a<l;){const t=i.nextNode();if(null!==t){if(s++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:n}=e;let r=0;for(let t=0;t<n;t++)m(e[t].name,f)&&r++;for(;r-- >0;){const e=c[a],n=y.exec(e)[2],r=n.toLowerCase()+f,i=t.getAttribute(r);t.removeAttribute(r);const o=i.split(d);this.parts.push({type:"attribute",index:s,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===t.tagName&&(r.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(p)>=0){const r=t.parentNode,i=e.split(d),o=i.length-1;for(let e=0;e<o;e++){let n,o=i[e];if(""===o)n=v();else{const t=y.exec(o);null!==t&&m(t[2],f)&&(o=o.slice(0,t.index)+t[1]+t[2].slice(0,-f.length)+t[3]),n=document.createTextNode(o)}r.insertBefore(n,t),this.parts.push({type:"node",index:++s})}""===i[o]?(r.insertBefore(v(),t),n.push(t)):t.data=i[o],a+=o}}else if(8===t.nodeType)if(t.data===p){const e=t.parentNode;null!==t.previousSibling&&s!==o||(s++,e.insertBefore(v(),t)),o=s,this.parts.push({type:"node",index:s}),null===t.nextSibling?t.data="":(n.push(t),s--),a++}else{let e=-1;for(;-1!==(e=t.data.indexOf(p,e+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=r.pop()}for(const t of n)t.parentNode.removeChild(t)}}const m=(t,e)=>{const n=t.length-e.length;return n>=0&&t.slice(n)===e},g=t=>-1!==t.index,v=()=>document.createComment(""),y=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class b{constructor(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this.__parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],n=this.template.parts,r=document.createTreeWalker(t,133,null,!1);let i,o=0,a=0,c=r.nextNode();for(;o<n.length;)if(i=n[o],g(i)){for(;a<i.index;)a++,"TEMPLATE"===c.nodeName&&(e.push(c),r.currentNode=c.content),null===(c=r.nextNode())&&(r.currentNode=e.pop(),c=r.nextNode());if("node"===i.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(c.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(c,i.name,i.strings,this.options));o++}else this.__parts.push(void 0),o++;return s&&(document.adoptNode(t),customElements.upgrade(t)),t}}const w=` ${p} `;class E{constructor(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let r=0;r<t;r++){const t=this.strings[r],i=t.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===t.indexOf("--\x3e",i+1);const o=y.exec(t);e+=null===o?t+(n?w:h):t.substr(0,o.index)+o[1]+o[2]+f+o[3]+p}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}class O extends E{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),e=t.content,n=e.firstChild;return e.removeChild(n),a(e,n.firstChild),t}}const x=t=>null===t||!("object"==typeof t||"function"==typeof t),T=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class A{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;t<n.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new S(this)}_getValue(){const t=this.strings,e=t.length-1;let n="";for(let r=0;r<e;r++){n+=t[r];const e=this.parts[r];if(void 0!==e){const t=e.value;if(x(t)||!T(t))n+="string"==typeof t?t:String(t);else for(const e of t)n+="string"==typeof e?e:String(e)}}return n+=t[e],n}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class S{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===l||x(t)&&t===this.value||(this.value=t,o(t)||(this.committer.dirty=!0))}commit(){for(;o(this.value);){const t=this.value;this.value=l,t(this)}this.value!==l&&this.committer.commit()}}class N{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(v()),this.endNode=t.appendChild(v())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=v()),t.__insert(this.endNode=v())}insertAfterPart(t){t.__insert(this.startNode=v()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){for(;o(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=l,t(this)}const t=this.__pendingValue;t!==l&&(x(t)?t!==this.value&&this.__commitText(t):t instanceof E?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):T(t)?this.__commitIterable(t):t===u?(this.value=u,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof b&&this.value.template===e)this.value.update(t.values);else{const n=new b(e,t.processor,this.options),r=n._clone();n.update(t.values),this.__commitNode(r),this.value=n}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let n,r=0;for(const i of t)n=e[r],void 0===n&&(n=new N(this.options),e.push(n),0===r?n.appendIntoPart(this):n.insertAfterPart(e[r-1])),n.setValue(i),n.commit(),r++;r<e.length&&(e.length=r,this.clear(n&&n.endNode))}clear(t=this.startNode){c(this.startNode.parentNode,t.nextSibling,this.endNode)}}class C{constructor(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}setValue(t){this.__pendingValue=t}commit(){for(;o(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=l,t(this)}if(this.__pendingValue===l)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=l}}class k extends A{constructor(t,e,n){super(t,e,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new L(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class L extends S{}let I=!1;try{const t={get capture(){return I=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}class R{constructor(t,e,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;o(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=l,t(this)}if(this.__pendingValue===l)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),r=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=j(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=l}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const j=t=>t&&(I?{capture:t.capture,passive:t.passive,once:t.once}:t.capture);class P{handleAttributeExpressions(t,e,n,r){const i=e[0];if("."===i){return new k(t,e.slice(1),n).parts}return"@"===i?[new R(t,e.slice(1),r.eventContext)]:"?"===i?[new C(t,e.slice(1),n)]:new A(t,e,n).parts}handleTextExpression(t){return new N(t)}}const M=new P;function D(t){let e=U.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},U.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const r=t.strings.join(p);return n=e.keyString.get(r),void 0===n&&(n=new _(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}const U=new Map,F=new WeakMap,B=(t,e,n)=>{let r=F.get(e);void 0===r&&(c(e,e.firstChild),F.set(e,r=new N(Object.assign({templateFactory:D},n))),r.appendInto(e)),r.setValue(t),r.commit()};n.d(e,"html",(function(){return z})),n.d(e,"svg",(function(){return H})),n.d(e,"DefaultTemplateProcessor",(function(){return P})),n.d(e,"defaultTemplateProcessor",(function(){return M})),n.d(e,"directive",(function(){return i})),n.d(e,"isDirective",(function(){return o})),n.d(e,"removeNodes",(function(){return c})),n.d(e,"reparentNodes",(function(){return a})),n.d(e,"noChange",(function(){return l})),n.d(e,"nothing",(function(){return u})),n.d(e,"AttributeCommitter",(function(){return A})),n.d(e,"AttributePart",(function(){return S})),n.d(e,"BooleanAttributePart",(function(){return C})),n.d(e,"EventPart",(function(){return R})),n.d(e,"isIterable",(function(){return T})),n.d(e,"isPrimitive",(function(){return x})),n.d(e,"NodePart",(function(){return N})),n.d(e,"PropertyCommitter",(function(){return k})),n.d(e,"PropertyPart",(function(){return L})),n.d(e,"parts",(function(){return F})),n.d(e,"render",(function(){return B})),n.d(e,"templateCaches",(function(){return U})),n.d(e,"templateFactory",(function(){return D})),n.d(e,"TemplateInstance",(function(){return b})),n.d(e,"SVGTemplateResult",(function(){return O})),n.d(e,"TemplateResult",(function(){return E})),n.d(e,"createMarker",(function(){return v})),n.d(e,"isTemplatePartActive",(function(){return g})),n.d(e,"Template",(function(){return _})),(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const z=(t,...e)=>new E(t,e,"html",M),H=(t,...e)=>new O(t,e,"svg",M)},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"CONFIG_ALIASES",(function(){return i})),n.d(r,"CONFIG_VALID_KEYS",(function(){return o})),n.d(r,"SORT_ORDERS",(function(){return c})),n.d(r,"SORT_ORDER_IDS",(function(){return l})),n.d(r,"TYPE_AGGREGATES",(function(){return u})),n.d(r,"FILTER_OPERATORS",(function(){return p})),n.d(r,"COLUMN_SEPARATOR_STRING",(function(){return m})),n.d(r,"TYPE_FILTERS",(function(){return g}));n(56),n(13);const i={row_pivot:"row_pivots","row-pivot":"row_pivots","row-pivots":"row_pivots",col_pivot:"column_pivots",col_pivots:"column_pivots",column_pivot:"column_pivots","column-pivot":"column_pivots","column-pivots":"column_pivots",filters:"filter",sorts:"sort"},o=["viewport","row_pivots","column_pivots","aggregates","columns","filter","sort","computed_columns","row_pivot_depth","filter_op"],s=["any","avg","count","distinct count","dominant","first by index","last by index","last","high","low","mean","median","pct sum parent","pct sum grand total","sum","sum abs","sum not null","unique"],a=["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","unique"],c=["none","asc","desc","col asc","col desc","asc abs","desc abs","col asc abs","col desc abs"],l=[2,0,1,0,1,3,4,3,4],u={string:a,float:s,integer:s,boolean:["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","unique","and","or"],datetime:a,date:a},p={lessThan:"<",greaterThan:">",equals:"==",lessThanOrEquals:"<=",greaterThanOrEquals:">=",doesNotEqual:"!=",isNull:"is null",isNotNull:"is not null",isIn:"in",isNotIn:"not in",contains:"contains",bitwiseAnd:"&",bitwiseOr:"|",and:"and",or:"or",beginsWith:"begins with",endsWith:"ends with"},h=[p.bitwiseAnd,p.bitwiseOr,p.equals,p.doesNotEqual,p.or,p.and,p.isNull,p.isNotNull],d=[p.lessThan,p.greaterThan,p.equals,p.lessThanOrEquals,p.greaterThanOrEquals,p.doesNotEqual,p.isNull,p.isNotNull],f=[p.equals,p.contains,p.doesNotEqual,p.isIn,p.isNotIn,p.beginsWith,p.endsWith,p.isNull,p.isNotNull],_=[p.lessThan,p.greaterThan,p.equals,p.lessThanOrEquals,p.greaterThanOrEquals,p.doesNotEqual,p.isNull,p.isNotNull],m="|",g={string:f,float:d,integer:d,boolean:h,datetime:_,date:_};var v=n(19),y=n(46),b=n(98),w=n.n(b),E=n(47),O=n.n(E);const{WebSocketClient:x}=n(121),T=new class{_fetch(t){return new Promise(e=>{let n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{e(n.response)},n.send(null)})}worker(){return w()()}async wasm(){return O.a instanceof ArrayBuffer?(console.warn('Perspective has been compiled in INLINE mode. While Perspective\'s runtime performance is not affected, you may see smaller assets size and faster engine initial load time using "@finos/perspective-webpack-plugin" to build your application.\n\nhttps://perspective.finos.org/docs/md/installation.html#-an-important-note-about-hosting'),this._wasm=O.a):this._wasm=await this._fetch(O.a),this._wasm}};class A extends y.a{constructor(t){t&&Object(v.override_config)(t),super(),this.register()}async register(){let t;const e={cmd:"init",config:Object(v.get_config)()};if("undefined"==typeof WebAssembly)throw new Error("WebAssembly not supported. Support for ASM.JS has been removed as of 0.3.1.");for(var n in[t,e.buffer]=await Promise.all([T.worker(),T.wasm()]),this._worker)t[n]=this._worker[n];this._worker=t,this._worker.addEventListener("message",this._handle.bind(this)),this._worker.postMessage(e),this._detect_transferable()}send(t){this._worker.transferable&&t.args&&t.args[0]instanceof ArrayBuffer?this._worker.postMessage(t,[t.args[0]]):this._worker.postMessage(t)}terminate(){this._worker.terminate(),this._worker=void 0}_detect_transferable(){var t=new ArrayBuffer(1);this._worker.postMessage(t,[t]),this._worker.transferable=0===t.byteLength,this._worker.transferable?console.log("Transferable support detected"):console.warn("Transferable support not detected")}}const S=function(){let t,e;return{getInstance:function(n){void 0===t&&(t=new A(n));const r=JSON.stringify(n);if(e&&r!==e)throw new Error("Confiuration object for shared_worker() has changed - this is probably a bug in your application.");return e=r,t}}}();document.currentScript&&document.currentScript.hasAttribute("preload")&&S.getInstance();const N={override:t=>T.set(t),worker:t=>new A(t),websocket:(t=window.location.origin.replace("http","ws"))=>new x(new WebSocket(t)),shared_worker:t=>S.getInstance(t)};for(let t of Object.keys(r))N[t]=r[t];e.default=N}])}));
40//# sourceMappingURL=perspective-viewer.js.map
\No newline at end of file