diff --git a/themes/opendk/public/js/main.js b/themes/opendk/public/js/main.js new file mode 100644 index 00000000..3035f1d8 --- /dev/null +++ b/themes/opendk/public/js/main.js @@ -0,0 +1,2 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=440)}([function(e,t,n){"use strict";n.r(t),n.d(t,"getParent",function(){return c}),n.d(t,"closest",function(){return u}),n.d(t,"closestDown",function(){return f}),n.d(t,"isChildOf",function(){return h}),n.d(t,"isChildOfWebComponentTable",function(){return d}),n.d(t,"polymerWrap",function(){return p}),n.d(t,"polymerUnwrap",function(){return m}),n.d(t,"index",function(){return v}),n.d(t,"overlayContainsElement",function(){return g}),n.d(t,"hasClass",function(){return _}),n.d(t,"addClass",function(){return S}),n.d(t,"removeClass",function(){return E}),n.d(t,"removeTextNodes",function(){return C}),n.d(t,"empty",function(){return x}),n.d(t,"HTML_CHARACTERS",function(){return O}),n.d(t,"fastInnerHTML",function(){return T}),n.d(t,"fastInnerText",function(){return A}),n.d(t,"isVisible",function(){return R}),n.d(t,"offset",function(){return M}),n.d(t,"getWindowScrollTop",function(){return P}),n.d(t,"getWindowScrollLeft",function(){return I}),n.d(t,"getScrollTop",function(){return N}),n.d(t,"getScrollLeft",function(){return D}),n.d(t,"getScrollableElement",function(){return j}),n.d(t,"getTrimmingContainer",function(){return L}),n.d(t,"getStyle",function(){return B}),n.d(t,"getComputedStyle",function(){return F}),n.d(t,"outerWidth",function(){return H}),n.d(t,"outerHeight",function(){return U}),n.d(t,"innerHeight",function(){return z}),n.d(t,"innerWidth",function(){return W}),n.d(t,"addEvent",function(){return V}),n.d(t,"removeEvent",function(){return Y}),n.d(t,"getCaretPosition",function(){return q}),n.d(t,"getSelectionEndPosition",function(){return G}),n.d(t,"getSelectionText",function(){return X}),n.d(t,"clearTextSelection",function(){return K}),n.d(t,"setCaretPosition",function(){return Z}),n.d(t,"getScrollbarWidth",function(){return $}),n.d(t,"hasVerticalScrollbar",function(){return J}),n.d(t,"hasHorizontalScrollbar",function(){return Q}),n.d(t,"setOverlayPosition",function(){return ee}),n.d(t,"getCssTransform",function(){return te}),n.d(t,"resetCssTransform",function(){return ne}),n.d(t,"isInput",function(){return re}),n.d(t,"isOutsideInput",function(){return ie}),n.d(t,"selectElementIfAllowed",function(){return oe});n(10),n(11),n(12),n(25),n(32),n(44),n(22),n(7),n(76),n(39),n(6),n(169),n(26),n(50),n(8),n(57),n(75),n(168),n(9);var r,i,o,a=n(45),s=n(37);function l(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,i=e;null!==i;){if(n===t){r=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(n+=1,i=i.parentNode)}return r}function u(e,t,n){for(var r=e;null!==r&&r!==n;){if(r.nodeType===Node.ELEMENT_NODE&&(t.indexOf(r.nodeName)>-1||t.indexOf(r)>-1))return r;r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode}return null}function f(e,t,n){for(var r=[],i=e;i&&(i=u(i,t,n))&&(!n||n.contains(i));)r.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode;var o=r.length;return o?r[o-1]:null}function h(e,t){var n=e.parentNode,r=[];for("string"===typeof t?r=Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function d(e){var t="hot-table",n=!1,r=p(e);function i(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===t.toUpperCase()}for(;null!==r;){if(i(r)){n=!0;break}if(r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n=i(r.host))break;r=r.host}r=r.parentNode}return n}function p(e){return"undefined"!==typeof Polymer&&"function"===typeof wrap?wrap(e):e}function m(e){return"undefined"!==typeof Polymer&&"function"===typeof unwrap?unwrap(e):e}function v(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t}function g(e,t,n){var r=n.parentElement.querySelector(".ht_clone_".concat(e));return r?r.contains(t):null}function y(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}if(Object(s.isClassListSupported)()){var b=function(e){var t=e.createElement("div");return t.classList.add("test","test2"),t.classList.contains("test2")};r=function(e,t){return void 0!==e.classList&&"string"===typeof t&&""!==t&&e.classList.contains(t)},i=function(e,t){var n,r=e.ownerDocument,i=t;if("string"===typeof i&&(i=i.split(" ")),(i=y(i)).length>0)if(b(r))(n=e.classList).add.apply(n,l(i));else for(var o=0;i&&i[o];)e.classList.add(i[o]),o+=1},o=function(e,t){var n,r=t;if("string"===typeof r&&(r=r.split(" ")),(r=y(r)).length>0)if(b)(n=e.classList).remove.apply(n,l(r));else for(var i=0;r&&r[i];)e.classList.remove(r[i]),i+=1}}else{var w=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};r=function(e,t){return void 0!==e.className&&w(t).test(e.className)},i=function(e,t){var n=0,r=e.className,i=t;if("string"===typeof i&&(i=i.split(" ")),""===r)r=i.join(" ");else for(;i&&i[n];)w(i[n]).test(r)||(r+=" ".concat(i[n])),n+=1;e.className=r},o=function(e,t){var n=0,r=e.className,i=t;for("string"===typeof i&&(i=i.split(" "));i&&i[n];)r=r.replace(w(i[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function _(e,t){return r(e,t)}function S(e,t){return i(e,t)}function E(e,t){return o(e,t)}function C(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var n=e.childNodes,r=n.length-1;r>=0;r--)C(n[r],e)}function x(e){for(var t;t=e.lastChild;)e.removeChild(t)}var k,O=/(<(.*)>|&(.*);)/;function T(e,t){O.test(t)?e.innerHTML=t:A(e,t)}function A(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?s.isTextContentSupported?n.textContent=t:n.data=t:(x(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function R(e){for(var t=e.ownerDocument.documentElement,n=e;m(n)!==t;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return R(n.host.impl);if(n.host)return R(n.host);throw new Error("Lost in Web Components world")}return!1}if(n.style&&"none"===n.style.display)return!1;n=n.parentNode}return!0}function M(e){var t,n,r,i,o=e.ownerDocument,a=o.defaultView,l=o.documentElement,c=e;if(Object(s.hasCaptionProblem)()&&c.firstChild&&"CAPTION"===c.firstChild.nodeName)return{top:(i=c.getBoundingClientRect()).top+(a.pageYOffset||l.scrollTop)-(l.clientTop||0),left:i.left+(a.pageXOffset||l.scrollLeft)-(l.clientLeft||0)};for(t=c.offsetLeft,n=c.offsetTop,r=c;(c=c.offsetParent)&&c!==o.body;)t+=c.offsetLeft,n+=c.offsetTop,r=c;return r&&"fixed"===r.style.position&&(t+=a.pageXOffset||l.scrollLeft,n+=a.pageYOffset||l.scrollTop),{left:t,top:n}}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollY;return void 0===t&&(t=e.document.documentElement.scrollTop),t}function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollX;return void 0===t&&(t=e.document.documentElement.scrollLeft),t}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?P(t):e.scrollTop}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?I(t):e.scrollLeft}function j(e){var t=e.ownerDocument,n=t?t.defaultView:void 0;t||(n=(t=e.document?e.document:e).defaultView);for(var r=["auto","scroll"],i=Object(s.isGetComputedStyleSupported)(),o=e.parentNode;o&&o.style&&t.body!==o;){var a=o.style,l=a.overflow,c=a.overflowX,u=a.overflowY;if([l,c,u].includes("scroll"))return o;if(i){var f=n.getComputedStyle(o);if(l=f.overflow,c=f.overflowX,u=f.overflowY,r.includes(l)||r.includes(c)||r.includes(u))return o}if(o.clientHeight<=o.scrollHeight+1&&(r.includes(u)||r.includes(l)))return o;if(o.clientWidth<=o.scrollWidth+1&&(r.includes(c)||r.includes(l)))return o;o=o.parentNode}return n}function L(e){for(var t=e.ownerDocument,n=t.defaultView,r=e.parentNode;r&&r.style&&t.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;var i=F(r,n),o=["scroll","hidden","auto"],a=i.getPropertyValue("overflow"),s=i.getPropertyValue("overflow-y"),l=i.getPropertyValue("overflow-x");if(o.includes(a)||o.includes(s)||o.includes(l))return r;r=r.parentNode}return n}function B(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(e){if(e===n)return"width"===t?"".concat(n.innerWidth,"px"):"height"===t?"".concat(n.innerHeight,"px"):void 0;var r=e.style[t];if(""!==r&&void 0!==r)return r;var i=F(e,n);return""!==i[t]&&void 0!==i[t]?i[t]:void 0}}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function H(e){return e.offsetWidth}function U(e){return Object(s.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function z(e){return e.clientHeight||e.innerHeight}function W(e){return e.clientWidth||e.innerWidth}function V(e,t,n){var r=e.defaultView;r||(r=e.document?e:e.ownerDocument.defaultView),r.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on".concat(t),n)}function Y(e,t,n){var r=e.defaultView;r||(r=e.document?e:e.ownerDocument.defaultView),r.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on".concat(t),n)}function q(e){var t=e.ownerDocument;if(e.selectionStart)return e.selectionStart;if(t.selection){e.focus();var n=t.selection.createRange();if(null===n)return 0;var r=e.createTextRange(),i=r.duplicate();return r.moveToBookmark(n.getBookmark()),i.setEndPoint("EndToStart",r),i.text.length}return 0}function G(e){var t=e.ownerDocument;if(e.selectionEnd)return e.selectionEnd;if(t.selection){var n=t.selection.createRange();return null===n?0:e.createTextRange().text.indexOf(n.text)+n.text.length}return 0}function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,n="";return e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text),n}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():t.selection&&t.selection.empty()}function Z(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(a){var r=e.parentNode,i=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=i}}else if(e.createTextRange){var o=e.createTextRange();o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",t),o.select()}}function $(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===k&&(k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.createElement("div");t.style.height="200px",t.style.width="100%";var n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);var r=t.offsetWidth;n.style.overflow="scroll";var i=t.offsetWidth;return r===i&&(i=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-i}(e)),k}function J(e){return e.offsetWidth!==e.clientWidth}function Q(e){return e.offsetHeight!==e.clientHeight}function ee(e,t,n){Object(a.isIE8)()||Object(a.isIE9)()?(e.style.top=n,e.style.left=t):Object(a.isSafari)()?(e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)"),e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)")):e.style.transform="translate3d(".concat(t,",").concat(n,",0)")}function te(e){var t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function ne(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function re(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function ie(e){return re(e)&&-1===e.className.indexOf("handsontableInput")&&-1===e.className.indexOf("copyPaste")}function oe(e){ie(e.ownerDocument.activeElement)||e.select()}},function(e,t,n){"use strict";n.r(t),n.d(t,"to2dArray",function(){return r}),n.d(t,"extendArray",function(){return i}),n.d(t,"pivot",function(){return o}),n.d(t,"arrayReduce",function(){return a}),n.d(t,"arrayFilter",function(){return s}),n.d(t,"arrayMap",function(){return l}),n.d(t,"arrayEach",function(){return c}),n.d(t,"arraySum",function(){return u}),n.d(t,"arrayMax",function(){return f}),n.d(t,"arrayMin",function(){return h}),n.d(t,"arrayAvg",function(){return d}),n.d(t,"arrayFlatten",function(){return p}),n.d(t,"arrayUnique",function(){return m});n(25),n(32),n(22),n(8);function r(e){for(var t=e.length,n=0;nt?e:t},Array.isArray(e)?e[0]:void 0)}function h(e){return a(e,function(e,t){return e1?t-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),o=(i(t={_touched:!1},r,e),i(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(o,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),o}function w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"CONTEXT_MENU_ITEMS_NAMESPACE",function(){return r}),n.d(t,"CONTEXTMENU_ITEMS_NO_ITEMS",function(){return i}),n.d(t,"CONTEXTMENU_ITEMS_ROW_ABOVE",function(){return o}),n.d(t,"CONTEXTMENU_ITEMS_ROW_BELOW",function(){return a}),n.d(t,"CONTEXTMENU_ITEMS_INSERT_LEFT",function(){return s}),n.d(t,"CONTEXTMENU_ITEMS_INSERT_RIGHT",function(){return l}),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_ROW",function(){return c}),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COLUMN",function(){return u}),n.d(t,"CONTEXTMENU_ITEMS_UNDO",function(){return f}),n.d(t,"CONTEXTMENU_ITEMS_REDO",function(){return h}),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY",function(){return d}),n.d(t,"CONTEXTMENU_ITEMS_CLEAR_COLUMN",function(){return p}),n.d(t,"CONTEXTMENU_ITEMS_COPY",function(){return m}),n.d(t,"CONTEXTMENU_ITEMS_CUT",function(){return v}),n.d(t,"CONTEXTMENU_ITEMS_FREEZE_COLUMN",function(){return g}),n.d(t,"CONTEXTMENU_ITEMS_UNFREEZE_COLUMN",function(){return y}),n.d(t,"CONTEXTMENU_ITEMS_MERGE_CELLS",function(){return b}),n.d(t,"CONTEXTMENU_ITEMS_UNMERGE_CELLS",function(){return w}),n.d(t,"CONTEXTMENU_ITEMS_ADD_COMMENT",function(){return _}),n.d(t,"CONTEXTMENU_ITEMS_EDIT_COMMENT",function(){return S}),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COMMENT",function(){return E}),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY_COMMENT",function(){return C}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT",function(){return x}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_LEFT",function(){return k}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_CENTER",function(){return O}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT",function(){return T}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY",function(){return A}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_TOP",function(){return R}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE",function(){return M}),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM",function(){return P}),n.d(t,"CONTEXTMENU_ITEMS_BORDERS",function(){return I}),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_TOP",function(){return N}),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_RIGHT",function(){return D}),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_BOTTOM",function(){return j}),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_LEFT",function(){return L}),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_BORDERS",function(){return B}),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD",function(){return F}),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD",function(){return H}),n.d(t,"CONTEXTMENU_ITEMS_HIDE_COLUMN",function(){return U}),n.d(t,"CONTEXTMENU_ITEMS_SHOW_COLUMN",function(){return z}),n.d(t,"CONTEXTMENU_ITEMS_HIDE_ROW",function(){return W}),n.d(t,"CONTEXTMENU_ITEMS_SHOW_ROW",function(){return V}),n.d(t,"FILTERS_NAMESPACE",function(){return Y}),n.d(t,"FILTERS_CONDITIONS_NAMESPACE",function(){return q}),n.d(t,"FILTERS_CONDITIONS_NONE",function(){return G}),n.d(t,"FILTERS_CONDITIONS_EMPTY",function(){return X}),n.d(t,"FILTERS_CONDITIONS_NOT_EMPTY",function(){return K}),n.d(t,"FILTERS_CONDITIONS_EQUAL",function(){return Z}),n.d(t,"FILTERS_CONDITIONS_NOT_EQUAL",function(){return $}),n.d(t,"FILTERS_CONDITIONS_BEGINS_WITH",function(){return J}),n.d(t,"FILTERS_CONDITIONS_ENDS_WITH",function(){return Q}),n.d(t,"FILTERS_CONDITIONS_CONTAINS",function(){return ee}),n.d(t,"FILTERS_CONDITIONS_NOT_CONTAIN",function(){return te}),n.d(t,"FILTERS_CONDITIONS_BY_VALUE",function(){return ne}),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN",function(){return re}),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL",function(){return ie}),n.d(t,"FILTERS_CONDITIONS_LESS_THAN",function(){return oe}),n.d(t,"FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL",function(){return ae}),n.d(t,"FILTERS_CONDITIONS_BETWEEN",function(){return se}),n.d(t,"FILTERS_CONDITIONS_NOT_BETWEEN",function(){return le}),n.d(t,"FILTERS_CONDITIONS_AFTER",function(){return ce}),n.d(t,"FILTERS_CONDITIONS_BEFORE",function(){return ue}),n.d(t,"FILTERS_CONDITIONS_TODAY",function(){return fe}),n.d(t,"FILTERS_CONDITIONS_TOMORROW",function(){return he}),n.d(t,"FILTERS_CONDITIONS_YESTERDAY",function(){return de}),n.d(t,"FILTERS_DIVS_FILTER_BY_CONDITION",function(){return pe}),n.d(t,"FILTERS_DIVS_FILTER_BY_VALUE",function(){return me}),n.d(t,"FILTERS_LABELS_CONJUNCTION",function(){return ve}),n.d(t,"FILTERS_LABELS_DISJUNCTION",function(){return ge}),n.d(t,"FILTERS_VALUES_BLANK_CELLS",function(){return ye}),n.d(t,"FILTERS_BUTTONS_SELECT_ALL",function(){return be}),n.d(t,"FILTERS_BUTTONS_CLEAR",function(){return we}),n.d(t,"FILTERS_BUTTONS_OK",function(){return _e}),n.d(t,"FILTERS_BUTTONS_CANCEL",function(){return Se}),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SEARCH",function(){return Ee}),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_VALUE",function(){return Ce}),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE",function(){return xe});var r="ContextMenu:items",i="".concat(r,".noItems"),o="".concat(r,".insertRowAbove"),a="".concat(r,".insertRowBelow"),s="".concat(r,".insertColumnOnTheLeft"),l="".concat(r,".insertColumnOnTheRight"),c="".concat(r,".removeRow"),u="".concat(r,".removeColumn"),f="".concat(r,".undo"),h="".concat(r,".redo"),d="".concat(r,".readOnly"),p="".concat(r,".clearColumn"),m="".concat(r,".copy"),v="".concat(r,".cut"),g="".concat(r,".freezeColumn"),y="".concat(r,".unfreezeColumn"),b="".concat(r,".mergeCells"),w="".concat(r,".unmergeCells"),_="".concat(r,".addComment"),S="".concat(r,".editComment"),E="".concat(r,".removeComment"),C="".concat(r,".readOnlyComment"),x="".concat(r,".align"),k="".concat(r,".align.left"),O="".concat(r,".align.center"),T="".concat(r,".align.right"),A="".concat(r,".align.justify"),R="".concat(r,".align.top"),M="".concat(r,".align.middle"),P="".concat(r,".align.bottom"),I="".concat(r,".borders"),N="".concat(r,".borders.top"),D="".concat(r,".borders.right"),j="".concat(r,".borders.bottom"),L="".concat(r,".borders.left"),B="".concat(r,".borders.remove"),F="".concat(r,".nestedHeaders.insertChildRow"),H="".concat(r,".nestedHeaders.detachFromParent"),U="".concat(r,".hideColumn"),z="".concat(r,".showColumn"),W="".concat(r,".hideRow"),V="".concat(r,".showRow"),Y="Filters:",q="".concat(Y,"conditions"),G="".concat(q,".none"),X="".concat(q,".isEmpty"),K="".concat(q,".isNotEmpty"),Z="".concat(q,".isEqualTo"),$="".concat(q,".isNotEqualTo"),J="".concat(q,".beginsWith"),Q="".concat(q,".endsWith"),ee="".concat(q,".contains"),te="".concat(q,".doesNotContain"),ne="".concat(q,".byValue"),re="".concat(q,".greaterThan"),ie="".concat(q,".greaterThanOrEqualTo"),oe="".concat(q,".lessThan"),ae="".concat(q,".lessThanOrEqualTo"),se="".concat(q,".isBetween"),le="".concat(q,".isNotBetween"),ce="".concat(q,".after"),ue="".concat(q,".before"),fe="".concat(q,".today"),he="".concat(q,".tomorrow"),de="".concat(q,".yesterday"),pe="".concat(Y,"labels.filterByCondition"),me="".concat(Y,"labels.filterByValue"),ve="".concat(Y,"labels.conjunction"),ge="".concat(Y,"labels.disjunction"),ye="".concat(Y,"values.blankCells"),be="".concat(Y,"buttons.selectAll"),we="".concat(Y,"buttons.clear"),_e="".concat(Y,"buttons.ok"),Se="".concat(Y,"buttons.cancel"),Ee="".concat(Y,"buttons.placeholder.search"),Ce="".concat(Y,"buttons.placeholder.value"),xe="".concat(Y,"buttons.placeholder.secondValue")},function(e,t,n){"use strict";n.r(t),n.d(t,"isNumeric",function(){return i}),n.d(t,"rangeEach",function(){return o}),n.d(t,"rangeEachReverse",function(){return a}),n.d(t,"valueAccordingPercent",function(){return s});n(10),n(11),n(12),n(7),n(6),n(26),n(8),n(57),n(9);function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){var t=r(e);return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&(!!e&&"number"==typeof e.valueOf()&&!(e instanceof Date))}function o(e,t,n){var r=-1;for("function"===typeof t?(n=t,t=e):r=e-1;++r<=t&&!1!==n(r););}function a(e,t,n){var r=e+1;for("function"===typeof t&&(n=t,t=0);--r>=t&&!1!==n(r););}function s(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)}},function(e,t,n){"use strict";n(7),n(6),n(8),n(34),n(9);function r(e,t){for(var n=0;n7&&void 0!==arguments[7]?arguments[7]:function(e){return e};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o.set(this,{viewportWidth:t,scrollOffset:n,totalColumns:r,columnWidthFn:i,overrideFn:a,onlyFullyVisible:s,stretchingColumnWidthFn:c}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=l,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}return i(e,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),i(e,[{key:"calculate",value:function(){for(var e,t=0,n=!0,r=[],i=o.get(this),a=i.onlyFullyVisible,s=i.overrideFn,l=i.scrollOffset,c=i.totalColumns,u=i.viewportWidth,f=0;f=l&&t+e<=l+(l>0?u+1:u)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=f),this.endColumn=f),r.push(t),t+=e,a||(this.endColumn=f),t>=l+u){n=!1;break}}if(this.endColumn===c-1&&n)for(this.startColumn=this.endColumn;this.startColumn>0;){var h=r[this.endColumn]+e-r[this.startColumn-1];if((h<=u||!a)&&(this.startColumn-=1),h>u)break}null!==this.startColumn&&s&&s(this),this.startPosition=r[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}},{key:"refreshStretching",value:function(e){if("none"!==this.stretch){var t=e;this.totalTargetWidth=t;for(var n=o.get(this),r=n.totalColumns,i=0,a=0;a0)this.stretchAllRatio=t/i,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var u=this._getColumnWidth(r-1),f=c+u;this.stretchLastWidth=f>=0?f:u}}}},{key:"getStretchedColumnWidth",value:function(e,t){var n=null;return"all"===this.stretch&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}},{key:"_getStretchedAllColumnWidth",value:function(e,t){var n=0,r=o.get(this),i=r.totalColumns;if(!this.stretchAllColumnsWidth[e]){var a=Math.round(t*this.stretchAllRatio),s=r.stretchingColumnWidthFn(a,e);this.stretchAllColumnsWidth[e]=void 0===s?a:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===i&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var l=0;l=u&&n+t<=u+h-d&&(null===this.startRow&&(this.startRow=p),this.endRow=p),i.push(n),n+=t,a||(this.endRow=p),n>=u+h-d){r=!1;break}if(this.endRow===f-1&&r)for(this.startRow=this.endRow;this.startRow>0;){var m=i[this.endRow]+t-i[this.startRow-1];if((m<=h-d||!a)&&(this.startRow-=1),m>=h-d)break}null!==this.startRow&&s&&s(this),this.startPosition=i[this.startRow],void 0===this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}]),e}();function f(e,t){for(var n=0;n=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}])&&f(t.prototype,n),r&&f(t,r),e}();n(44),n(22),n(50);function d(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.highlight=t,this.from=n,this.to=r}var t,n,r;return t=e,(n=[{key:"setHighlight",value:function(e){return this.highlight=e,this}},{key:"setFrom",value:function(e){return this.from=e,this}},{key:"setTo",value:function(e){return this.to=e,this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row===this.to.row&&this.from.col===this.to.col}},{key:"getHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"includes",value:function(e){var t=e.row,n=e.col,r=this.getTopLeftCorner(),i=this.getBottomRightCorner();return r.row<=t&&i.row>=t&&r.col<=n&&i.col>=n}},{key:"includesRange",value:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}},{key:"isEqual",value:function(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}},{key:"overlaps",value:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getTopRightCorner().col>=e.getTopLeftCorner().col&&this.getTopRightCorner().col<=e.getTopRightCorner().col||this.getTopLeftCorner().col<=e.getTopRightCorner().col&&this.getTopLeftCorner().col>=e.getTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getBottomRightCorner().row>=e.getTopRightCorner().row&&this.getBottomRightCorner().row<=e.getBottomRightCorner().row||this.getTopRightCorner().row<=e.getBottomRightCorner().row&&this.getTopRightCorner().row>=e.getTopRightCorner().row}},{key:"expand",value:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(e.rown.row||e.col>n.col)&&(this.from=new h(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new h(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=this.getDirection(),i=e.getTopLeftCorner(),o=e.getBottomRightCorner(),a=Math.min(t.row,i.row),s=Math.min(t.col,i.col),l=Math.max(n.row,o.row),c=Math.max(n.col,o.col),u=new h(a,s),f=new h(l,c);return this.from=u,this.to=f,this.setDirection(r),this.highlight.row===this.getBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}},{key:"setDirection",value:function(e){switch(e){case"NW-SE":var t=[this.getTopLeftCorner(),this.getBottomRightCorner()];this.from=t[0],this.to=t[1];break;case"NE-SW":var n=[this.getTopRightCorner(),this.getBottomLeftCorner()];this.from=n[0],this.to=n[1];break;case"SE-NW":var r=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=r[0],this.to=r[1];break;case"SW-NE":var i=[this.getBottomLeftCorner(),this.getTopRightCorner()];this.from=i[0],this.to=i[1]}}},{key:"getVerticalDirection",value:function(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}},{key:"flipDirectionVertically",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}},{key:"flipDirectionHorizontally",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}},{key:"getTopLeftCorner",value:function(){return new h(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new h(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new h(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new h(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new h(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new h(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new h(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new h(t.to.row,t.to.col))))||(e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner()))}},{key:"getOppositeCorner",value:function(e,t){if(!(e instanceof h))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new h(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new h(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new h(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new h(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var t=Math.min(this.from.row,this.to.row),n=Math.max(this.from.row,this.to.row),r=Math.min(this.from.col,this.to.col),i=Math.max(this.from.col,this.to.col),o=Math.min(e.from.row,e.to.row),a=Math.max(e.from.row,e.to.row),s=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),c=[];return t===o&&c.push("top"),i===l&&c.push("right"),n===a&&c.push("bottom"),r===s&&c.push("left"),c}},{key:"getInner",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],r=e.row;r<=t.row;r++)for(var i=e.col;i<=t.col;i++)this.from.row===r&&this.from.col===i||this.to.row===r&&this.to.col===i||n.push(new h(r,i));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],r=e.row;r<=t.row;r++)for(var i=e.col;i<=t.col;i++)e.row===r&&e.col===i?n.push(e):t.row===r&&t.col===i?n.push(t):n.push(new h(r,i));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=t.row;r<=n.row;r++)for(var i=t.col;i<=n.col;i++){if(!1===e(r,i))return}}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}])&&d(t.prototype,n),r&&d(t,r),e}();function m(e,t){for(var n=0;n1,c=this.scrollableElement===r;for(l||!Object(O.isChrome)()?a.push([this.wot.wtTable.wtRootElement.parentNode,"wheel",function(t){return e.onCloneWheel(t)},{passive:c}]):(this.topOverlay.needFullRender&&a.push([this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)},{passive:c}]),this.bottomOverlay.needFullRender&&a.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)},{passive:c}]),this.leftOverlay.needFullRender&&a.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)},{passive:c}]),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&a.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)},{passive:c}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&a.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)},{passive:c}])),a.push([r,"resize",function(){clearTimeout(s),s=setTimeout(function(){e.wot.getSetting("onWindowResize")},200)}]);a.length;){var u,f=a.pop();(u=this.eventManager).addEventListener.apply(u,P(f)),this.registeredListeners.push(f)}}},{key:"deregisterListeners",value:function(){for(;this.registeredListeners.length;){var e=this.registeredListeners.pop();this.eventManager.removeEventListener(e[0],e[1],e[2])}}},{key:"onTableScroll",value:function(e){var t=this.wot.rootWindow,n=this.leftOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,i=e.target;this.keyPressed&&(r!==t&&i!==t&&!e.target.contains(r)||n!==t&&i!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e){var t=this.wot.rootWindow;this.scrollableElement!==t&&e.preventDefault();var n=this.leftOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,i=e.target,o=r!==t&&i!==t&&!i.contains(r),a=n!==t&&i!==t&&!i.contains(n);this.keyPressed&&(o||a)||this.translateMouseWheelToScroll(e)}},{key:"onKeyDown",value:function(e){this.keyPressed=Object(M.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var t=this.browserLineHeight,n=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,r=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(r+=r*t,n+=n*t),this.scrollVertically(n),this.scrollHorizontally(r)}},{key:"scrollVertically",value:function(e){this.scrollableElement.scrollTop+=e}},{key:"scrollHorizontally",value:function(e){this.scrollableElement.scrollLeft+=e}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var e=this.wot.rootWindow,t=this.topOverlay.clone.wtTable.holder,n=this.leftOverlay.clone.wtTable.holder,r=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],i=r[0],o=r[1];if(this.horizontalScrolling=t.scrollLeft!==i||this.lastScrollX!==e.scrollX,this.verticalScrolling=n.scrollTop!==o||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=i;var a=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;a&&(a.scrollLeft=i)}this.verticalScrolling&&(n.scrollTop=o),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,t=e.scrollLeft,n=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();var e=this.wot,t=e.rootWindow,n=e.wtTable;"hidden"===t.getComputedStyle(n.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=n.holder:this.scrollableElement=Object(b.getScrollableElement)(n.TABLE),this.registerListeners()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,r=t.clientHeight;n===this.spreaderLastSize.width&&r===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,this.spreaderLastSize.height=r,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtViewport,r=t.wtTable,i=this.wot.getSetting("totalColumns"),o=this.wot.getSetting("totalRows"),a=n.getRowHeaderWidth(),s=n.getColumnHeaderHeight(),l=r.hider.style;if(l.width="".concat(a+this.leftOverlay.sumCellSizes(0,i),"px"),l.height="".concat(s+this.topOverlay.sumCellSizes(0,o)+1,"px"),this.scrollbarSize>0){var c=r.wtRootElement,u=c.scrollHeight,f=c.scrollWidth,h=r.holder,d=h.scrollHeight,p=h.scrollWidth;this.hasScrollbarRight=uf?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&r.hider.scrollHeight+this.scrollbarSize>u&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}},{key:"applyToDOM",value:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{key:"getParentOverlay",value:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return Object(_.arrayEach)(t,function(t){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)}),n}}])&&I(t.prototype,n),r&&I(t,r),e}(),D=n(4);function j(e,t){for(var n=0;n=0&&e<=Math.max(a-1,0)&&(e>=i&&(ethis.getLastVisibleColumn()||t)&&(s=o.scrollTo(e,!0))),s}},{key:"scrollViewportVertically",value:function(e,t,n){if(!this.wot.drawn)return!1;var r=this._getVariables(),i=r.fixedRowsBottom,o=r.fixedRowsTop,a=r.topOverlay,s=r.totalRows,l=!1;return e>=0&&e<=Math.max(s-1,0)&&(e>=o&&(ethis.getLastVisibleRow()&&ec){var u=r.getColumnHeaderHeight();Object(D.rangeEach)(1,i,function(e){if(u+=t.sumCellSizes(e-1,e),s.top+u-c>=l)return a=e-2,!1})}}return a}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,i=e.totalColumns,o=this.wot.rootWindow,a=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===o){var s=Object(b.offset)(n.wtRootElement),l=Object(b.innerWidth)(n.hider),c=Object(b.innerWidth)(o),u=Object(b.getScrollLeft)(o,o);if(s.left+l-c<=u){var f=r.getRowHeaderWidth();Object(D.rangeEachReverse)(i,1,function(e){if(f+=t.sumCellSizes(e-1,e),s.left+l-f<=u)return a=e,!1})}}return a}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,i=e.totalColumns,o=this.wot.rootWindow,a=n.getLastVisibleColumn();if(t.mainTableScrollableElement===o){var s=Object(b.offset)(n.wtRootElement),l=Object(b.innerWidth)(o),c=Object(b.getScrollLeft)(o,o);if(s.left>c){var u=r.getRowHeaderWidth();Object(D.rangeEach)(1,i,function(e){if(u+=t.sumCellSizes(e-1,e),s.left+u-c>=l)return a=e-2,!1})}}return a}},{key:"_getVariables",value:function(){var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}}])&&j(t.prototype,n),r&&j(t,r),e}();function B(e,t){for(var n=0;n=0&&(this.adjustAvailableNodes(),a=!0,this.renderColumnHeaders(),this.renderRows(o,r,n),this.wtTable.isWorkingOnClone()||(t=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(n),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),a||this.adjustAvailableNodes(),this.removeRedundantRows(r),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(oe.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(oe.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var s=Object(b.outerWidth)(this.wtTable.hider),l=Object(b.outerWidth)(this.wtTable.TABLE);if(0!==s&&l!==s&&this.adjustColumnWidths(n),t!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var c=this.wtTable.getFirstRenderedColumn(),u=this.wtTable.getLastRenderedColumn(),f=this.wot.getSetting("defaultColumnWidth"),h=this.wot.getSetting("rowHeaderWidth");if(null!==(h=this.instance.getSetting("onModifyRowHeaderWidth",h))&&void 0!==h)for(var d=0;de;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}},{key:"renderRows",value:function(e,t,n){for(var r,i=0,o=this.rowFilter.renderedToSource(i),a=this.wtTable.isWorkingOnClone();o=0&&(!W&&i>1e3&&(W=!0,Object(S.b)(Object(H.a)(U()))),void 0===t||i!==t);){if(r=this.getOrCreateTrForRow(i,r),this.renderRowHeaders(o,r),this.adjustColumns(r,n+this.rowHeaderCount),this.renderCells(o,r,n),a&&!this.wot.isOverlayName(oe.CLONE_BOTTOM)||this.resetOversizedRow(o),r.firstChild){var s=this.wot.wtTable.getRowHeight(o);s?(s-=1,r.firstChild.style.height="".concat(s,"px")):r.firstChild.style.height=""}i+=1,o=this.rowFilter.renderedToSource(i)}}},{key:"resetOversizedRow",value:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,r,i,o=this.instance.wtTable.TBODY.childNodes.length;if(o*this.instance.wtSettings.settings.defaultRowHeight!==Object(b.innerHeight)(this.instance.wtTable.TBODY)-1||this.instance.getSetting("fixedRowsBottom"))for(;o;)o-=1,n=this.instance.wtTable.rowFilter.renderedToSource(o),e=this.instance.wtTable.getRowHeight(n),t=(i=(r=this.instance.wtTable.getTrForRow(n)).querySelector("th"))?Object(b.innerHeight)(i):Object(b.innerHeight)(r)-1,(!e&&this.instance.wtSettings.settings.defaultRowHeight=this.wtTable.tbodyChildrenLength?(n=this.createRow(),this.appendToTbody(n)):n=0===e?this.TBODY.firstChild:t.nextSibling,n.className&&n.removeAttribute("class"),n}},{key:"createRow",value:function(){for(var e=this.wot.rootDocument,t=e.createElement("TR"),n=0;ne+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength-=1;this.rowHeaderCount&&Object(b.addClass)(this.COLGROUP.childNodes[0],"rowHeader")}},{key:"adjustThead",value:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var n=this.wot.rootDocument,r=0,i=this.columnHeaders.length;re+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength-=1}var o=this.THEAD.childNodes.length;if(o>this.columnHeaders.length)for(var a=this.columnHeaders.length;at;)e.removeChild(e.lastChild),r-=1}},{key:"removeRedundantColumns",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}}])&&z(t.prototype,n),r&&z(t,r),e}();function G(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0,u!==this.correctHeaderWidth&&(l=!1)}if(this.isWorkingOnClone()||(s=n.prepareOverlays()),l)this.isWorkingOnClone()||r.createVisibleCalculators(),n&&n.refresh(!0);else{var f,h,d=t.cloneOverlay;this.isWorkingOnClone()?this.tableOffset=t.cloneSource.wtTable.tableOffset:this.tableOffset=Object(b.offset)(this.TABLE),f=oe.isOverlayTypeOf(d,oe.CLONE_DEBUG)||oe.isOverlayTypeOf(d,oe.CLONE_TOP)||oe.isOverlayTypeOf(d,oe.CLONE_TOP_LEFT_CORNER)?0:oe.isOverlayTypeOf(d,oe.CLONE_BOTTOM)||oe.isOverlayTypeOf(d,oe.CLONE_BOTTOM_LEFT_CORNER)?Math.max(i-t.getSetting("fixedRowsBottom"),0):r.rowsRenderCalculator.startRow,h=oe.isOverlayTypeOf(d,oe.CLONE_DEBUG)||oe.isOverlayTypeOf(d,oe.CLONE_LEFT)||oe.isOverlayTypeOf(d,oe.CLONE_TOP_LEFT_CORNER)||oe.isOverlayTypeOf(d,oe.CLONE_BOTTOM_LEFT_CORNER)?0:r.columnsRenderCalculator.startColumn,this.rowFilter=new y(f,i,a),this.columnFilter=new v(h,t.getSetting("totalColumns"),o),this.alignOverlaysWithTrimmingContainer(),this._doDraw()}return this.refreshSelections(l),this.isWorkingOnClone()||(n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&n.bottomOverlay.resetFixedPosition(),n.leftOverlay.resetFixedPosition(),n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition()),s&&n.syncScrollWithMaster(),t.drawn=!0,this}},{key:"_doDraw",value:function(){new q(this).render()}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll(".".concat(e)),n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];if(n)return n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getRowHeader",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=Object(b.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,r=n.parentNode,i=Object(b.index)(n),o=t.cellIndex;if(Object(b.overlayContainsElement)(oe.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||Object(b.overlayContainsElement)(oe.CLONE_TOP,t,this.wtRootElement))"THEAD"===r.nodeName&&(i-=r.childNodes.length);else if(Object(b.overlayContainsElement)(oe.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||Object(b.overlayContainsElement)(oe.CLONE_BOTTOM,t,this.wtRootElement)){i=this.wot.getSetting("totalRows")-r.childNodes.length+i}else i=r===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(i):this.rowFilter.renderedToSource(i);return o=Object(b.overlayContainsElement)(oe.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||Object(b.overlayContainsElement)(oe.CLONE_LEFT,t,this.wtRootElement)||Object(b.overlayContainsElement)(oe.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||Object(b.overlayContainsElement)(oe.CLONE_BOTTOM,t,this.wtRootElement)?this.columnFilter.offsettedTH(o):this.columnFilter.visibleRowHeadedColumnToSourceColumn(o),new h(i,o)}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"getFirstRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.startRow}},{key:"getFirstVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.startRow}},{key:"getFirstRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.startColumn}},{key:"getFirstVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.startColumn}},{key:"getLastRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.endRow}},{key:"getLastVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.endRow}},{key:"getLastRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.endColumn}},{key:"getLastVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.endColumn}},{key:"isRowBeforeRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)<0&&e>=0}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isColumnBeforeRenderedColumns",value:function(e){return this.columnFilter&&this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)<0&&e>=0}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastVisibleColumn()}},{key:"isColumnAfterRenderedColumns",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastRenderedColumn()}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"getRenderedColumnsCount",value:function(){var e=this.wot,t=e.getSetting("totalColumns"),n=e.wtViewport.columnsRenderCalculator.count;if(e.isOverlayName(oe.CLONE_DEBUG))n=t;else if(e.isOverlayName(oe.CLONE_LEFT)||e.isOverlayName(oe.CLONE_TOP_LEFT_CORNER)||e.isOverlayName(oe.CLONE_BOTTOM_LEFT_CORNER))return Math.min(e.getSetting("fixedColumnsLeft"),t);return n}},{key:"getRenderedRowsCount",value:function(){var e=this.wot,t=e.getSetting("totalRows"),n=e.wtViewport.rowsRenderCalculator.count;return e.isOverlayName(oe.CLONE_DEBUG)?n=t:e.isOverlayName(oe.CLONE_TOP)||e.isOverlayName(oe.CLONE_TOP_LEFT_CORNER)?n=Math.min(e.getSetting("fixedRowsTop"),t):(e.isOverlayName(oe.CLONE_BOTTOM)||e.isOverlayName(oe.CLONE_BOTTOM_LEFT_CORNER))&&(n=Math.min(e.getSetting("fixedRowsBottom"),t)),n}},{key:"getVisibleRowsCount",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"getRowHeight",value:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),n=this.wot.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}},{key:"getColumnHeaderHeight",value:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,n=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}},{key:"getVisibleColumnsCount",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getColumnWidth",value:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"===typeof t?t=t(e):"object"===X(t)&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getColumnWidth(e),n=null===t||void 0===t?this.instance.wtSettings.settings.defaultColumnWidth:t,r=this.wot.wtViewport.columnsRenderCalculator;if(r){var i=r.getStretchedColumnWidth(e,n);i&&(n=i)}return n}},{key:"_modifyRowHeaderWidth",value:function(e){var t=Object(x.isFunction)(e)?e():null;return Array.isArray(t)?(t=G(t))[t.length-1]=this._correctRowHeaderWidth(t[t.length-1]):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){var t=e;return"number"!==typeof e&&(t=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}])&&Z(t.prototype,n),r&&Z(t,r),e}();function J(e,t){for(var n=0;n0&&t.clientHeight>0?t.clientHeight:1/0}},{key:"getWorkspaceWidth",value:function(){var e,t,n=this.wot,r=n.rootDocument,i=n.rootWindow,o=this.instance.wtOverlays.leftOverlay.trimmingContainer,a=r.documentElement.offsetWidth,s=n.getSetting("totalColumns"),l=n.getSetting("stretchH");return n.getSetting("preventOverflow")?Object(b.outerWidth)(this.instance.wtTable.wtRootElement):(e=n.getSetting("freezeOverlays")?Math.min(a-this.getWorkspaceOffset().left,a):Math.min(this.getContainerFillWidth(),a-this.getWorkspaceOffset().left,a),o===i&&s>0&&this.sumColumnWidths(0,s-1)>e?r.documentElement.clientWidth:o===i||"scroll"!==(t=Object(b.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow",i))&&"hidden"!==t&&"auto"!==t?"none"!==l&&l?e:Math.max(e,Object(b.outerWidth)(this.instance.wtTable.TABLE)):Math.max(e,o.clientWidth))}},{key:"hasVerticalScroll",value:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(e,t){for(var n=this.wot.wtTable,r=0,i=e;i0&&(e-=t),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var n=0,r=t.length;n0?e-t:e}},{key:"createRowsCalculator",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.wot,o=i.wtSettings,a=i.wtOverlays,s=i.wtTable,l=i.rootDocument;this.rowHeaderWidth=NaN,e=o.settings.renderAllRows&&!r?1/0:this.getViewportHeight();var c=a.topOverlay.getScrollPosition()-a.topOverlay.getTableParentOffset();c<0&&(c=0);var f=i.getSetting("fixedRowsTop"),h=i.getSetting("fixedRowsBottom"),d=i.getSetting("totalRows");return f&&(c+=n=a.topOverlay.sumCellSizes(0,f),e-=n),h&&a.bottomOverlay.clone&&(e-=n=a.bottomOverlay.sumCellSizes(d-h,d)),t=s.holder.clientHeight===s.holder.offsetHeight?0:Object(b.getScrollbarWidth)(l),new u(e,c,i.getSetting("totalRows"),function(e){return s.getRowHeight(e)},r?null:o.settings.viewportRowCalculatorOverride,r,t)}},{key:"createColumnsCalculator",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtSettings,r=t.wtOverlays,i=t.wtTable,o=t.rootDocument,s=this.getViewportWidth(),l=r.leftOverlay.getScrollPosition()-r.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,l<0&&(l=0);var c=t.getSetting("fixedColumnsLeft");if(c){var u=r.leftOverlay.sumCellSizes(0,c);l+=u,s-=u}return i.holder.clientWidth!==i.holder.offsetWidth&&(s-=Object(b.getScrollbarWidth)(o)),new a(s,l,t.getSetting("totalColumns"),function(e){return t.wtTable.getColumnWidth(e)},e?null:n.settings.viewportColumnCalculatorOverride,e,t.getSetting("stretchH"),function(e,n){return t.getSetting("onBeforeStretchingColumnWidth",e,n)})}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){var t=this.createRowsCalculator(!0),n=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(n)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){return!!this.rowsVisibleCalculator&&(!(e.startRow0)&&!(e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow0)&&!(e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||Object(b.isVisible)(this.wtTable.TABLE)?this.wtTable.draw(e):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);var t=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),r=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row=t-r){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col=t-r&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}},{key:"update",value:function(e,t){return this.wtSettings.update(e,t)}},{key:"scrollViewport",value:function(e,t,n,r,i){return this.wtScroll.scrollViewport(e,t,n,r,i)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return this.wtScroll.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return this.wtScroll.scrollViewportVertically(e,t,n)}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"getOverlayName",value:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"}},{key:"isOverlayName",value:function(e){return!!this.cloneOverlay&&this.cloneOverlay.type===e}},{key:"exportSettingsAsClassNames",value:function(){var e=this,t=[],n=[];Object(w.objectEach)({rowHeaders:["array"],columnHeaders:["array"]},function(r,i){r.indexOf("array")>-1&&e.getSetting(i).length&&n.push("ht".concat(Object(C.toUpperCaseFirst)(i))),t.push("ht".concat(Object(C.toUpperCaseFirst)(i)))}),Object(b.removeClass)(this.wtTable.wtRootElement.parentNode,t),Object(b.addClass)(this.wtTable.wtRootElement.parentNode,n)}},{key:"getSetting",value:function(e,t,n,r,i){return this.wtSettings.getSetting(e,t,n,r,i)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}])&&ee(t.prototype,n),r&&ee(t,r),e}();function ne(e,t){for(var n=0;n=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom"),s={left:this.clone.wtTable.spreader.offsetLeft,top:this.clone.wtTable.spreader.offsetTop},l={left:e.offsetLeft,top:e.offsetTop};return r?this.getRelativeCellPositionWithinWindow(o,i,l,s):this.getRelativeCellPositionWithinHolder(o,a,i,l,s)}Object(S.b)("The provided element is not a child of the ".concat(this.type," overlay"))}},{key:"getRelativeCellPositionWithinWindow",value:function(e,t,n,r){var i=this.wot.wtTable.wtRootElement.getBoundingClientRect(),o=0,a=0;(o=t?i.left<=0?-1*i.left:0:r.left,e)?a=this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top:a=r.top;return{left:n.left+o,top:n.top+a}}},{key:"getRelativeCellPositionWithinHolder",value:function(e,t,n,r,i){var o=this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),a=this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition(),s=0,l=0;if(n||(s=o-i.left),t){var c=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+c.top}else e||(l=a-i.top);return{left:r.left-s,top:r.top-l}}},{key:"makeClone",value:function(t){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error('Clone type "'.concat(t,'" is not supported.'));var n=this.wot,r=n.wtTable,i=n.rootDocument,o=n.rootWindow,a=i.createElement("DIV"),s=i.createElement("TABLE");a.className="ht_clone_".concat(t," handsontable"),a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.overflow="hidden",s.className=r.TABLE.className,a.appendChild(s),this.type=t,r.wtRootElement.parentNode.appendChild(a);var l=this.wot.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===e.CLONE_TOP||"vertical"===l&&this.type===e.CLONE_LEFT?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=r.holder:this.mainTableScrollableElement=Object(b.getScrollableElement)(r.TABLE),new te({cloneSource:this.wot,cloneOverlay:this,table:s})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,i=e.parentNode.style;Object(_.arrayEach)([n,r,i],function(e){e.width="",e.height=""})}}},{key:"destroy",value:function(){new E.a(this.clone).destroy()}}]),e}();function ae(e){return(ae="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function se(e,t){return!t||"object"!==ae(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ue=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=se(this,le(t).call(this,e))).clone=n.makeClone(oe.CLONE_DEBUG),n.clone.wtTable.holder.style.opacity=.4,n.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",Object(b.addClass)(n.clone.wtTable.holder.parentNode,"wtDebugVisible"),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ce(e,t)}(t,oe),t}();oe.registerOverlay(oe.CLONE_DEBUG,ue);function fe(e){return(fe="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function he(e,t){for(var n=0;n0?-s:0,i+="px",Object(b.setOverlayPosition)(t,i,o)}this.adjustHeaderBordersPosition(n),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,Object(b.getWindowScrollTop)(t)),n=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.defaultColumnWidth,r=e,i=0;r0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,i=Object(b.getScrollbarWidth)(n),o=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"vertical"===a){var s=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(s-=i),s=Math.min(s,t.wtRootElement.scrollHeight),o.height="".concat(s,"px")}else o.height="";this.clone.wtTable.holder.style.height=o.height;var l=Object(b.outerWidth)(this.clone.wtTable.TABLE);o.width="".concat(0===l?l:l+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=Object(b.getScrollbarWidth)(this.wot.rootDocument);this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.top=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,i=0;return t&&r.offsetWidth!==r.clientWidth&&(i=Object(b.getScrollbarWidth)(this.wot.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){var e=0;return this.wot.getSetting("preventOverflow")||this.trimmingContainer!==this.wot.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}},{key:"getScrollPosition",value:function(){return Object(b.getScrollLeft)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode,n=this.wot.getSetting("rowHeaders"),r=this.wot.getSetting("fixedColumnsLeft");if(this.wot.getSetting("totalRows")?Object(b.removeClass)(t,"emptyRows"):Object(b.addClass)(t,"emptyRows"),r&&!n.length)Object(b.addClass)(t,"innerBorderLeft");else if(!r&&n.length){var i=Object(b.hasClass)(t,"innerBorderLeft");e?Object(b.addClass)(t,"innerBorderLeft"):Object(b.removeClass)(t,"innerBorderLeft"),(!i&&e||i&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}])&&he(n.prototype,r),i&&he(n,i),t}();oe.registerOverlay(oe.CLONE_LEFT,ve);function ge(e){return(ge="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){for(var n=0;n0?-a:0,i+="px",Object(b.setOverlayPosition)(e,r,i)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo(Object(b.getWindowScrollLeft)(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.settings.defaultRowHeight,r=e,i=0;r0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,i=Object(b.getScrollbarWidth)(n),o=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=i),s=Math.min(s,t.wtRootElement.scrollWidth),o.width="".concat(s,"px")}else o.width="";this.clone.wtTable.holder.style.width=o.width;var l=Object(b.outerHeight)(this.clone.wtTable.TABLE);o.height="".concat(0===l?l:l+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=Object(b.getScrollbarWidth)(this.wot.rootDocument);this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.wot,r=(n.cloneSource?n.cloneSource:n).wtTable.holder,i=this.getTableParentOffset(),o=0;if(t&&r.offsetHeight!==r.clientHeight&&(o=Object(b.getScrollbarWidth)(n.rootDocument)),t){var a=n.getSetting("fixedRowsBottom"),s=n.getSetting("totalRows");i+=this.sumCellSizes(0,e+1),i-=n.wtViewport.getViewportHeight()-this.sumCellSizes(s-a,s),i+=1}else i+=this.sumCellSizes(n.getSetting("fixedRowsTop"),e);return i+=o,this.setScrollPosition(i)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return Object(b.getScrollTop)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange){var t=e.getBorder(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var e=this,t=this.wot.selections;this.redrawSelectionBorders(t.getCell()),Object(_.arrayEach)(t.getAreas(),function(t){e.redrawSelectionBorders(t)}),this.redrawSelectionBorders(t.getFill()),this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh()}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode;if(this.wot.getSetting("totalColumns")?Object(b.removeClass)(t,"emptyColumns"):Object(b.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=Object(b.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?Object(b.addClass)(t,"innerBorderTop"):Object(b.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(r)for(var i=0;i0&&(c="".concat(-a,"px")),r&&"horizontal"!==r||o<0&&s-e.offsetHeight>0&&(u="".concat(-o,"px")),Object(b.setOverlayPosition)(e,c,u)}else Object(b.resetCssTransform)(e);e.style.height="".concat(0===t?t:t+4,"px"),e.style.width="".concat(0===n?n:n+4,"px")}}}])&&Ce(n.prototype,r),i&&Ce(n,i),t}();oe.registerOverlay(oe.CLONE_TOP_LEFT_CORNER,Te);function Ae(e){return(Ae="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Re(e,t){for(var n=0;nc?l-c:0,r+="px",e.style.top="",e.style.left=n,e.style.bottom=r}else t=this.getScrollPosition(),Object(b.resetCssTransform)(e),this.repositionOverlay();this.adjustHeaderBordersPosition(t)}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow;this.mainTableScrollableElement===t?t.scrollTo(Object(b.getWindowScrollLeft)(t),e):this.mainTableScrollableElement.scrollTop=e}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot,r=n.wtTable,i=n.wtSettings.settings.defaultRowHeight,o=e,a=0;o0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.wtViewport,r=e.rootWindow,i=Object(b.getScrollbarWidth)(this.wot.rootDocument),o=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=n.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=i),s=Math.min(s,t.wtRootElement.scrollWidth),o.width="".concat(s,"px")}else o.width="";this.clone.wtTable.holder.style.width=o.width;var l=Object(b.outerHeight)(this.clone.wtTable.TABLE);o.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=Object(b.getScrollbarWidth)(this.wot.rootDocument);this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,i=0;t&&r.offsetHeight!==r.clientHeight&&(i=Object(b.getScrollbarWidth)(this.wot.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wot.getSetting("fixedRowsBottom"),e),n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return Object(b.getScrollTop)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){if(0===this.wot.getSetting("fixedRowsBottom")&&this.wot.getSetting("columnHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,n=Object(b.hasClass)(t,"innerBorderTop");e?Object(b.addClass)(t,"innerBorderTop"):Object(b.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelector("th:nth-of-type(2)");r&&(r.style["border-left-width"]=0)}}}])&&Re(n.prototype,r),i&&Re(n,i),t}();oe.registerOverlay(oe.CLONE_BOTTOM,Ne);function De(e){return(De="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function je(e,t){for(var n=0;nc?s-c:0,o+="px",i+="px",t.style.top="",t.style.left=i,t.style.bottom=o}else Object(b.resetCssTransform)(t),this.repositionOverlay();t.style.height="".concat(n,"px"),t.style.width="".concat(r,"px")}}}])&&je(n.prototype,r),i&&je(n,i),t}();oe.registerOverlay(oe.CLONE_BOTTOM_LEFT_CORNER,He);n(76);var Ue=n(15);function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function We(e,t){for(var n=0;nMath.ceil(i.top+i.height)||a.clientXMath.ceil(i.left+i.width))&&(n.eventManager.removeEventListener(r,"mousemove",e),t.style.display="block")})}}},{key:"createBorders",value:function(e){var t=this.wot.rootDocument;this.main=t.createElement("div");var n=["top","left","bottom","right","corner"],r=this.main.style;r.position="absolute",r.top=0,r.left=0;for(var i=0;i<5;i++){var o=n[i],a=t.createElement("div");a.className="wtBorder ".concat(this.settings.className||""),this.settings[o]&&this.settings[o].hide&&(a.className+=" hidden"),(r=a.style).backgroundColor=this.settings[o]&&this.settings[o].color?this.settings[o].color:e.border.color,r.height=this.settings[o]&&this.settings[o].width?"".concat(this.settings[o].width,"px"):"".concat(e.border.width,"px"),r.width=this.settings[o]&&this.settings[o].width?"".concat(this.settings[o].width,"px"):"".concat(e.border.width,"px"),this.main.appendChild(a)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),Object(O.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();var s=this.wot.wtTable,l=s.bordersHolder;l||((l=t.createElement("div")).className="htBorders",s.bordersHolder=l,s.spreader.appendChild(l)),l.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var e=this,t=this.wot.rootDocument;this.selectionHandles={topLeft:t.createElement("DIV"),topLeftHitArea:t.createElement("DIV"),bottomRight:t.createElement("DIV"),bottomRightHitArea:t.createElement("DIV")};this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var n={position:"absolute",height:"".concat(40,"px"),width:"".concat(40,"px"),"border-radius":"".concat(parseInt(40/1.5,10),"px")};Object(w.objectEach)(n,function(t,n){e.selectionHandles.styles.bottomRightHitArea[n]=t,e.selectionHandles.styles.topLeftHitArea[n]=t});var r={position:"absolute",height:"".concat(10,"px"),width:"".concat(10,"px"),"border-radius":"".concat(parseInt(10/1.5,10),"px"),background:"#F5F5FF",border:"1px solid #4285c8"};Object(w.objectEach)(r,function(t,n){e.selectionHandles.styles.bottomRight[n]=t,e.selectionHandles.styles.topLeft[n]=t}),this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)}},{key:"isPartRange",value:function(e,t){var n=this.wot.selections.createOrGetArea();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,t,n,r,i,o){var a=parseInt(this.selectionHandles.styles.topLeft.width,10),s=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top="".concat(parseInt(n-a,10),"px"),this.selectionHandles.styles.topLeft.left="".concat(parseInt(r-a,10),"px"),this.selectionHandles.styles.topLeftHitArea.top="".concat(parseInt(n-s/4*3,10),"px"),this.selectionHandles.styles.topLeftHitArea.left="".concat(parseInt(r-s/4*3,10),"px"),this.selectionHandles.styles.bottomRight.top="".concat(parseInt(n+o,10),"px"),this.selectionHandles.styles.bottomRight.left="".concat(parseInt(r+i,10),"px"),this.selectionHandles.styles.bottomRightHitArea.top="".concat(parseInt(n+o-s/4,10),"px"),this.selectionHandles.styles.bottomRightHitArea.left="".concat(parseInt(r+i-s/4,10),"px"),this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")}},{key:"appear",value:function(e){if(!this.disabled){for(var t,n,r,i,o=this.wot,a=o.wtTable,s=o.rootDocument,l=o.rootWindow,c=a.getRenderedRowsCount(),u=0;u=e[0]&&f<=e[2]){t=f;break}}for(var d=c-1;d>=0;d-=1){var p=a.rowFilter.renderedToSource(d);if(p>=e[0]&&p<=e[2]){n=p;break}}for(var m=a.getRenderedColumnsCount(),v=0;v=e[1]&&g<=e[3]){r=g;break}}for(var y=m-1;y>=0;y-=1){var w=a.columnFilter.renderedToSource(y);if(w>=e[1]&&w<=e[3]){i=w;break}}if(void 0!==t&&void 0!==r){var _=a.getCell(new h(t,r)),S=t!==n||r!==i,E=S?a.getCell(new h(n,i)):_,C=Object(b.offset)(_),x=S?Object(b.offset)(E):C,k=Object(b.offset)(a.TABLE),T=C.top,A=C.left,R=A-k.left-1,M=x.left+Object(b.outerWidth)(E)-A;if(this.isEntireColumnSelected(t,n)){var P=this.getDimensionsFromHeader("columns",r,i,k),I=null;if(P){var N=ze(P,3);I=N[0],R=N[1],M=N[2]}I&&(_=I)}var D=T-k.top-1,j=x.top+Object(b.outerHeight)(E)-T;if(this.isEntireRowSelected(r,i)){var L=this.getDimensionsFromHeader("rows",t,n,k),B=null;if(L){var F=ze(L,3);B=F[0],D=F[1],j=F[2]}B&&(_=B)}var H=Object(b.getComputedStyle)(_,l);parseInt(H.borderTopWidth,10)>0&&(D+=1,j=j>0?j-1:0),parseInt(H.borderLeftWidth,10)>0&&(R+=1,M=M>0?M-1:0),this.topStyle.top="".concat(D,"px"),this.topStyle.left="".concat(R,"px"),this.topStyle.width="".concat(M,"px"),this.topStyle.display="block",this.leftStyle.top="".concat(D,"px"),this.leftStyle.left="".concat(R,"px"),this.leftStyle.height="".concat(j,"px"),this.leftStyle.display="block";var U=Math.floor(this.settings.border.width/2);this.bottomStyle.top="".concat(D+j-U,"px"),this.bottomStyle.left="".concat(R,"px"),this.bottomStyle.width="".concat(M,"px"),this.bottomStyle.display="block",this.rightStyle.top="".concat(D,"px"),this.rightStyle.left="".concat(R+M-U,"px"),this.rightStyle.height="".concat(j+1,"px"),this.rightStyle.display="block";var z=this.settings.border.cornerVisible;z="function"===typeof z?z(this.settings.layerLevel):z;var W=this.wot.getSetting("onModifyGetCellCoords",n,i),V=n,Y=i;if(W&&Array.isArray(W)){var q=ze(W,4);V=q[2],Y=q[3]}if(Object(O.isMobileBrowser)()||!z||this.isPartRange(V,Y))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(D+j-4,"px"),this.cornerStyle.left="".concat(R+M-4,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var G=Object(b.getTrimmingContainer)(a.TABLE),X=G===l;if(X&&(G=s.documentElement),i===this.wot.getSetting("totalColumns")-1)(X?E.getBoundingClientRect().left:E.offsetLeft)+Object(b.outerWidth)(E)+parseInt(this.cornerDefaultStyle.width,10)/2>=Object(b.innerWidth)(G)&&(this.cornerStyle.left="".concat(Math.floor(R+M-3-parseInt(this.cornerDefaultStyle.width,10)/2),"px"),this.cornerStyle.borderRightWidth=0);if(n===this.wot.getSetting("totalRows")-1)(X?E.getBoundingClientRect().top:E.offsetTop)+Object(b.outerHeight)(E)+parseInt(this.cornerDefaultStyle.height,10)/2>=Object(b.innerHeight)(G)&&(this.cornerStyle.top="".concat(Math.floor(D+j-3-parseInt(this.cornerDefaultStyle.height,10)/2),"px"),this.cornerStyle.borderBottomWidth=0);this.cornerStyle.display="block"}Object(O.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,i,D,R,M,j)}else this.disappear()}}},{key:"isEntireColumnSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,t,n,r){var i=this.wot.wtTable,o=i.wtRootElement.parentNode,a=null,s=null,l=null,c=null,u=null,f=null,h=null,d=null;switch(e){case"rows":a=function(){return i.getRowHeader.apply(i,arguments)},s=function(){return b.outerHeight.apply(void 0,arguments)},l="ht__selection--rows",f="top";break;case"columns":a=function(){return i.getColumnHeader.apply(i,arguments)},s=function(){return b.outerWidth.apply(void 0,arguments)},l="ht__selection--columns",f="left"}if(o.className.includes(l)){var p=this.wot.getSetting("columnHeaders").length;if(h=a(t,p-1),d=a(n,p-1),!h||!d)return!1;var m=Object(b.offset)(h),v=Object(b.offset)(d);return h&&d&&(c=m[f]-r[f]-1,u=v[f]+s(d)-m[f]),[h,c,u]}return!1}},{key:"changeBorderStyle",value:function(e,t){var n=this[e].style,r=t[e];!r||r.hide?Object(b.addClass)(this[e],"hidden"):(Object(b.hasClass)(this[e],"hidden")&&Object(b.removeClass)(this[e],"hidden"),n.backgroundColor=r.color,"top"!==e&&"bottom"!==e||(n.height="".concat(r.width,"px")),"right"!==e&&"left"!==e||(n.width="".concat(r.width,"px")))}},{key:"changeBorderToDefaultStyle",value:function(e){var t=1,n="#000",r=this[e].style;r.backgroundColor=n,r.width="".concat(t,"px"),r.height="".concat(t,"px")}},{key:"toggleHiddenClass",value:function(e,t){this.changeBorderToDefaultStyle(e),t?Object(b.addClass)(this[e],"hidden"):Object(b.removeClass)(this[e],"hidden")}},{key:"disappear",value:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",Object(O.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}}])&&We(t.prototype,n),r&&We(t,r),e}();n(25);function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function qe(e){return(qe="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n4&&void 0!==arguments[4]&&arguments[4],o=e.wtTable.getCell(new h(t,n));if("object"===qe(o)){var a=r;i&&(a=this.classNameGenerator(o),this.classNames.includes(a)||this.classNames.push(a)),Object(b.addClass)(o,a)}return this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===i)return e;var o=i>=0?i:t,a=e,s=0===(o-=1)?e:"".concat(e,"-").concat(o);if(Object(b.hasClass)(r,s)){var l=o+1;a="".concat(e,"-").concat(l)}else a=n(r,o);return a}}},{key:"draw",value:function(e){if(this.isEmpty())this.settings.border&&this.getBorder(e).disappear();else{for(var t=e.wtTable.getRenderedRowsCount(),n=e.wtTable.getRenderedColumnsCount(),r=this.getCorners(),i=Ye(r,4),o=i[0],a=i[1],s=i[2],l=i[3],c=0;c=a&&u<=l){var f=e.wtTable.getColumnHeader(u);if(f){var h=[];this.settings.highlightHeaderClassName&&h.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&h.push(this.settings.highlightColumnClassName),Object(b.addClass)(f,h)}}}for(var d=0;d=o&&p<=s){var m=e.wtTable.getRowHeader(p);if(m){var v=[];this.settings.highlightHeaderClassName&&v.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&v.push(this.settings.highlightRowClassName),Object(b.addClass)(m,v)}}for(var g=0;g=o&&p<=s&&y>=a&&y<=l?this.settings.className&&this.addClassAtCoords(e,p,y,this.settings.className,this.settings.markIntersections):p>=o&&p<=s?this.settings.highlightRowClassName&&this.addClassAtCoords(e,p,y,this.settings.highlightRowClassName):y>=a&&y<=l&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,p,y,this.settings.highlightColumnClassName);var w=e.getSetting("onAfterDrawSelection",p,y,r,this.settings.layerLevel);"string"===typeof w&&this.addClassAtCoords(e,p,y,w)}}e.getSetting("onBeforeDrawBorders",r,this.settings.className),this.settings.border&&this.getBorder(e).appear(r)}}}])&&Ge(t.prototype,n),r&&Ge(t,r),e}();n.d(t,"d",function(){return a}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return p}),n.d(t,"e",function(){return te}),n.d(t,"c",function(){return Xe})},function(e,t,n){var r=n(87),i=n(457),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(86),i=n(135),o=n(138),a=n(109),s=n(211),l=a.set,c=a.getterFor("Array Iterator");e.exports=s(Array,"Array",function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})},function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){"use strict";var r=n(213).charAt,i=n(109),o=n(211),a=i.set,s=i.getterFor("String Iterator");o(String,"String",function(e){a(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(49),i=n(301),o=n(7),a=n(84),s=n(47),l=s("iterator"),c=s("toStringTag"),u=o.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[l]!==u)try{a(d,l,u)}catch(m){d[l]=u}if(d[c]||a(d,c,f),i[f])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(m){d[p]=o[p]}}}},function(e,t,n){"use strict";var r=n(30),i=n(49),o=n(154),a=n(64),s=n(290),l=n(38),c=n(65),u=n(163),f=n(54),h=n(59),d=n(78),p=n(86),m=n(131),v=n(130),g=n(136),y=n(137),b=n(134),w=n(289),_=n(210),S=n(121),E=n(68),C=n(152),x=n(84),k=n(87),O=n(132),T=n(155),A=n(133),R=n(156),M=n(47),P=n(302),I=n(303),N=n(161),D=n(109),j=n(111).forEach,L=T("hidden"),B=M("toPrimitive"),F=D.set,H=D.getterFor("Symbol"),U=Object.prototype,z=i.Symbol,W=i.JSON,V=W&&W.stringify,Y=S.f,q=E.f,G=w.f,X=C.f,K=O("symbols"),Z=O("op-symbols"),$=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Q=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=a&&l(function(){return 7!=g(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=Y(U,t);r&&delete U[t],q(e,t,n),r&&e!==U&&q(U,t,r)}:q,re=function(e,t){var n=K[e]=g(z.prototype);return F(n,{type:"Symbol",tag:e,description:t}),a||(n.description=t),n},ie=s&&"symbol"==typeof z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},oe=function(e,t,n){e===U&&oe(Z,t,n),h(e);var r=m(t,!0);return h(n),c(K,r)?(n.enumerable?(c(e,L)&&e[L][r]&&(e[L][r]=!1),n=g(n,{enumerable:v(0,!1)})):(c(e,L)||q(e,L,v(1,{})),e[L][r]=!0),ne(e,r,n)):q(e,r,n)},ae=function(e,t){h(e);var n=p(t),r=y(n).concat(ue(n));return j(r,function(t){a&&!se.call(n,t)||oe(e,t,n[t])}),e},se=function(e){var t=m(e,!0),n=X.call(this,t);return!(this===U&&c(K,t)&&!c(Z,t))&&(!(n||!c(this,t)||!c(K,t)||c(this,L)&&this[L][t])||n)},le=function(e,t){var n=p(e),r=m(t,!0);if(n!==U||!c(K,r)||c(Z,r)){var i=Y(n,r);return!i||!c(K,r)||c(n,L)&&n[L][r]||(i.enumerable=!0),i}},ce=function(e){var t=G(p(e)),n=[];return j(t,function(e){c(K,e)||c(A,e)||n.push(e)}),n},ue=function(e){var t=e===U,n=G(t?Z:p(e)),r=[];return j(n,function(e){!c(K,e)||t&&!c(U,e)||r.push(K[e])}),r};s||(k((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=R(e);return a&&te&&ne(U,t,{configurable:!0,set:function e(n){this===U&&e.call(Z,n),c(this,L)&&c(this[L],t)&&(this[L][t]=!1),ne(this,t,v(1,n))}}),re(t,e)}).prototype,"toString",function(){return H(this).tag}),C.f=se,E.f=oe,S.f=le,b.f=w.f=ce,_.f=ue,a&&(q(z.prototype,"description",{configurable:!0,get:function(){return H(this).description}}),o||k(U,"propertyIsEnumerable",se,{unsafe:!0})),P.f=function(e){return re(M(e),e)}),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:z}),j(y(Q),function(e){I(e)}),r({target:"Symbol",stat:!0,forced:!s},{for:function(e){var t=String(e);if(c($,t))return $[t];var n=z(t);return $[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!a},{create:function(e,t){return void 0===t?g(e):ae(g(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:ce,getOwnPropertySymbols:ue}),r({target:"Object",stat:!0,forced:l(function(){_.f(1)})},{getOwnPropertySymbols:function(e){return _.f(d(e))}}),W&&r({target:"JSON",stat:!0,forced:!s||l(function(){var e=z();return"[null]"!=V([e])||"{}"!=V({a:e})||"{}"!=V(Object(e))})},{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(f(t)||void 0!==e)&&!ie(e))return u(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!ie(t))return t}),r[1]=t,V.apply(W,r)}}),z.prototype[B]||x(z.prototype,B,z.prototype.valueOf),N(z,"Symbol"),A[L]=!0},function(e,t,n){"use strict";var r=n(30),i=n(64),o=n(49),a=n(65),s=n(54),l=n(68).f,c=n(286),u=o.Symbol;if(i&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},h=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof h?new u(e):void 0===e?u():u(e);return""===e&&(f[t]=!0),t};c(h,u);var d=h.prototype=u.prototype;d.constructor=h;var p=d.toString,m="Symbol(test)"==String(u("test")),v=/^Symbol\((.*)\)[^)]+$/;l(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(a(f,e))return"";var n=m?t.slice(7,-1):t.replace(v,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:h})}},function(e,t,n){n(303)("iterator")},function(e,t,n){"use strict";e.exports=n(442)},function(e,t,n){"use strict";n.r(t),n.d(t,"stringify",function(){return p}),n.d(t,"isDefined",function(){return m}),n.d(t,"isUndefined",function(){return v}),n.d(t,"isEmpty",function(){return g}),n.d(t,"isRegExp",function(){return y}),n.d(t,"_injectProductInfo",function(){return R});n(10),n(11),n(12),n(7),n(39),n(88),n(6),n(26),n(461),n(8),n(308),n(57),n(75),n(9);var r=n(28),i=n.n(r),o=n(36);function a(){var e=h(['\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: \'non-commercial-and-evaluation\'. \n Read more about it in \n the documentation or contact us at support@handsontable.com.'],['\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: \'non-commercial-and-evaluation\'.\\x20\n Read more about it in\\x20\n the documentation or contact us at support@handsontable.com.']);return a=function(){return e},e}function s(){var e=h(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",'. Renew your \n license key or downgrade to a version released prior to ','. If you need any \n help, contact us at sales@handsontable.com.'],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",'. Renew your\\x20\n license key or downgrade to a version released prior to ','. If you need any\\x20\n help, contact us at sales@handsontable.com.']);return s=function(){return e},e}function l(){var e=h(['\n The license key for Handsontable is invalid. \n Read more on how to \n install it properly or contact us at support@handsontable.com.'],['\n The license key for Handsontable is invalid.\\x20\n Read more on how to\\x20\n install it properly or contact us at support@handsontable.com.']);return l=function(){return e},e}function c(){var e=h(["\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact \n us at support@handsontable.com."],["\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\\x20\n us at support@handsontable.com."]);return c=function(){return e},e}function u(){var e=h(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",". Renew your license key at handsontable.com or downgrade to a version released prior \n to ",". If you need any help, contact us at sales@handsontable.com."],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",". Renew your license key at handsontable.com or downgrade to a version released prior\\x20\n to ",". If you need any help, contact us at sales@handsontable.com."]);return u=function(){return e},e}function f(){var e=h(["\n The license key for Handsontable is invalid. \n If you need any help, contact us at support@handsontable.com."],["\n The license key for Handsontable is invalid.\\x20\n If you need any help, contact us at support@handsontable.com."]);return f=function(){return e},e}function h(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(e){return(d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){var t;switch(d(e)){case"string":case"number":t="".concat(e);break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t}function m(e){return"undefined"!==typeof e}function v(e){return"undefined"===typeof e}function g(e){return null===e||""===e||v(e)}function y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b="length",w=function(e){return parseInt(e,16)},_=function(e){return parseInt(e,10)},S=function(e,t,n){return e.substr(t,n)},E=function(e){return e.codePointAt(0)-65},C=function(e){return"".concat(e).replace(/\-/g,"")},x=function(e){return w(S(C(e),w("12"),E("F")))/(w(S(C(e),E("B"),~~![][b]))||9)},k=function(){return"undefined"!==typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},O=!1,T={invalid:function(){return Object(o.a)(f())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return Object(o.a)(u(),t,n,t)},missing:function(){return Object(o.a)(c())},non_commercial:function(){return""}},A={invalid:function(){return Object(o.a)(l())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return Object(o.a)(s(),t,n,t)},missing:function(){return Object(o.a)(a())},non_commercial:function(){return""}};function R(e,t){var n,r=!g(e),o="string"===typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),a="invalid",s="invalid",l=function(e){var t=[][b],n=t;if(e[b]!==E("Z"))return!1;for(var r="",i="B>1:r=S(e,o,o?1===i[b]?9:8:6);return n===t}(e=C(e||""));if(r||o||l)if(l){var c=i()("11/06/2019","DD/MM/YYYY"),u=Math.floor(c.toDate().getTime()/864e5),f=x(e);if(n=i()(864e5*(f+1),"x").format("MMMM DD, YYYY"),u>f){var h=i()().diff(c,"days");a=h<=1?"valid":"expired",s=h<=15?"valid":"expired"}else a="valid",s="valid"}else o?(a="non_commercial",s="valid"):(a="invalid",s="invalid");else a="missing",s="missing";(k()&&(a="valid",s="valid"),O||"valid"===a)||(T[a]({keyValidityDate:n,hotVersion:"7.1.0"})&&console["non_commercial"===a?"info":"warn"](T[a]({keyValidityDate:n,hotVersion:"7.1.0"})),O=!0);if("valid"!==s&&t.parentNode&&A[s]({keyValidityDate:n,hotVersion:"7.1.0"})){var d=document.createElement("div");d.id="hot-display-license-info",d.innerHTML=A[s]({keyValidityDate:n,hotVersion:"7.1.0"}),t.parentNode.insertBefore(d,t.nextSibling)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"stopImmediatePropagation",function(){return i}),n.d(t,"isImmediatePropagationStopped",function(){return o}),n.d(t,"stopPropagation",function(){return a}),n.d(t,"pageX",function(){return s}),n.d(t,"pageY",function(){return l}),n.d(t,"isRightClick",function(){return c}),n.d(t,"isLeftClick",function(){return u});var r=n(0);function i(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function o(e){return!1===e.isImmediatePropagationEnabled}function a(e){"function"===typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function s(e){if(e.pageX)return e.pageX;var t=e.target.ownerDocument.defaultView;return e.clientX+Object(r.getWindowScrollLeft)(t)}function l(e){if(e.pageY)return e.pageY;var t=e.target.ownerDocument.defaultView;return e.clientY+Object(r.getWindowScrollTop)(t)}function c(e){return 2===e.button}function u(e){return 0===e.button}},function(e,t,n){"use strict";n.d(t,"d",function(){return s}),n.d(t,"a",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"b",function(){return u});n(7),n(89),n(6),n(8),n(34),n(9);var r=n(17),i=n(2),o=n(40),a=new WeakMap;function s(e,t){var n=Object(o.toUpperCaseFirst)(e);r.a.getSingleton().add("construct",function(){a.has(this)||a.set(this,{});var e=a.get(this);e[n]||(e[n]=new t(this))}),r.a.getSingleton().add("afterDestroy",function(){if(a.has(this)){var e=a.get(this);Object(i.objectEach)(e,function(e){return e.destroy()}),a.delete(this)}})}function l(e,t){if("string"!==typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=Object(o.toUpperCaseFirst)(t);if(a.has(e)&&a.get(e)[n])return a.get(e)[n]}function c(e){return a.has(e)?Object.keys(a.get(e)):[]}function u(e,t){var n=null;return a.has(e)&&Object(i.objectEach)(a.get(e),function(e,r){e===t&&(n=r)}),n}},function(e,t,n){"use strict";n(22),n(46);var r=n(1),i=n(2);function o(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))Object(r.arrayEach)(t,function(t){return n.add(e,t,i)});else{var o=this.getBucket(i);if("undefined"===typeof o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var a=!1;t.initialHook&&Object(r.arrayEach)(o[e],function(n,r){if(n.initialHook)return o[e][r]=t,a=!0,!1}),a||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?Object(r.arrayEach)(t,function(t){return n.once(e,t,i)}):(t.runOnce=!0,this.add(e,t,i))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return"undefined"!==typeof r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,r,i,o,a,s){var l=this.globalBucket[t],c=l?l.length:0,u=0;if(c)for(;u0&&void 0!==arguments[0]?arguments[0]:null;Object(i.objectEach)(this.getBucket(e),function(e,t,n){return n[t].length=0})}},{key:"register",value:function(e){this.isRegistered(e)||s.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&s.splice(s.indexOf(e),1)}},{key:"isRegistered",value:function(e){return s.indexOf(e)>=0}},{key:"getRegistered",value:function(){return s}}]),e}(),c=new l;t.a=l},function(e,t,n){"use strict";n.r(t),n.d(t,"KEY_CODES",function(){return i}),n.d(t,"isPrintableChar",function(){return o}),n.d(t,"isMetaKey",function(){return a}),n.d(t,"isCtrlKey",function(){return s}),n.d(t,"isCtrlMetaKey",function(){return l}),n.d(t,"isKey",function(){return c});n(44),n(22),n(50),n(75);var r=n(1),i={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88};function o(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function a(e){return-1!==[i.ARROW_DOWN,i.ARROW_UP,i.ARROW_LEFT,i.ARROW_RIGHT,i.HOME,i.END,i.DELETE,i.BACKSPACE,i.F1,i.F2,i.F3,i.F4,i.F5,i.F6,i.F7,i.F8,i.F9,i.F10,i.F11,i.F12,i.TAB,i.PAGE_DOWN,i.PAGE_UP,i.ENTER,i.ESCAPE,i.SHIFT,i.CAPS_LOCK,i.ALT].indexOf(e)}function s(e){var t=[];return navigator.platform.includes("Mac")?t.push(i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX):t.push(i.CONTROL),t.includes(e)}function l(e){return[i.CONTROL,i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX].includes(e)}function c(e,t){var n=t.split("|"),o=!1;return Object(r.arrayEach)(n,function(t){if(e===i[t])return o=!0,!1}),o}},function(e,t,n){var r=n(30),i=n(38),o=n(78),a=n(160),s=n(293);r({target:"Object",stat:!0,forced:i(function(){a(1)}),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(30)({target:"Object",stat:!0},{setPrototypeOf:n(212)})},function(e,t,n){"use strict";n.d(t,"b",function(){return f});n(46);var r=n(0),i=n(2),o=n(37),a=n(15);function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}var t,n,r;return t=e,(n=[{key:"addEventListener",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=this.context;function s(e){n.call(this,u(a,e))}return"boolean"===typeof i||Object(o.isPassiveEventSupported)()||(i=!1),this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:s,options:i}),e.addEventListener(t,s,i),l+=1,function(){r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r,i=this.context.eventListeners.length;i;)if(i-=1,(r=this.context.eventListeners[i]).event===t&&r.element===e){if(n&&n!==r.callback)continue;this.context.eventListeners.splice(i,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),l-=1}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e;){e-=1;var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n=e.document,r=e;n||(r=(n=e.ownerDocument?e.ownerDocument:e).defaultView);var i,o={bubbles:!0,cancelable:"mousemove"!==t,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};n.createEvent?(i=n.createEvent("MouseEvents")).initMouseEvent(t,o.bubbles,o.cancelable,o.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,o.ctrlKey,o.altKey,o.shiftKey,o.metaKey,o.button,o.relatedTarget||n.body.parentNode):i=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent("on".concat(t),i)}}])&&s(t.prototype,n),r&&s(t,r),e}();function u(e,t){var n,s,l,u,f;t.isTargetWebComponent=!1,t.realTarget=t.target;var h=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){h.apply(this),Object(a.stopImmediatePropagation)(this)},!c.isHotTableEnv)return t;for(f=(t=Object(r.polymerWrap)(t)).path?t.path.length:0;f;){if(f-=1,"HOT-TABLE"===t.path[f].nodeName)n=!0;else if(n&&t.path[f].shadowRoot){u=t.path[f];break}0!==f||u||(u=t.path[f])}return u||(u=t.target),t.isTargetWebComponent=!0,Object(o.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:(Object(i.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&(Object(i.hasOwnProperty)(e,"hot")?s=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?s=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(s=e.wtTable.TABLE.parentNode.parentNode),l=Object(r.closest)(t.target,["HOT-TABLE"],s),t.realTarget=l&&s.querySelector("HOT-TABLE")||t.target),Object.defineProperty(t,"target",{get:function(){return Object(r.polymerWrap)(u)},enumerable:!0,configurable:!0}),t}function f(){return l}t.a=c},function(e,t,n){"use strict";var r=n(30),i=n(208).indexOf,o=n(165),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=o("indexOf");r({target:"Array",proto:!0,forced:s||l},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(30),i=n(38),o=n(86),a=n(121).f,s=n(64),l=i(function(){a(1)});r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(30),i=n(54),o=n(59),a=n(65),s=n(121),l=n(160);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,c,u=arguments.length<3?t:arguments[2];return o(t)===u?t[n]:(r=s.f(t,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(u):i(c=l(t))?e(c,n,u):void 0}})},function(e,t,n){"use strict";var r=n(30),i=n(38),o=n(163),a=n(54),s=n(78),l=n(69),c=n(164),u=n(219),f=n(141),h=n(47)("isConcatSpreadable"),d=!i(function(){var e=[];return e[h]=!1,e.concat()[0]!==e}),p=f("concat"),m=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!d||!p},{concat:function(e){var t,n,r,i,o,a=s(this),f=u(a,0),h=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(f,h++,o)}return f.length=h,f}})},function(e,t,n){"use strict";var r=n(87),i=n(59),o=n(38),a=n(220),s=RegExp.prototype,l=s.toString,c=o(function(){return"/a/b"!=l.call({source:"a",flags:"b"})}),u="toString"!=l.name;(c||u)&&r(RegExp.prototype,"toString",function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)},{unsafe:!0})},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e){return void 0===e}function s(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},z={};function W(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return B(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function V(e,t){return e.isValid()?(t=Y(t,e.localeData()),U[t]=U[t]||function(e){var t,n,r,i=e.match(F);for(t=0,n=i.length;t=0&&H.test(e);)e=e.replace(H,r),H.lastIndex=0,n-=1;return e}var q=/\d/,G=/\d\d/,X=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,$=/\d\d?/,J=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,ee=/\d{1,3}/,te=/\d{1,4}/,ne=/[+-]?\d{1,6}/,re=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,ae=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function ce(e,t,n){le[e]=A(t)?t:function(e,r){return e&&n?n:t}}function ue(e,t){return u(le,e)?le[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function de(e,t){var n,r=t;for("string"===typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=S(e)}),n=0;n68?1900:2e3)};var Oe,Te=Ae("FullYear",!0);function Ae(e,t){return function(n){return null!=n?(Me(this,e,n),r.updateOffset(this,t),this):Re(this,e)}}function Re(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Me(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ke(e)?29:28:31-r%7%2}Oe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ze(e,t,n){var r=7+t-n,i=(7+Ue(e,0,r).getUTCDay()-t)%7;return-i+r-1}function We(e,t,n,r,i){var o,a,s=(7+n-r)%7,l=ze(e,r,i),c=1+7*(t-1)+s+l;return c<=0?a=xe(o=e-1)+c:c>xe(e)?(o=e+1,a=c-xe(e)):(o=e,a=c),{year:o,dayOfYear:a}}function Ve(e,t,n){var r,i,o=ze(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(i=e.year()-1,r=a+Ye(i,t,n)):a>Ye(e.year(),t,n)?(r=a-Ye(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ye(e,t,n){var r=ze(e,t,n),i=ze(e+1,t,n);return(xe(e)-r+i)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),L("week",5),L("isoWeek",5),ce("w",$),ce("ww",$,G),ce("W",$),ce("WW",$,G),pe(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=S(e)}),W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ce("d",$),ce("e",$),ce("E",$),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),pe(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:d(n).invalidWeekday=e}),pe(["d","e","E"],function(e,t,n,r){t[r]=S(e)});var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ge="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=se,Ze=se,$e=se;function Je(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),c.push(r),c.push(i),c.push(o);for(a.sort(e),s.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),l[t]=fe(l[t]),c[t]=fe(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function et(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function tt(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Qe),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+Qe.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+Qe.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),et("a",!0),et("A",!1),I("hour","h"),L("hour",13),ce("a",tt),ce("A",tt),ce("H",$),ce("h",$),ce("k",$),ce("HH",$,G),ce("hh",$,G),ce("kk",$,G),ce("hmm",J),ce("hmmss",Q),ce("Hmm",J),ce("Hmmss",Q),de(["H","HH"],be),de(["k","kk"],function(e,t,n){var r=S(e);t[be]=24===r?0:r}),de(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),de(["h","hh"],function(e,t,n){t[be]=S(e),d(n).bigHour=!0}),de("hmm",function(e,t,n){var r=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r)),d(n).bigHour=!0}),de("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r,2)),t[_e]=S(e.substr(i)),d(n).bigHour=!0}),de("Hmm",function(e,t,n){var r=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r))}),de("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r,2)),t[_e]=S(e.substr(i))});var nt,rt=Ae("Hours",!0),it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ne,monthsShort:De,week:{dow:0,doy:6},weekdays:qe,weekdaysMin:Xe,weekdaysShort:Ge,meridiemParse:/[ap]\.?m?\.?/i},ot={},at={};function st(e){return e?e.toLowerCase().replace("_","-"):e}function lt(t){var n=null;if(!ot[t]&&"undefined"!==typeof e&&e&&e.exports)try{n=nt._abbr,!function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),ct(n)}catch(r){}return ot[t]}function ct(e,t){var n;return e&&(n=a(t)?ft(e):ut(e,t))&&(nt=n),nt._abbr}function ut(e,t){if(null!==t){var n=it;if(t.abbr=e,null!=ot[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ot[e]._config;else if(null!=t.parentLocale){if(null==ot[t.parentLocale])return at[t.parentLocale]||(at[t.parentLocale]=[]),at[t.parentLocale].push({name:e,config:t}),null;n=ot[t.parentLocale]._config}return ot[e]=new M(R(n,t)),at[e]&&at[e].forEach(function(e){ut(e.name,e.config)}),ct(e),ot[e]}return delete ot[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!i(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o0;){if(r=lt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&E(i,n,!0)>=t-1)break;t--}o++}return null}(e)}function ht(e){var t,n=e._a;return n&&-2===d(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[ye]<1||n[ye]>Pe(n[ve],n[ge])?ye:n[be]<0||n[be]>24||24===n[be]&&(0!==n[we]||0!==n[_e]||0!==n[Se])?be:n[we]<0||n[we]>59?we:n[_e]<0||n[_e]>59?_e:n[Se]<0||n[Se]>999?Se:-1,d(e)._overflowDayOfYear&&(tye)&&(t=ye),d(e)._overflowWeeks&&-1===t&&(t=Ee),d(e)._overflowWeekday&&-1===t&&(t=Ce),d(e).overflow=t),e}function dt(e,t,n){return null!=e?e:null!=t?t:n}function pt(e){var t,n,i,o,a,s=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ye]&&null==e._a[ge]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=dt(t.GG,e._a[ve],Ve(At(),1,4).year),r=dt(t.W,1),((i=dt(t.E,1))<1||i>7)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var c=Ve(At(),o,a);n=dt(t.gg,e._a[ve],c.year),r=dt(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o}r<1||r>Ye(n,o,a)?d(e)._overflowWeeks=!0:null!=l?d(e)._overflowWeekday=!0:(s=We(n,r,i,o,a),e._a[ve]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=dt(e._a[ve],i[ve]),(e._dayOfYear>xe(a)||0===e._dayOfYear)&&(d(e)._overflowDayOfYear=!0),n=Ue(a,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[we]&&0===e._a[_e]&&0===e._a[Se]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Ue:function(e,t,n,r,i,o,a){var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==o&&(d(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],bt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],wt=/^\/?Date\((\-?\d+)/i;function _t(e){var t,n,r,i,o,a,s=e._i,l=mt.exec(s)||vt.exec(s);if(l){for(d(e).iso=!0,t=0,n=yt.length;t0&&d(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),c+=n.length),z[o]?(n?d(e).empty=!1:d(e).unusedTokens.push(o),me(o,n,e)):e._strict&&!n&&d(e).unusedTokens.push(o);d(e).charsLeftOver=l-c,s.length>0&&d(e).unusedInput.push(s),e._a[be]<=12&&!0===d(e).bigHour&&e._a[be]>0&&(d(e).bigHour=void 0),d(e).parsedDateParts=e._a.slice(0),d(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),pt(e),ht(e)}else xt(e);else _t(e)}function Ot(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(ht(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return d(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:m()});function Pt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;ro&&(t=o),function(e,t,n,r,i){var o=We(e,t,n,r,i),a=Ue(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),nn("gggg","weekYear"),nn("ggggg","weekYear"),nn("GGGG","isoWeekYear"),nn("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",$,G),ce("gg",$,G),ce("GGGG",te,K),ce("gggg",te,K),ce("GGGGG",ne,Z),ce("ggggg",ne,Z),pe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=S(e)}),pe(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),W("Q",0,"Qo","quarter"),I("quarter","Q"),L("quarter",7),ce("Q",q),de("Q",function(e,t){t[ge]=3*(S(e)-1)}),W("D",["DD",2],"Do","date"),I("date","D"),L("date",9),ce("D",$),ce("DD",$,G),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),de(["D","DD"],ye),de("Do",function(e,t){t[ye]=S(e.match($)[0])});var on=Ae("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),L("dayOfYear",4),ce("DDD",ee),ce("DDDD",X),de(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),W("m",["mm",2],0,"minute"),I("minute","m"),L("minute",14),ce("m",$),ce("mm",$,G),de(["m","mm"],we);var an=Ae("Minutes",!1);W("s",["ss",2],0,"second"),I("second","s"),L("second",15),ce("s",$),ce("ss",$,G),de(["s","ss"],_e);var sn,ln=Ae("Seconds",!1);for(W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),L("millisecond",16),ce("S",ee,q),ce("SS",ee,G),ce("SSS",ee,X),sn="SSSS";sn.length<=9;sn+="S")ce(sn,re);function cn(e,t){t[Se]=S(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")de(sn,cn);var un=Ae("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var fn=b.prototype;function hn(e){return e}fn.add=Zt,fn.calendar=function(e,t){var n=e||At(),i=Ht(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(A(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,At(n)))},fn.clone=function(){return new b(this)},fn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":o=Jt(this,r)/12;break;case"month":o=Jt(this,r);break;case"quarter":o=Jt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:_(o)},fn.endOf=function(e){return void 0===(e=N(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},fn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||At(e).isValid())?Yt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(At(),e)},fn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||At(e).isValid())?Yt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(At(),e)},fn.get=function(e){return A(this[e=N(e)])?this[e]():this},fn.invalidAt=function(){return d(this).overflow},fn.isAfter=function(e,t){var n=w(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(a(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",V(n,"Z")):V(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Te,fn.isLeapYear=function(){return ke(this.year())},fn.weekYear=function(e){return rn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return rn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Le,fn.daysInMonth=function(){return Pe(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Ye(this.year(),1,4)},fn.date=on,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=rt,fn.minute=fn.minutes=an,fn.second=fn.seconds=ln,fn.millisecond=fn.milliseconds=un,fn.utcOffset=function(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=Ft(ae,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=Ut(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Kt(this,Yt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Ut(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ut(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=Ft(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?At(e).utcOffset():0,(this.utcOffset()-e)%60===0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=zt,fn.isUTC=zt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=x("dates accessor is deprecated. Use date instead.",on),fn.months=x("months accessor is deprecated. Use month instead",Le),fn.years=x("years accessor is deprecated. Use year instead",Te),fn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),fn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Ot(e))._a){var t=e._isUTC?h(e._a):At(e._a);this._isDSTShifted=this.isValid()&&E(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var dn=M.prototype;function pn(e,t,n,r){var i=ft(),o=h().set(r,t);return i[n](o,e)}function mn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pn(e,r,n,"month");return i}function vn(e,t,n,r){"boolean"===typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var i,o=ft(),a=e?o._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var l=[];for(i=0;i<7;i++)l[i]=pn(t,(i+a)%7,r,"day");return l}dn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return A(r)?r.call(t,n):r},dn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},dn.invalidDate=function(){return this._invalidDate},dn.ordinal=function(e){return this._ordinal.replace("%d",e)},dn.preparse=hn,dn.postformat=hn,dn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return A(i)?i(e,t,n,r):i.replace(/%d/i,e)},dn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)},dn.set=function(e){var t,n;for(n in e)A(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},dn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ie).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},dn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ie.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},dn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Oe.call(this._shortMonthsParse,a))?i:null:-1!==(i=Oe.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Oe.call(this._shortMonthsParse,a))?i:-1!==(i=Oe.call(this._longMonthsParse,a))?i:null:-1!==(i=Oe.call(this._longMonthsParse,a))?i:-1!==(i=Oe.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},dn.monthsRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},dn.monthsShortRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=Be),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},dn.week=function(e){return Ve(e,this._week.dow,this._week.doy).week},dn.firstDayOfYear=function(){return this._week.doy},dn.firstDayOfWeek=function(){return this._week.dow},dn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},dn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},dn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},dn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Oe.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Oe.call(this._weekdaysParse,a))?i:-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:-1!==(i=Oe.call(this._weekdaysParse,a))?i:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:-1!==(i=Oe.call(this._weekdaysParse,a))?i:-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},dn.weekdaysRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},dn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},dn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},dn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},dn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ct("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),r.lang=x("moment.lang is deprecated. Use moment.locale instead.",ct),r.langData=x("moment.langData is deprecated. Use moment.localeData instead.",ft);var gn=Math.abs;function yn(e,t,n,r){var i=Yt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function _n(e){return 146097*e/4800}function Sn(e){return function(){return this.as(e)}}var En=Sn("ms"),Cn=Sn("s"),xn=Sn("m"),kn=Sn("h"),On=Sn("d"),Tn=Sn("w"),An=Sn("M"),Rn=Sn("y");function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Mn("milliseconds"),In=Mn("seconds"),Nn=Mn("minutes"),Dn=Mn("hours"),jn=Mn("days"),Ln=Mn("months"),Bn=Mn("years"),Fn=Math.round,Hn={ss:44,s:45,m:45,h:22,d:26,M:11},Un=Math.abs;function zn(e){return(e>0)-(e<0)||+e}function Wn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Un(this._milliseconds)/1e3,r=Un(this._days),i=Un(this._months);e=_(n/60),t=_(e/60),n%=60,e%=60;var o=_(i/12),a=i%=12,s=r,l=t,c=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var h=f<0?"-":"",d=zn(this._months)!==zn(f)?"-":"",p=zn(this._days)!==zn(f)?"-":"",m=zn(this._milliseconds)!==zn(f)?"-":"";return h+"P"+(o?d+o+"Y":"")+(a?d+a+"M":"")+(s?p+s+"D":"")+(l||c||u?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(u?m+u+"S":"")}var Vn=Nt.prototype;return Vn.isValid=function(){return this._isValid},Vn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},Vn.add=function(e,t){return yn(this,e,t,1)},Vn.subtract=function(e,t){return yn(this,e,t,-1)},Vn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"year"===e)return t=this._days+r/864e5,n=this._months+wn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(_n(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Vn.asMilliseconds=En,Vn.asSeconds=Cn,Vn.asMinutes=xn,Vn.asHours=kn,Vn.asDays=On,Vn.asWeeks=Tn,Vn.asMonths=An,Vn.asYears=Rn,Vn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},Vn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*bn(_n(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=_(o/1e3),l.seconds=e%60,t=_(e/60),l.minutes=t%60,n=_(t/60),l.hours=n%24,a+=_(n/24),i=_(wn(a)),s+=i,a-=bn(_n(i)),r=_(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Vn.clone=function(){return Yt(this)},Vn.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},Vn.milliseconds=Pn,Vn.seconds=In,Vn.minutes=Nn,Vn.hours=Dn,Vn.days=jn,Vn.weeks=function(){return _(this.days()/7)},Vn.months=Ln,Vn.years=Bn,Vn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Yt(e).abs(),i=Fn(r.as("s")),o=Fn(r.as("m")),a=Fn(r.as("h")),s=Fn(r.as("d")),l=Fn(r.as("M")),c=Fn(r.as("y")),u=i<=Hn.ss&&["s",i]||i0,u[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Vn.toISOString=Wn,Vn.toString=Wn,Vn.toJSON=Wn,Vn.locale=Qt,Vn.localeData=tn,Vn.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wn),Vn.lang=en,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),de("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),de("x",function(e,t,n){n._d=new Date(S(e))}),r.version="2.20.1",t=At,r.fn=fn,r.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},r.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=h,r.unix=function(e){return At(1e3*e)},r.months=function(e,t){return mn(e,t,"months")},r.isDate=l,r.locale=ct,r.invalid=m,r.duration=Yt,r.isMoment=w,r.weekdays=function(e,t,n){return vn(e,t,n,"weekdays")},r.parseZone=function(){return At.apply(null,arguments).parseZone()},r.localeData=ft,r.isDuration=Dt,r.monthsShort=function(e,t){return mn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return vn(e,t,n,"weekdaysMin")},r.defineLocale=ut,r.updateLocale=function(e,t){if(null!=t){var n,r,i=it;null!=(r=lt(e))&&(i=r._config),t=R(i,t),(n=new M(t)).parentLocale=ot[e],ot[e]=n,ct(e)}else null!=ot[e]&&(null!=ot[e].parentLocale?ot[e]=ot[e].parentLocale:null!=ot[e]&&delete ot[e]);return ot[e]},r.locales=function(){return k(ot)},r.weekdaysShort=function(e,t,n){return vn(e,t,n,"weekdaysShort")},r.normalizeUnits=N,r.relativeTimeRounding=function(e){return void 0===e?Fn:"function"===typeof e&&(Fn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Hn[e]&&(void 0===t?Hn[e]:(Hn[e]=t,"s"===e&&(Hn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=fn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(93)(e))},function(e,t,n){var r=n(41),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r=n(49),i=n(121).f,o=n(84),a=n(87),s=n(207),l=n(286),c=n(159);e.exports=function(e,t){var n,u,f,h,d,p=e.target,m=e.global,v=e.stat;if(n=m?r:v?r[p]||s(p,{}):(r[p]||{}).prototype)for(u in t){if(h=t[u],f=e.noTargetGet?(d=i(n,u))&&d.value:n[u],!c(m?u:p+(v?".":"#")+u,e.forced)&&void 0!==f){if(typeof h===typeof f)continue;l(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,u,h,e)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"isFunction",function(){return i}),n.d(t,"throttle",function(){return o}),n.d(t,"throttleAfterHits",function(){return a}),n.d(t,"debounce",function(){return s}),n.d(t,"pipe",function(){return l}),n.d(t,"partial",function(){return c}),n.d(t,"curry",function(){return u}),n.d(t,"curryRight",function(){return f});n(25),n(39);var r=n(1);function i(e){return"function"===typeof e}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},i=null;return function(){for(var o=this,a=arguments.length,s=new Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=o(e,t),i=n;function a(){for(var t=arguments.length,n=new Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:200,r=null;return function(){for(var i=this,o=arguments.length,a=new Array(o),s=0;s1?t-1:0),r=1;r=t?e.apply(this,s):n(s)}}([])}function f(e){var t=e.length;return function n(r){return function(){for(var i=arguments.length,o=new Array(i),a=0;a=t?e.apply(this,s):n(s)}}([])}},function(e,t,n){var r=n(30),i=n(458);r({target:"Array",stat:!0,forced:!n(299)(function(e){Array.from(e)})},{from:i})},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return o});var r=n(14);function i(){var e;Object(r.isDefined)(console)&&(e=console).warn.apply(e,arguments)}function o(){var e;Object(r.isDefined)(console)&&(e=console).error.apply(e,arguments)}},function(e,t,n){"use strict";var r,i=n(49),o=n(214),a=n(139),s=n(162),l=n(300),c=n(54),u=n(109).enforce,f=n(285),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=s("WeakMap",p,l,!0,!0);if(f&&h){r=l.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var v=m.prototype,g=v.delete,y=v.has,b=v.get,w=v.set;o(v,{delete:function(e){if(c(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(c(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(c(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new r),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!d(e)){var n=u(this);n.frozen||(n.frozen=new r),y.call(this,e)?w.call(this,e,t):n.frozen.set(e,t)}else w.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(7),n(6),n(8),n(34),n(9);var r=n(60),i=n(17),o=n(74),a=(n(10),n(11),n(12),n(62),n(226),n(22),n(95),n(23),n(19),n(20),n(24),n(57),n(18)),s=n(14),l=n(40),c=n(1),u=n(0),f=n(2),h=n(15),d=(n(25),n(44),n(39),n(431)),p=n.n(d),m=n(45),v=n(21);function g(e){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0]?Object(u.selectElementIfAllowed)(this.TEXTAREA):(this.TEXTAREA.select(),Object(u.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length))}},{key:"createElements",value:function(){var e=this.hot.rootDocument;this.TEXTAREA=e.createElement("TEXTAREA"),this.TEXTAREA.tabIndex=-1,Object(u.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),Object(u.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.zIndex="-1",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}},{key:"getEditedCell",value:function(){var e;switch(this.checkEditorSection()){case"top":e=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=101;break;case"top-left-corner":e=this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"bottom-left-corner":e=this.hot.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"left":e=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;case"bottom":e=this.hot.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;default:e=this.hot.getCell(this.row,this.col),this.holderZIndex=-1}return e<0?void 0:e}},{key:"hideEditableElement",value:function(){(Object(m.isIE)()||Object(m.isEdge)())&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",this.textareaParentStyle.zIndex="-1"}},{key:"showEditableElement",value:function(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle.right="auto",this.textareaParentStyle.zIndex=this.holderZIndex>=0?this.holderZIndex:"",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden"}},{key:"refreshValue",value:function(){var e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}},{key:"refreshDimensions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===o.a.EDITING||e)if(this.TD=this.getEditedCell(),this.TD){var t,n=this.hot.view.wt,r=n.wtOverlays,i=n.wtViewport,a=Object(u.offset)(this.TD),s=Object(u.offset)(this.hot.rootElement),l=r.topOverlay.holder,c=r.leftOverlay.holder,f=this.hot.countRows(),h=l!==this.hot.rootWindow?l.scrollTop:0,d=c!==this.hot.rootWindow?c.scrollLeft:0,p=this.checkEditorSection(),m=["","left"].includes(p)?h:0,v=["","top","bottom"].includes(p)?d:0,g=a.top===s.top?0:1,y=this.hot.getSettings(),b=this.hot.hasColHeaders(),w=this.TD.style.backgroundColor,_=a.top-s.top-g-m,S=a.left-s.left-1-v;switch(p){case"top":t=Object(u.getCssTransform)(r.topOverlay.clone.wtTable.holder.parentNode);break;case"left":t=Object(u.getCssTransform)(r.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":t=Object(u.getCssTransform)(r.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":t=Object(u.getCssTransform)(r.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":t=Object(u.getCssTransform)(r.bottomOverlay.clone.wtTable.holder.parentNode)}(b&&0===this.hot.getSelectedLast()[0]||y.fixedRowsBottom&&this.hot.getSelectedLast()[0]===f-y.fixedRowsBottom)&&(_+=1),0===this.hot.getSelectedLast()[1]&&(S+=1),t&&-1!==t?this.textareaParentStyle[t[0]]=t[1]:Object(u.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top="".concat(_,"px"),this.textareaParentStyle.left="".concat(S,"px"),this.showEditableElement();var E=i.rowsRenderCalculator.startPosition,C=i.columnsRenderCalculator.startPosition,x=r.leftOverlay.getScrollPosition(),k=r.topOverlay.getScrollPosition(),O=Object(u.getScrollbarWidth)(this.hot.rootDocument),T=this.TD.offsetTop+E-k,A=this.TD.offsetLeft+C-x,R=Object(u.innerWidth)(this.TD)-8,M=Object(u.hasVerticalScrollbar)(l)?O:0,P=Object(u.hasHorizontalScrollbar)(c)?O:0,I=this.hot.view.maximumVisibleElementWidth(A)-9-M,N=this.TD.scrollHeight+1,D=Math.max(this.hot.view.maximumVisibleElementHeight(T)-P,23),j=Object(u.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=j.fontSize,this.TEXTAREA.style.fontFamily=j.fontFamily,this.TEXTAREA.style.backgroundColor=w,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(N,D),maxHeight:D,minWidth:Math.min(R,I),maxWidth:I},!0)}else e||this.close()}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){return Object(h.stopPropagation)(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){return Object(h.stopPropagation)(e)}),this.addHook("afterScrollHorizontally",function(){return e.refreshDimensions()}),this.addHook("afterScrollVertically",function(){return e.refreshDimensions()}),this.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()})}},{key:"allowKeyEventPropagation",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.clearHooks()}},{key:"onBeforeKeyDown",value:function(e){var t=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===this.TEXTAREA&&!Object(h.isImmediatePropagationStopped)(e)){switch(e.keyCode){case a.KEY_CODES.ARROW_RIGHT:case a.KEY_CODES.ARROW_LEFT:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||Object(h.stopImmediatePropagation)(e));break;case a.KEY_CODES.ARROW_UP:case a.KEY_CODES.ARROW_DOWN:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||Object(h.stopImmediatePropagation)(e));break;case a.KEY_CODES.ENTER:var n=this.hot.selection.isMultiple();if(t&&!n||e.altKey){if(this.isOpened()){var r=Object(u.getCaretPosition)(this.TEXTAREA),i=this.getValue(),o="".concat(i.slice(0,r),"\n").concat(i.slice(r));this.setValue(o),Object(u.setCaretPosition)(this.TEXTAREA,r+1)}else this.beginEditing("".concat(this.originalValue,"\n"));Object(h.stopImmediatePropagation)(e)}e.preventDefault();break;case a.KEY_CODES.BACKSPACE:case a.KEY_CODES.DELETE:case a.KEY_CODES.HOME:case a.KEY_CODES.END:Object(h.stopImmediatePropagation)(e)}-1===[a.KEY_CODES.ARROW_UP,a.KEY_CODES.ARROW_RIGHT,a.KEY_CODES.ARROW_DOWN,a.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}}])&&y(n.prototype,r),i&&y(n,i),t}();function C(e){return(C="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var n=0;ni.countRows()-1?i.deselectCell():i.selectCell(n,0),i.getData().length&&(e.preventDefault(),Object(h.stopImmediatePropagation)(e),this.hot.listen(),this.TEXTAREA.focus())),O(T(t.prototype),"onBeforeKeyDown",this).call(this,e)}}}])&&x(n.prototype,r),i&&x(n,i),t}();function M(e){return(M="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){for(var n=0;n".concat(l,""))),t.innerHTML=d},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize"),r=e;if(n){var o=n.widths;o[t]&&(r=o[t])}return i?r:r+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]="".concat(o+2,"px"),n.skipOne&&(n.skipOne=!1),this.hot._registerTimeout(function(){e.queryChoices(e.TEXTAREA.value)})}},{key:"close",value:function(){this.removeHooksByKey("beforeKeyDown"),N(D(t.prototype),"close",this).call(this)}},{key:"discardEditor",value:function(e){N(D(t.prototype),"discardEditor",this).call(this,e),this.hot.view.render()}},{key:"queryChoices",value:function(e){var t=this,n=this.cellProperties.source;this.query=e,"function"===typeof n?n.call(this.cellProperties,e,function(e){t.rawChoices=e,t.updateChoicesList(t.stripValuesIfNeeded(e))}):Array.isArray(n)?(this.rawChoices=n,this.updateChoicesList(this.stripValuesIfNeeded(n))):this.updateChoicesList([])}},{key:"updateChoicesList",value:function(e){var n=Object(u.getCaretPosition)(this.TEXTAREA),r=Object(u.getSelectionEndPosition)(this.TEXTAREA),i=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,a=null,s=null,l=e;i&&(a=t.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));var f=Array.isArray(a)?a.length:0;if(!1===o)f&&(s=a[0]);else{for(var h=[],d=0,p=l.length;dl&&s>l;return c?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(c?s:l,n),c}},{key:"limitDropdownIfNeeded",value:function(e,t){if(t>e){var n,r=0,i=0,o=0;do{r+=o=this.htEditor.getRowHeight(i)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,i+=1}while(r=t?t*e:this.strippedChoices.length*e+8}},{key:"stripValueIfNeeded",value:function(e){return this.stripValuesIfNeeded([e])[0]}},{key:"stripValuesIfNeeded",value:function(e){var t=this.cellProperties.allowHtml,n=Object(c.arrayMap)(e,function(e){return Object(s.stringify)(e)});return Object(c.arrayMap)(n,function(e){return t?e:Object(l.stripTags)(e)})}},{key:"allowKeyEventPropagation",value:function(e){var t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1,r=!1;return e===a.KEY_CODES.ARROW_DOWN&&n>0&&n-1&&(r=!0),r}},{key:"onBeforeKeyDown",value:function(e){var n=this,r=L.get(this);if(r.skipOne=!1,Object(a.isPrintableChar)(e.keyCode)||e.keyCode===a.KEY_CODES.BACKSPACE||e.keyCode===a.KEY_CODES.DELETE||e.keyCode===a.KEY_CODES.INSERT){var i=0;if(e.keyCode===a.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(i+=10),this.htEditor&&this.hot._registerTimeout(function(){n.queryChoices(n.TEXTAREA.value),r.skipOne=!0},i)}N(D(t.prototype),"onBeforeKeyDown",this).call(this,e)}}])&&P(n.prototype,r),i&&P(n,i),t}();B.sortByRelevance=function(e,t,n){var r,i,o,a,c=[],u=e.length,f=[],h=t.length;if(0===u){for(a=0;at.charsLeft)return 1}return 0}),a=0,h=c.length;a0&&void 0!==arguments[0]?arguments[0]:null;Q(ee(t.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout(function(){e.instance._refreshBorders()}),Q(ee(t.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var r=this.originalValue;void 0!==r&&this.setValue(r)}this.hideDatepicker(),Q(ee(t.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t,n=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,i=this.$datePicker.config(),o=this.instance.view.isMouseDown(),s=!!e&&Object(a.isMetaKey)(e.keyCode);this.datePickerStyle.top="".concat(this.hot.rootWindow.pageYOffset+n.top+Object(u.outerHeight)(this.TD),"px"),this.datePickerStyle.left="".concat(this.hot.rootWindow.pageXOffset+n.left,"px"),this.$datePicker._onInputFocus=function(){},i.format=r,this.originalValue?(t=this.originalValue,G()(t,r,!0).isValid()&&this.$datePicker.setMoment(G()(t,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||o||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,i.defaultDate=t,G()(t,r,!0).isValid()&&this.$datePicker.setMoment(G()(t,r),!0),s||o||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var e=this,t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&Object(f.deepExtend)(n,this.cellProperties.datePickerConfig);var r=n.onSelect,i=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.format=n.format||this.defaultDateFormat,n.reposition=n.reposition||!1,n.onSelect=function(t){var n=t;isNaN(n.getTime())||(n=G()(n).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(n),e.hideDatepicker(),r&&r()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),i&&i()},n}}])&&$(n.prototype,r),i&&$(n,i),t}();function re(e){return(re="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e,t){for(var n=0;n0&&(l-=1),parseInt(d.borderLeftWidth,10)>0&&(s-=1),h.height="".concat(l,"px"),h.minWidth="".concat(s,"px"),h.top="".concat(c,"px"),h.left="".concat(f,"px"),h.margin="0px"}else this.close()}},{key:"getEditedCell",value:function(){var e,t=this.hot.view.wt.wtOverlays;switch(this.checkEditorSection()){case"top":e=t.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":e=t.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=t.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.hot.getCell(this.row,this.col),this.select.style.zIndex=""}return e<0?void 0:e}},{key:"onBeforeKeyDown",value:function(){var e=this.select.selectedIndex-1,t=this.select.selectedIndex+1;switch(event.keyCode){case a.KEY_CODES.ARROW_UP:e>=0&&(this.select[e].selected=!0),Object(h.stopImmediatePropagation)(event),event.preventDefault();break;case a.KEY_CODES.ARROW_DOWN:t<=this.select.length-1&&(this.select[t].selected=!0),Object(h.stopImmediatePropagation)(event),event.preventDefault()}}}])&&Ce(n.prototype,r),i&&Ce(n,i),t}();n.d(t,"d",function(){return Fe}),n.d(t,"a",function(){return Be}),n.d(t,"b",function(){return Le}),n.d(t,"c",function(){return De});var Re=new WeakMap,Me=Object(r.a)("editors"),Pe=Me.register,Ie=Me.getItem,Ne=Me.hasItem,De=Me.getNames;Me.getValues;function je(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},i.a.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function Le(e,t){var n;if("function"===typeof e)Re.get(e)||Fe(null,e),n=Re.get(e);else{if("string"!==typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=Ie(e)}if(!n)throw Error('No editor registered under name "'.concat(e,'"'));return n.getInstance(t)}function Be(e){if(!Ne(e))throw Error('No registered editor found under "'.concat(e,'" name'));return Ie(e).getConstructor()}function Fe(e,t){var n=new je(t);"string"===typeof e&&Pe(e,n),Re.set(t,n)}Fe("base",o.b),Fe("autocomplete",F),Fe("checkbox",Y),Fe("date",ne),Fe("dropdown",ue),Fe("handsontable",R),Fe("numeric",me),Fe("password",Se),Fe("select",Ae),Fe("text",E)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});n(57),n(168);var r=n(1);function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;it
t";var n=document.createElement("CAPTION");n.innerHTML="c
c
c
c",n.style.padding="0",n.style.margin="0",e.insertBefore(n,t),document.body.appendChild(e),i=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}(),i}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o||(o="object"===("undefined"===typeof Intl?"undefined":r(Intl))?new Intl.Collator(e,t).compare:"function"===typeof String.prototype.localeCompare?function(e,t){return"".concat(e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})}function _(){if(void 0!==a)return a;try{var e={get passive(){a=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(t){a=!1}return a}c||(c=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-s)),r=window.setTimeout(function(){e(t+n)},n);return s=t+n,r}),u||(u=function(e){clearTimeout(e)})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";var r=n(30),i=n(54),o=n(163),a=n(158),s=n(69),l=n(86),c=n(164),u=n(141),f=n(47)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!u("slice")},{slice:function(e,t){var n,r,u,p=l(this),m=s(p.length),v=a(e,m),g=a(void 0===t?m:t,m);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,v,g);for(r=new(void 0===n?Array:n)(d(g-v,0)),u=0;v1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]})}var c=/<\/?\w+\/?>|<\w+[\s|\/][^>]*>/gi;function u(e){return"".concat(e).replace(c,"")}},function(e,t,n){"use strict";(function(e){var r=n(448),i=n(449),o=n(282);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"===typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var f=!0,h=0;hi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(u=c);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=f}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,o){return o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(53))},function(e,t,n){"use strict";var r=n(60),i=(n(25),n(0));var o=function(e,t,n,r,o,a,s){var l=[],c=[];s.className&&(t.className?t.className="".concat(t.className," ").concat(s.className):t.className=s.className),s.readOnly&&l.push(s.readOnlyCellClassName),!1===s.valid&&s.invalidCellClassName?l.push(s.invalidCellClassName):c.push(s.invalidCellClassName),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!a&&s.placeholder&&l.push(s.placeholderCellClassName),Object(i.removeClass)(t,c),Object(i.addClass)(t,l)},a=n(21),s=n(5);var l=function(e,t,n,r,o,l,c){var u=e.rootDocument,f=c.allowHtml?"html":"text",h=u.createElement("DIV");h.className="htAutocompleteArrow",h.appendChild(u.createTextNode(String.fromCharCode(9660)));for(var d=arguments.length,p=new Array(d>7?d-7:0),m=7;m7?y-7:0),w=7;w0&&void 0!==arguments[0]&&arguments[0],n=e.getSelectedRangeLast();if(n){for(var r=n.getTopLeftCorner(),i=r.row,o=r.col,a=n.getBottomRightCorner(),s=a.row,l=a.col,c=[],u=i;u<=s;u+=1)for(var f=o;f<=l;f+=1){var h=e.getCellMeta(u,f);if("checkbox"!==h.type)return;if(!0!==h.readOnly){"undefined"===typeof h.checkedTemplate&&(h.checkedTemplate=!0),"undefined"===typeof h.uncheckedTemplate&&(h.uncheckedTemplate=!1);var d=e.getDataAtCell(u,f);!1===t?[h.checkedTemplate,h.checkedTemplate.toString()].includes(d)?c.push([u,f,h.uncheckedTemplate]):[h.uncheckedTemplate,h.uncheckedTemplate.toString(),null,void 0].includes(d)&&c.push([u,f,h.checkedTemplate]):c.push([u,f,h.uncheckedTemplate])}}c.length>0&&e.setDataAtCell(c)}}t.appendChild(_),E&&t.appendChild(g.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),e.addHook("beforeKeyDown",function(t){var n=Object(f.partial)(u.isKey,t.keyCode);!e.getSettings().enterBeginsEditing&&n("ENTER")||(n("".concat("SPACE|ENTER","|").concat("DELETE|BACKSPACE"))&&!Object(h.isImmediatePropagationStopped)(t)&&function(t){var n=e.getSelectedRangeLast();if(n)for(var r=n.getTopLeftCorner(),i=n.getBottomRightCorner(),o=r.row;o<=i.row;o++)for(var a=r.col;a<=i.col;a++){var s=e.getCellMeta(o,a);if("checkbox"!==s.type)return;var l=e.getCell(o,a);if(null===l||void 0===l)t(o,a,s);else{var c=l.querySelectorAll("input[type=checkbox]");c.length>0&&!s.readOnly&&t(c)}}}(function(){Object(h.stopImmediatePropagation)(t),t.preventDefault()}),n("SPACE|ENTER")&&k(),n("DELETE|BACKSPACE")&&k(!0))}))};var y=function(e,t,n,r,o,a){for(var s=arguments.length,l=new Array(s>6?s-6:0),c=6;c7?l-7:0),u=7;u7?l-7:0),u=7;u1?n-1:0),o=1;o1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";n.r(t),n.d(t,"setBrowserMeta",function(){return a}),n.d(t,"isChrome",function(){return s}),n.d(t,"isEdge",function(){return l}),n.d(t,"isIE",function(){return c}),n.d(t,"isIE8",function(){return u}),n.d(t,"isIE9",function(){return f}),n.d(t,"isMSBrowser",function(){return h}),n.d(t,"isMobileBrowser",function(){return d}),n.d(t,"isSafari",function(){return p});var r=n(2),i=function(e){var t={value:!1,test:function(n,r){t.value=e(n,r)}};return t},o={chrome:i(function(e,t){return/Chrome/.test(e)&&/Google/.test(t)}),edge:i(function(e){return/Edge/.test(e)}),ie:i(function(e){return/Trident/.test(e)}),ie8:i(function(){return!document.createTextNode("test").textContent}),ie9:i(function(){return!!document.documentMode}),mobile:i(function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}),safari:i(function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)})};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,i=e.vendor,a=void 0===i?navigator.vendor:i;Object(r.objectEach)(o,function(e){(0,e.test)(n,a)})}function s(){return o.chrome.value}function l(){return o.edge.value}function c(){return o.ie.value}function u(){return o.ie8.value}function f(){return o.ie9.value}function h(){return o.ie.value||o.edge.value}function d(){return o.mobile.value}function p(){return o.safari.value}a()},function(e,t,n){"use strict";var r=n(30),i=n(158),o=n(110),a=n(69),s=n(78),l=n(219),c=n(164),u=n(141),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!u("splice")},{splice:function(e,t){var n,r,u,d,p,m,v=s(this),g=a(v.length),y=i(e,g),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=g-y):(n=b-2,r=h(f(o(t),0),g-y)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(v,r),d=0;dg-r+n;d--)delete v[d-1]}else if(n>r)for(d=g-r;d>y;d--)m=d+n-1,(p=d+r-1)in v?v[m]=v[p]:delete v[m];for(d=0;d-1?parseFloat(e):parseInt(e,10)),t}t.__esModule=!0,t.toNumber=r,t.invertNumber=function(e){return-1*r(e)}},function(e,t,n){var r=n(1),i=n(0),o=n(5),a=n(8),s=n(7);t.ABS=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.abs(e)},t.ACOS=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.acos(e);return isNaN(t)&&(t=i.num),t},t.ACOSH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)&&(t=i.num),t},t.ACOT=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.atan(1/e)},t.ACOTH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=.5*Math.log((e+1)/(e-1));return isNaN(t)&&(t=i.num),t},t.AGGREGATE=function(e,n,a,s){if(e=r.parseNumber(e),n=r.parseNumber(e),r.anyIsError(e,n))return i.value;switch(e){case 1:return o.AVERAGE(a);case 2:return o.COUNT(a);case 3:return o.COUNTA(a);case 4:return o.MAX(a);case 5:return o.MIN(a);case 6:return t.PRODUCT(a);case 7:return o.STDEV.S(a);case 8:return o.STDEV.P(a);case 9:return t.SUM(a);case 10:return o.VAR.S(a);case 11:return o.VAR.P(a);case 12:return o.MEDIAN(a);case 13:return o.MODE.SNGL(a);case 14:return o.LARGE(a,s);case 15:return o.SMALL(a,s);case 16:return o.PERCENTILE.INC(a,s);case 17:return o.QUARTILE.INC(a,s);case 18:return o.PERCENTILE.EXC(a,s);case 19:return o.QUARTILE.EXC(a,s)}},t.ARABIC=function(e){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(e))return i.value;var t=0;return e.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(e){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[e]}),t},t.ASIN=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.asin(e);return isNaN(t)&&(t=i.num),t},t.ASINH=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))},t.ATAN=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.atan(e)},t.ATAN2=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?i.value:Math.atan2(e,t)},t.ATANH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.log((1+e)/(1-e))/2;return isNaN(t)&&(t=i.num),t},t.BASE=function(e,t,n){if(n=n||0,e=r.parseNumber(e),t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(e,t,n))return i.value;n=void 0===n?0:n;var o=e.toString(t);return new Array(Math.max(n+1-o.length,0)).join("0")+o},t.CEILING=function(e,n,o){if(n=void 0===n?1:Math.abs(n),o=o||0,e=r.parseNumber(e),n=r.parseNumber(n),o=r.parseNumber(o),r.anyIsError(e,n,o))return i.value;if(0===n)return 0;var a=-Math.floor(Math.log(n)/Math.log(10));return e>=0?t.ROUND(Math.ceil(e/n)*n,a):0===o?-t.ROUND(Math.floor(Math.abs(e)/n)*n,a):-t.ROUND(Math.ceil(Math.abs(e)/n)*n,a)},t.CEILING.MATH=t.CEILING,t.CEILING.PRECISE=t.CEILING,t.COMBIN=function(e,n){return e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n)?i.value:t.FACT(e)/(t.FACT(n)*t.FACT(e-n))},t.COMBINA=function(e,n){return e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n)?i.value:0===e&&0===n?1:t.COMBIN(e+n-1,e-1)},t.COS=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.cos(e)},t.COSH=function(e){return(e=r.parseNumber(e))instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2},t.COT=function(e){return(e=r.parseNumber(e))instanceof Error?e:1/Math.tan(e)},t.COTH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t+1)/(t-1)},t.CSC=function(e){return(e=r.parseNumber(e))instanceof Error?e:1/Math.sin(e)},t.CSCH=function(e){return(e=r.parseNumber(e))instanceof Error?e:2/(Math.exp(e)-Math.exp(-e))},t.DECIMAL=function(e,t){return arguments.length<1?i.value:parseInt(e,t)},t.DEGREES=function(e){return(e=r.parseNumber(e))instanceof Error?e:180*e/Math.PI},t.EVEN=function(e){return(e=r.parseNumber(e))instanceof Error?e:t.CEILING(e,-2,-1)},t.EXP=function(e){return arguments.length<1?i.na:"number"!==typeof e||arguments.length>1?i.error:e=Math.exp(e)};var l=[];t.FACT=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var n=Math.floor(e);return 0===n||1===n?1:l[n]>0?l[n]:(l[n]=t.FACT(n-1)*n,l[n])},t.FACTDOUBLE=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var n=Math.floor(e);return n<=0?1:n*t.FACTDOUBLE(n-2)},t.FLOOR=function(e,n){if(e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n))return i.value;if(0===n)return 0;if(!(e>0&&n>0)&&!(e<0&&n<0))return i.num;n=Math.abs(n);var o=-Math.floor(Math.log(n)/Math.log(10));return e>=0?t.ROUND(Math.floor(e/n)*n,o):-t.ROUND(Math.ceil(Math.abs(e)/n),o)},t.FLOOR.MATH=function(e,n,o){if(n=void 0===n?1:n,o=void 0===o?0:o,e=r.parseNumber(e),n=r.parseNumber(n),o=r.parseNumber(o),r.anyIsError(e,n,o))return i.value;if(0===n)return 0;n=n?Math.abs(n):1;var a=-Math.floor(Math.log(n)/Math.log(10));return e>=0?t.ROUND(Math.floor(e/n)*n,a):0===o||void 0===o?-t.ROUND(Math.ceil(Math.abs(e)/n)*n,a):-t.ROUND(Math.floor(Math.abs(e)/n)*n,a)},t.FLOOR.PRECISE=t.FLOOR.MATH,t.GCD=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=e[0],i=n<0?-n:n,o=1;os?i%=s:s%=i;i+=s}return i},t.INT=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.floor(e)},t.ISO={CEILING:t.CEILING},t.LCM=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t,n,i,o,a=1;void 0!==(i=e.pop());)for(;i>1;){if(i%2){for(t=3,n=Math.floor(Math.sqrt(i));t<=n&&i%t;t+=2);o=t<=n?t:i}else o=2;for(i/=o,a*=o,t=e.length;t;e[--t]%o===0&&1===(e[t]/=o)&&e.splice(t,1));}return a},t.LN=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.log(e)},t.LN10=function(){return Math.log(10)},t.LN2=function(){return Math.log(2)},t.LOG10E=function(){return Math.LOG10E},t.LOG2E=function(){return Math.LOG2E},t.LOG=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?i.value:(t=void 0===t?10:t,Math.log(e)/Math.log(t))},t.LOG10=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.log(e)/Math.log(10)},t.MOD=function(e,t){if(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return i.value;if(0===t)return i.div0;var n=Math.abs(e%t);return t>0?n:-n},t.MROUND=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?i.value:e*t<0?i.num:Math.round(e/t)*t},t.MULTINOMIAL=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var n=0,i=1,o=0;o0?t:-t},t.PI=function(){return Math.PI},t.E=function(){return Math.E},t.POWER=function(e,t){if(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return i.value;var n=Math.pow(e,t);return isNaN(n)?i.num:n},t.PRODUCT=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t=1,n=0;n0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},t.ROUNDUP=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?i.value:(e>0?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},t.SEC=function(e){return(e=r.parseNumber(e))instanceof Error?e:1/Math.cos(e)},t.SECH=function(e){return(e=r.parseNumber(e))instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))},t.SERIESSUM=function(e,t,n,o){if(e=r.parseNumber(e),t=r.parseNumber(t),n=r.parseNumber(n),o=r.parseNumberArray(o),r.anyIsError(e,t,n,o))return i.value;for(var a=o[0]*Math.pow(e,t),s=1;s=t)},t.LT=function(e,t){return 2!==arguments.length?i.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?i.error:e0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}},function(e,t,n){var r=n(4),i=n(6),o=n(10),a=n(1),s=n(7),l=n(0),c=n(11);t.AVEDEV=function(){var e=a.parseNumberArray(a.flatten(arguments));return e instanceof Error?e:o.sum(o(e).subtract(o.mean(e)).abs()[0])/e.length},t.AVERAGE=function(){for(var e,t=a.numbers(a.flatten(arguments)),n=t.length,r=0,i=0,o=0;o=n)return r;r++}},t.CHISQ={},t.CHISQ.DIST=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:n?o.chisquare.cdf(e,t):o.chisquare.pdf(e,t)},t.CHISQ.DIST.RT=function(e,t){return!e|!t?l.na:e<1||t>Math.pow(10,10)?l.num:"number"!==typeof e||"number"!==typeof t?l.value:1-o.chisquare.cdf(e,t)},t.CHISQ.INV=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:o.chisquare.inv(e,t)},t.CHISQ.INV.RT=function(e,t){return!e|!t?l.na:e<0||e>1||t<1||t>Math.pow(10,10)?l.num:"number"!==typeof e||"number"!==typeof t?l.value:o.chisquare.inv(1-e,t)},t.CHISQ.TEST=function(e,t){if(2!==arguments.length)return l.na;if(!(e instanceof Array)||!(t instanceof Array))return l.value;if(e.length!==t.length)return l.value;if(e[0]&&t[0]&&e[0].length!==t[0].length)return l.value;var n,r,i,o=e.length;for(r=0;r=2;)n=n*e/r,r-=2;for(var i=n,o=t;i>1e-10*n;)n+=i=i*e/(o+=2);return 1-n}(c,s))/1e6},t.COLUMN=function(e,t){return 2!==arguments.length?l.na:t<0?l.num:e instanceof Array&&"number"===typeof t?0!==e.length?o.col(e,t):void 0:l.value},t.COLUMNS=function(e){return 1!==arguments.length?l.na:e instanceof Array?0===e.length?0:o.cols(e):l.value},t.CONFIDENCE={},t.CONFIDENCE.NORM=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:o.normalci(1,e,t,n)[1]-1},t.CONFIDENCE.T=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:o.tci(1,e,t,n)[1]-1},t.CORREL=function(e,t){return e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t)?l.value:o.corrcoeff(e,t)},t.COUNT=function(){return a.numbers(a.flatten(arguments)).length},t.COUNTA=function(){var e=a.flatten(arguments);return e.length-t.COUNTBLANK(e)},t.COUNTIN=function(e,t){var n=0;e=a.flatten(e);for(var r=0;r1?l.num:o.centralF.inv(e,t,n)},t.F.INV.RT=function(e,t,n){return 3!==arguments.length?l.na:e<0||e>1||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?l.num:"number"!==typeof e||"number"!==typeof t||"number"!==typeof n?l.value:o.centralF.inv(1-e,t,n)},t.F.TEST=function(e,t){if(!e||!t)return l.na;if(!(e instanceof Array)||!(t instanceof Array))return l.na;if(e.length<2||t.length<2)return l.div0;var n=function(e,t){for(var n=0,r=0;rt[o-1]&&e[s]<=t[o]&&(i[o]+=1):o===r&&e[s]>t[r-1]&&(i[r]+=1)}return i},t.GAMMA=function(e){return(e=a.parseNumber(e))instanceof Error?e:0===e?l.num:parseInt(e,10)===e&&e<0?l.num:o.gammafn(e)},t.GAMMA.DIST=function(e,t,n,r){return 4!==arguments.length?l.na:e<0||t<=0||n<=0?l.value:"number"!==typeof e||"number"!==typeof t||"number"!==typeof n?l.value:r?o.gamma.cdf(e,t,n,!0):o.gamma.pdf(e,t,n,!1)},t.GAMMA.INV=function(e,t,n){return 3!==arguments.length?l.na:e<0||e>1||t<=0||n<=0?l.num:"number"!==typeof e||"number"!==typeof t||"number"!==typeof n?l.value:o.gamma.inv(e,t,n)},t.GAMMALN=function(e){return(e=a.parseNumber(e))instanceof Error?e:o.gammaln(e)},t.GAMMALN.PRECISE=function(e){return 1!==arguments.length?l.na:e<=0?l.num:"number"!==typeof e?l.value:o.gammaln(e)},t.GAUSS=function(e){return(e=a.parseNumber(e))instanceof Error?e:o.normal.cdf(e,0,1)-.5},t.GEOMEAN=function(){var e=a.parseNumberArray(a.flatten(arguments));return e instanceof Error?e:o.geomean(e)},t.GROWTH=function(e,t,n,r){if((e=a.parseNumberArray(e))instanceof Error)return e;var i;if(void 0===t)for(t=[],i=1;i<=e.length;i++)t.push(i);if(void 0===n)for(n=[],i=1;i<=e.length;i++)n.push(i);if(t=a.parseNumberArray(t),n=a.parseNumberArray(n),a.anyIsError(t,n))return l.value;void 0===r&&(r=!0);var o,s,c=e.length,u=0,f=0,h=0,d=0;for(i=0;io&&(o=r[t],i=[]),r[t]===o&&(i[i.length]=t);return i},t.MODE.SNGL=function(){var e=a.parseNumberArray(a.flatten(arguments));return e instanceof Error?e:t.MODE.MULT(e).sort(function(e,t){return e-t})[0]},t.NEGBINOM={},t.NEGBINOM.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:r?o.negbin.cdf(e,t,n):o.negbin.pdf(e,t,n)},t.NORM={},t.NORM.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:n<=0?l.num:r?o.normal.cdf(e,t,n):o.normal.pdf(e,t,n)},t.NORM.INV=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:o.normal.inv(e,t,n)},t.NORM.S={},t.NORM.S.DIST=function(e,t){return(e=a.parseNumber(e))instanceof Error?l.value:t?o.normal.cdf(e,0,1):o.normal.pdf(e,0,1)},t.NORM.S.INV=function(e){return(e=a.parseNumber(e))instanceof Error?l.value:o.normal.inv(e,0,1)},t.PEARSON=function(e,t){if(t=a.parseNumberArray(a.flatten(t)),e=a.parseNumberArray(a.flatten(e)),a.anyIsError(t,e))return l.value;for(var n=o.mean(e),r=o.mean(t),i=e.length,s=0,c=0,u=0,f=0;f1-1/(n+1))return l.num;var r=t*(n+1)-1,i=Math.floor(r);return a.cleanFloat(r===i?e[r]:e[i]+(r-i)*(e[i+1]-e[i]))},t.PERCENTILE.INC=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),a.anyIsError(e,t))return l.value;var n=t*((e=e.sort(function(e,t){return e-t})).length-1),r=Math.floor(n);return a.cleanFloat(n===r?e[n]:e[r]+(n-r)*(e[r+1]-e[r]))},t.PERCENTRANK={},t.PERCENTRANK.EXC=function(e,t,n){if(n=void 0===n?3:n,e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n))return l.value;e=e.sort(function(e,t){return e-t});for(var r=c.UNIQUE.apply(null,e),i=e.length,o=r.length,s=Math.pow(10,n),u=0,f=!1,h=0;!f&&h=r[h]&&(t=r[h]&&(t=0?t[e.indexOf(n)]:0;for(var i=e.sort(function(e,t){return e-t}),o=i.length,s=0,c=0;c=n&&i[c]<=r&&(s+=t[e.indexOf(i[c])]);return s},t.QUARTILE={},t.QUARTILE.EXC=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumber(n),a.anyIsError(e,n))return l.value;switch(n){case 1:return t.PERCENTILE.EXC(e,.25);case 2:return t.PERCENTILE.EXC(e,.5);case 3:return t.PERCENTILE.EXC(e,.75);default:return l.num}},t.QUARTILE.INC=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumber(n),a.anyIsError(e,n))return l.value;switch(n){case 1:return t.PERCENTILE.INC(e,.25);case 2:return t.PERCENTILE.INC(e,.5);case 3:return t.PERCENTILE.INC(e,.75);default:return l.num}},t.RANK={},t.RANK.AVG=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e},i=(t=(t=a.flatten(t)).sort(r)).length,o=0,s=0;s1?(2*t.indexOf(e)+o+1)/2:t.indexOf(e)+1},t.RANK.EQ=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e};return(t=t.sort(r)).indexOf(e)+1},t.ROW=function(e,t){return 2!==arguments.length?l.na:t<0?l.num:e instanceof Array&&"number"===typeof t?0!==e.length?o.row(e,t):void 0:l.value},t.ROWS=function(e){return 1!==arguments.length?l.na:e instanceof Array?0===e.length?0:o.rows(e):l.value},t.RSQ=function(e,n){return e=a.parseNumberArray(a.flatten(e)),n=a.parseNumberArray(a.flatten(n)),a.anyIsError(e,n)?l.value:Math.pow(t.PEARSON(e,n),2)},t.SKEW=function(){var e=a.parseNumberArray(a.flatten(arguments));if(e instanceof Error)return e;for(var t=o.mean(e),n=e.length,r=0,i=0;i1||t<1?l.num:a.anyIsError(e,t)?l.value:Math.abs(o.studentt.inv(e/2,t))},t.T.TEST=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumberArray(a.flatten(n)),a.anyIsError(e,n))return l.value;var r,i=o.mean(e),s=o.mean(n),c=0,u=0;for(r=0;r-1;)e[t]="TRUE";for(var n=0;(n=e.indexOf(!1))>-1;)e[n]="FALSE";return e.join("")},t.DBCS=function(){throw new Error("DBCS is not implemented")},t.DOLLAR=function(){throw new Error("DOLLAR is not implemented")},t.EXACT=function(e,t){return 2!==arguments.length?i.na:e===t},t.FIND=function(e,t,n){return arguments.length<2?i.na:(n=void 0===n?0:n,t?t.indexOf(e,n-1)+1:null)},t.FIXED=function(){throw new Error("FIXED is not implemented")},t.HTML2TEXT=function(e){var t="";return e&&(e instanceof Array?e.forEach(function(e){""!==t&&(t+="\n"),t+=e.replace(/<(?:.|\n)*?>/gm,"")}):t=e.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(e,t){return t=void 0===t?1:t,(t=r.parseNumber(t))instanceof Error||"string"!==typeof e?i.value:e?e.substring(0,t):null},t.LEN=function(e){return 0===arguments.length?i.error:"string"===typeof e?e?e.length:0:e.length?e.length:i.value},t.LOWER=function(e){return"string"!==typeof e?i.value:e?e.toLowerCase():e},t.MID=function(e,t,n){if(t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!==typeof e)return n;var i=t-1,o=i+n;return e.substring(i,o)},t.NUMBERVALUE=function(e,t,n){return t="undefined"===typeof t?".":t,n="undefined"===typeof n?",":n,Number(e.replace(t,".").replace(n,""))},t.PRONETIC=function(){throw new Error("PRONETIC is not implemented")},t.PROPER=function(e){return void 0===e||0===e.length?i.value:(!0===e&&(e="TRUE"),!1===e&&(e="FALSE"),isNaN(e)&&"number"===typeof e?i.value:("number"===typeof e&&(e=""+e),e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(e,t){if(arguments.length<2)return i.na;var n=e.match(new RegExp(t));return n?n[n.length>1?n.length-1:0]:null},t.REGEXMATCH=function(e,t,n){if(arguments.length<2)return i.na;var r=e.match(new RegExp(t));return n?r:!!r},t.REGEXREPLACE=function(e,t,n){return arguments.length<3?i.na:e.replace(new RegExp(t),n)},t.REPLACE=function(e,t,n,o){return t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!==typeof e||"string"!==typeof o?i.value:e.substr(0,t-1)+o+e.substr(t-1+n)},t.REPT=function(e,t){return(t=r.parseNumber(t))instanceof Error?t:new Array(t+1).join(e)},t.RIGHT=function(e,t){return t=void 0===t?1:t,(t=r.parseNumber(t))instanceof Error?t:e?e.substring(e.length-t):i.na},t.SEARCH=function(e,t,n){var r;return"string"!==typeof e||"string"!==typeof t?i.value:(n=void 0===n?0:n,0===(r=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1)?i.value:r)},t.SPLIT=function(e,t){return e.split(t)},t.SUBSTITUTE=function(e,t,n,r){if(arguments.length<2)return i.na;if(!(e&&t&&n))return e;if(void 0===r)return e.replace(new RegExp(t,"g"),n);for(var o=0,a=0;e.indexOf(t,o)>0;)if(o=e.indexOf(t,o+1),++a===r)return e.substring(0,o)+n+e.substring(o+t.length)},t.T=function(e){return"string"===typeof e?e:""},t.TEXT=function(){throw new Error("TEXT is not implemented")},t.TRIM=function(e){return"string"!==typeof e?i.value:e.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(e){return"string"!==typeof e?i.value:e.toUpperCase()},t.VALUE=function(){throw new Error("VALUE is not implemented")}},function(e,t){var n="=",r=[">",">=","<","<=","=","<>"],i="operator",o="literal",a=[i,o];function s(e,t){if(-1===a.indexOf(t))throw new Error("Unsupported token type: "+t);return{value:e,type:t}}function l(e){for(var t,a="",l=[],c=0;c=0?l.push(s(u,i)):a+=u}return a.length>0&&l.push(s("string"!==typeof(t=a)?t:(/^\d+(\.\d+)?$/.test(t)&&(t=-1===t.indexOf(".")?parseInt(t,10):parseFloat(t)),t),o)),l.length>0&&l[0].type!==i&&l.unshift(s(n,i)),l}t.TOKEN_TYPE_OPERATOR=i,t.TOKEN_TYPE_LITERAL=o,t.parse=function(e){return l(function(e){for(var t=e.length,n=[],r=0,i="",o="";r":case"<":case"=":o+=a,i.length>0&&(n.push(i),i="");break;default:o.length>0&&(n.push(o),o=""),i+=a}r++}return i.length>0&&n.push(i),o.length>0&&n.push(o),n}(e))},t.createToken=s,t.compute=function(e){for(var t,n=[],r=0;r":n=e[0]>e[1];break;case">=":n=e[0]>=e[1];break;case"<":n=e[0]":n=e[0]!=e[1]}return n}(n,t)}},function(e,t,n){var r=n(0);t.CELL=function(){throw new Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(e){switch(e){case r.nil:return 1;case r.div0:return 2;case r.value:return 3;case r.ref:return 4;case r.name:return 5;case r.num:return 6;case r.na:return 7;case r.data:return 8}return r.na},t.INFO=function(){throw new Error("INFO is not implemented")},t.ISBLANK=function(e){return null===e},t.ISBINARY=function(e){return/^[01]{1,10}$/.test(e)},t.ISERR=function(e){return[r.value,r.ref,r.div0,r.num,r.name,r.nil].indexOf(e)>=0||"number"===typeof e&&(isNaN(e)||!isFinite(e))},t.ISERROR=function(e){return t.ISERR(e)||e===r.na},t.ISEVEN=function(e){return!(1&Math.floor(Math.abs(e)))},t.ISFORMULA=function(){throw new Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(e){return!0===e||!1===e},t.ISNA=function(e){return e===r.na},t.ISNONTEXT=function(e){return"string"!==typeof e},t.ISNUMBER=function(e){return"number"===typeof e&&!isNaN(e)&&isFinite(e)},t.ISODD=function(e){return!!(1&Math.floor(Math.abs(e)))},t.ISREF=function(){throw new Error("ISREF is not implemented")},t.ISTEXT=function(e){return"string"===typeof e},t.N=function(e){return this.ISNUMBER(e)?e:e instanceof Date?e.getTime():!0===e?1:!1===e?0:this.ISERROR(e)?e:0},t.NA=function(){return r.na},t.SHEET=function(){throw new Error("SHEET is not implemented")},t.SHEETS=function(){throw new Error("SHEETS is not implemented")},t.TYPE=function(e){return this.ISNUMBER(e)?1:this.ISTEXT(e)?2:this.ISLOGICAL(e)?4:this.ISERROR(e)?16:Array.isArray(e)?64:void 0}},function(e,t,n){var r=n(0),i=n(1),o=new Date(Date.UTC(1900,0,1)),a=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],s=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],l=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];function c(e){return 1===new Date(e,1,29).getMonth()}function u(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function f(e){var t=e>-22038912e5?2:1;return Math.ceil((e-o)/864e5)+t}t.DATE=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:e<0||t<0||n<0?r.num:new Date(e,t-1,n)},t.DATEVALUE=function(e){var t,n=2;return"string"!==typeof e?r.value:(t=Date.parse(e),isNaN(t)?r.value:(t<=-22038912e5&&(n=1),Math.ceil((t-o)/864e5)+n))},t.DAY=function(e){var t=i.parseDate(e);return t instanceof Error?t:t.getDate()},t.DAYS=function(e,t){return e=i.parseDate(e),t=i.parseDate(t),e instanceof Error?e:t instanceof Error?t:f(e)-f(t)},t.DAYS360=function(e,t,n){if(n=i.parseBool(n),e=i.parseDate(e),t=i.parseDate(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,o,a=e.getMonth(),s=t.getMonth();if(n)r=31===e.getDate()?30:e.getDate(),o=31===t.getDate()?30:t.getDate();else{var l=new Date(e.getFullYear(),a+1,0).getDate(),c=new Date(t.getFullYear(),s+1,0).getDate();r=e.getDate()===l?30:e.getDate(),t.getDate()===c?r<30?(s++,o=1):o=30:o=t.getDate()}return 360*(t.getFullYear()-e.getFullYear())+30*(s-a)+(o-r)},t.EDATE=function(e,t){return(e=i.parseDate(e))instanceof Error?e:isNaN(t)?r.value:(t=parseInt(t,10),e.setMonth(e.getMonth()+t),f(e))},t.EOMONTH=function(e,t){return(e=i.parseDate(e))instanceof Error?e:isNaN(t)?r.value:(t=parseInt(t,10),f(new Date(e.getFullYear(),e.getMonth()+t+1,0)))},t.HOUR=function(e){return(e=i.parseDate(e))instanceof Error?e:e.getHours()},t.INTERVAL=function(e){if("number"!==typeof e&&"string"!==typeof e)return r.value;e=parseInt(e,10);var t=Math.floor(e/94608e4);e%=94608e4;var n=Math.floor(e/2592e3);e%=2592e3;var i=Math.floor(e/86400);e%=86400;var o=Math.floor(e/3600);e%=3600;var a=Math.floor(e/60),s=e%=60;return"P"+(t=t>0?t+"Y":"")+(n=n>0?n+"M":"")+(i=i>0?i+"D":"")+"T"+(o=o>0?o+"H":"")+(a=a>0?a+"M":"")+(s=s>0?s+"S":"")},t.ISOWEEKNUM=function(e){if((e=i.parseDate(e))instanceof Error)return e;e.setHours(0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7));var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+1)/7)},t.MINUTE=function(e){return(e=i.parseDate(e))instanceof Error?e:e.getMinutes()},t.MONTH=function(e){return(e=i.parseDate(e))instanceof Error?e:e.getMonth()+1},t.NETWORKDAYS=function(e,t,n){return this.NETWORKDAYS.INTL(e,t,1,n)},t.NETWORKDAYS.INTL=function(e,t,n,o){if((e=i.parseDate(e))instanceof Error)return e;if((t=i.parseDate(t))instanceof Error)return t;if(!((n=void 0===n?l[1]:l[n])instanceof Array))return r.value;void 0===o?o=[]:o instanceof Array||(o=[o]);for(var a=0;a0?f.getUTCDay():f.getDay(),d=!1;h!==n[0]&&h!==n[1]||(d=!0);for(var p=0;pl||o===l&&r>=s))return(a===f&&c(a)||function(e,t){var n=e.getFullYear(),r=new Date(n,2,1);if(c(n)&&e=r)return!0;var i=t.getFullYear(),o=new Date(i,2,1);return c(i)&&t>=o&&en?t:n;return e.pow(10,17-~~(e.log(r>0?r:-r)*e.LOG10E))}var s=Array.isArray||function(e){return"[object Array]"===o.call(e)};function l(e){return"[object Function]"===o.call(e)}function c(e){return"number"===typeof e&&e===e}function u(){return new u._init(arguments)}function f(){return 0}function h(){return 1}function d(e,t){return e===t?1:0}u.fn=u.prototype,u._init=function(e){if(s(e[0]))if(s(e[0][0])){l(e[1])&&(e[0]=u.map(e[0],e[1]));for(var t=0;t=0;t--,r++)n[r]=[e[r][t]];return n},u.transpose=function(e){var t,n,r,i,o=[];s(e[0])||(e=[e]),n=e.length,r=e[0].length;for(var a=0;a0&&(a[r][0]=e[r][0]),l=1;ln&&r>0)return[];if(r>0)for(i=e;in;i+=r)o.push(i);return o},u.slice=function(){function e(e,n,r,i){var o,a=[],s=e.length;if(n===t&&r===t&&i===t)return u.copy(e);if(n=n||0,r=r||e.length,i=i||1,(n=n>=0?n:s+n)===(r=r>=0?r:s+r)||0===i)return[];if(nr&&i>0)return[];if(i>0)for(o=n;or;o+=i)a.push(e[o]);return a}return function(t,n){if(c((n=n||{}).row)){if(c(n.col))return t[n.row][n.col];var r=u.rowa(t,n.row),i=n.col||{};return e(r,i.start,i.end,i.step)}if(c(n.col)){var o=u.cola(t,n.col),a=n.row||{};return e(o,a.start,a.end,a.step)}var a=n.row||{},i=n.col||{};return e(t,a.start,a.end,a.step).map(function(t){return e(t,i.start,i.end,i.step)})}}(),u.sliceAssign=function(n,r,i){if(c(r.row)){if(c(r.col))return n[r.row][r.col]=i;r.col=r.col||{},r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;var o=u.arange(r.col.start,e.min(n.length,r.col.end),r.col.step),a=r.row;return o.forEach(function(e,t){n[a][e]=i[t]}),n}if(c(r.col)){r.row=r.row||{},r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1;var s=u.arange(r.row.start,e.min(n[0].length,r.row.end),r.row.step),l=r.col;return s.forEach(function(e,t){n[e][l]=i[t]}),n}i[0].length===t&&(i=[i]),r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1,r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;var s=u.arange(r.row.start,e.min(n.length,r.row.end),r.row.step),o=u.arange(r.col.start,e.min(n[0].length,r.col.end),r.col.step);return s.forEach(function(e,t){o.forEach(function(r,o){n[e][r]=i[t][o]})}),n},u.diagonal=function(e){var t=u.zeros(e.length,e.length);return e.forEach(function(e,n){t[n][n]=e}),t},u.copy=function(e){return e.map(function(e){return c(e)?e:e.map(function(e){return e})})};var p=u.prototype;return p.length=0,p.push=Array.prototype.push,p.sort=Array.prototype.sort,p.splice=Array.prototype.splice,p.slice=Array.prototype.slice,p.toArray=function(){return this.length>1?r.call(this):r.call(this)[0]},p.map=function(e,t){return u(u.map(this,e,t))},p.cumreduce=function(e,t){return u(u.cumreduce(this,e,t))},p.alter=function(e){return u.alter(this,e),this},function(e){for(var t=0;t=0;)t+=e[n];return t},e.sumsqrd=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n]*e[n];return t},e.sumsqerr=function(t){for(var n,r=e.mean(t),i=0,o=t.length;--o>=0;)i+=(n=t[o]-r)*n;return i},e.sumrow=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},e.product=function(e){for(var t=1,n=e.length;--n>=0;)t*=e[n];return t},e.min=function(e){for(var t=e[0],n=0;++nt&&(t=e[n]);return t},e.unique=function(e){for(var t={},n=[],r=0;ro?(s=[n[l]],o=i,a=0):i===o&&(s.push(n[l]),a++),i=1);return 0===a?s[0]:s},e.range=function(t){return e.max(t)-e.min(t)},e.variance=function(t,n){return e.sumsqerr(t)/(t.length-(n?1:0))},e.pooledvariance=function(t){return t.reduce(function(t,n){return t+e.sumsqerr(n)},0)/(t.reduce(function(e,t){return e+t.length},0)-t.length)},e.deviation=function(t){for(var n=e.mean(t),r=t.length,i=new Array(r),o=0;o=0;o--)i.push(t.abs(n[o]-r));return e.mean(i)},e.meddev=function(n){for(var r=e.median(n),i=[],o=n.length-1;o>=0;o--)i.push(t.abs(n[o]-r));return e.median(i)},e.coeffvar=function(t){return e.stdev(t)/e.mean(t)},e.quartiles=function(e){var n=e.length,i=e.slice().sort(r);return[i[t.round(n/4)-1],i[t.round(n/2)-1],i[t.round(3*n/4)-1]]},e.quantiles=function(e,n,o,a){var s,l,c,u,f=e.slice().sort(r),h=[n.length],d=e.length;"undefined"===typeof o&&(o=3/8),"undefined"===typeof a&&(a=3/8);for(var p=0;p1){for(l=!0===r?this:this.transpose();s1){for("sumrow"!==t&&(l=!0===r?this:this.transpose());s1){for(a=a.transpose();if)for(h=0;h=1?n:1/n)+.4*n+17);if(r<0||n<=0)return NaN;if(r170||r>170?t.exp(e.combinationln(n,r)):e.factorial(n)/e.factorial(r)/e.factorial(n-r)},e.combinationln=function(t,n){return e.factorialln(t)-e.factorialln(n)-e.factorialln(t-n)},e.permutation=function(t,n){return e.factorial(t)/e.factorial(t-n)},e.betafn=function(n,r){if(!(n<=0||r<=0))return n+r>170?t.exp(e.betaln(n,r)):e.gammafn(n)*e.gammafn(r)/e.gammafn(n+r)},e.betaln=function(t,n){return e.gammaln(t)+e.gammaln(n)-e.gammaln(t+n)},e.betacf=function(e,n,r){var i,o,a,s,l=1,c=n+r,u=n+1,f=n-1,h=1,d=1-c*e/u;for(t.abs(d)<1e-30&&(d=1e-30),s=d=1/d;l<=100&&(d=1+(o=l*(r-l)*e/((f+(i=2*l))*(n+i)))*d,t.abs(d)<1e-30&&(d=1e-30),h=1+o/h,t.abs(h)<1e-30&&(h=1e-30),s*=(d=1/d)*h,d=1+(o=-(n+l)*(c+l)*e/((n+i)*(u+i)))*d,t.abs(d)<1e-30&&(d=1e-30),h=1+o/h,t.abs(h)<1e-30&&(h=1e-30),s*=a=(d=1/d)*h,!(t.abs(a-1)<3e-7));l++);return s},e.gammapinv=function(n,r){var i,o,a,s,l,c,u=0,f=r-1,h=e.gammaln(r);if(n>=1)return t.max(100,r+100*t.sqrt(r));if(n<=0)return 0;for(r>1?(l=t.log(f),c=t.exp(f*(l-1)-h),s=n<.5?n:1-n,i=(2.30753+.27061*(o=t.sqrt(-2*t.log(s))))/(1+o*(.99229+.04481*o))-o,n<.5&&(i=-i),i=t.max(.001,r*t.pow(1-1/(9*r)-i/(3*t.sqrt(r)),3))):i=n<(o=1-r*(.253+.12*r))?t.pow(n/o,1/r):1-t.log(1-(n-o)/(1-o));u<12;u++){if(i<=0)return 0;if((i-=o=(a=(e.lowRegGamma(r,i)-n)/(o=r>1?c*t.exp(-(i-f)+f*(t.log(i)-l)):t.exp(-i+f*t.log(i)-h)))/(1-.5*t.min(1,a*((r-1)/i-1))))<=0&&(i=.5*(i+o)),t.abs(o)<1e-8*i)break}return i},e.erf=function(e){var n,r,i,o,a=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,9.6467911e-11,2.394038e-12,-6.886027e-12,8.94487e-13,3.13092e-13,-1.12708e-13,3.81e-16,7.106e-15,-1.523e-15,-9.4e-17,1.21e-16,-2.8e-17],s=a.length-1,l=!1,c=0,u=0;for(e<0&&(e=-e,l=!0),r=4*(n=2/(2+e))-2;s>0;s--)i=c,c=r*c-u+a[s],u=i;return o=n*t.exp(-e*e+.5*(a[0]+r*c)-u),l?o-1:1-o},e.erfc=function(t){return 1-e.erf(t)},e.erfcinv=function(n){var r,i,o,a,s=0;if(n>=2)return-100;if(n<=0)return 100;for(a=n<1?n:2-n,r=-.70711*((2.30753+.27061*(o=t.sqrt(-2*t.log(a/2))))/(1+o*(.99229+.04481*o))-o);s<2;s++)r+=(i=e.erfc(r)-a)/(1.1283791670955126*t.exp(-r*r)-r*i);return n<1?r:-r},e.ibetainv=function(n,r,i){var o,a,s,l,c,u,f,h,d,p,m=r-1,v=i-1,g=0;if(n<=0)return 0;if(n>=1)return 1;for(r>=1&&i>=1?(s=n<.5?n:1-n,u=(2.30753+.27061*(l=t.sqrt(-2*t.log(s))))/(1+l*(.99229+.04481*l))-l,n<.5&&(u=-u),f=(u*u-3)/6,h=2/(1/(2*r-1)+1/(2*i-1)),d=u*t.sqrt(f+h)/h-(1/(2*i-1)-1/(2*r-1))*(f+5/6-2/(3*h)),u=r/(r+i*t.exp(2*d))):(o=t.log(r/(r+i)),a=t.log(i/(r+i)),u=n<(l=t.exp(r*o)/r)/(d=l+(c=t.exp(i*a)/i))?t.pow(r*d*n,1/r):1-t.pow(i*d*(1-n),1/i)),p=-e.gammaln(r)-e.gammaln(i)+e.gammaln(r+i);g<10;g++){if(0===u||1===u)return u;if((u-=l=(c=(e.ibeta(u,r,i)-n)/(l=t.exp(m*t.log(u)+v*t.log(1-u)+p)))/(1-.5*t.min(1,c*(m/u-v/(1-u)))))<=0&&(u=.5*(u+l)),u>=1&&(u=.5*(u+l+1)),t.abs(l)<1e-8*u&&g>0)break}return u},e.ibeta=function(n,r,i){var o=0===n||1===n?0:t.exp(e.gammaln(r+i)-e.gammaln(r)-e.gammaln(i)+r*t.log(n)+i*t.log(1-n));return!(n<0||n>1)&&(n<(r+1)/(r+i+2)?o*e.betacf(n,r,i)/r:1-o*e.betacf(1-n,i,r)/i)},e.randn=function(n,r){var i,o,a,s,l;if(r||(r=n),n)return e.create(n,r,function(){return e.randn()});do{i=t.random(),o=1.7156*(t.random()-.5),l=(a=i-.449871)*a+(s=t.abs(o)+.386595)*(.196*s-.25472*a)}while(l>.27597&&(l>.27846||o*o>-4*t.log(i)*i*i));return o/i},e.randg=function(n,r,i){var o,a,s,l,c,u,f=n;if(i||(i=r),n||(n=1),r)return(u=e.zeros(r,i)).alter(function(){return e.randg(n)}),u;n<1&&(n+=1),o=n-1/3,a=1/t.sqrt(9*o);do{do{l=1+a*(c=e.randn())}while(l<=0);l*=l*l,s=t.random()}while(s>1-.331*t.pow(c,4)&&t.log(s)>.5*c*c+o*(1-l+t.log(l)));if(n==f)return o*l;do{s=t.random()}while(0===s);return t.pow(s,1/f)*o*l},function(t){for(var n=0;n=8)return 1;var l,c=2*e.normal.cdf(s,0,1,1,0)-1;c=c>=t.exp(-50/i)?t.pow(c,i):0;for(var u=s,f=(8-s)/(l=n>3?2:3),h=u+f,d=0,p=i-1,m=1;m<=l;m++){for(var v=0,g=.5*(h+u),y=.5*(h-u),b=1;b<=12;b++){var w,_=g+y*(660)break;var E=2*e.normal.cdf(_,0,1,1,0)*.5-2*e.normal.cdf(_,n,1,1,0)*.5;E>=t.exp(-30/p)&&(v+=E=a[w-1]*t.exp(-.5*S)*t.pow(E,p))}d+=v*=2*y*i/t.sqrt(2*t.PI),u=h,h+=f}return(c+=d)<=t.exp(-30/r)?0:(c=t.pow(c,r))>=1?1:c}!function(t){for(var n=0;n1||n<0?0:1==r&&1==i?1:r<512&&i<512?t.pow(n,r-1)*t.pow(1-n,i-1)/e.betafn(r,i):t.exp((r-1)*t.log(n)+(i-1)*t.log(1-n)-e.betaln(r,i))},cdf:function(t,n,r){return t>1||t<0?1*(t>1):e.ibeta(t,n,r)},inv:function(t,n,r){return e.ibetainv(t,n,r)},mean:function(e,t){return e/(e+t)},median:function(t,n){return e.ibetainv(.5,t,n)},mode:function(e,t){return(e-1)/(e+t-2)},sample:function(t,n){var r=e.randg(t);return r/(r+e.randg(n))},variance:function(e,n){return e*n/(t.pow(e+n,2)*(e+n+1))}}),e.extend(e.centralF,{pdf:function(n,r,i){var o;return n<0?0:r<=2?0===n&&r<2?1/0:0===n&&2===r?1:1/e.betafn(r/2,i/2)*t.pow(r/i,r/2)*t.pow(n,r/2-1)*t.pow(1+r/i*n,-(r+i)/2):(o=r*n/(i+n*r),r*(i/(i+n*r))/2*e.binomial.pdf((r-2)/2,(r+i-2)/2,o))},cdf:function(t,n,r){return t<0?0:e.ibeta(n*t/(n*t+r),n/2,r/2)},inv:function(t,n,r){return r/(n*(1/e.ibetainv(t,n/2,r/2)-1))},mean:function(e,t){return t>2?t/(t-2):void 0},mode:function(e,t){return e>2?t*(e-2)/(e*(t+2)):void 0},sample:function(t,n){return 2*e.randg(t/2)/t/(2*e.randg(n/2)/n)},variance:function(e,t){if(!(t<=4))return 2*t*t*(e+t-2)/(e*(t-2)*(t-2)*(t-4))}}),e.extend(e.cauchy,{pdf:function(e,n,r){return r<0?0:r/(t.pow(e-n,2)+t.pow(r,2))/t.PI},cdf:function(e,n,r){return t.atan((e-n)/r)/t.PI+.5},inv:function(e,n,r){return n+r*t.tan(t.PI*(e-.5))},median:function(e,t){return e},mode:function(e,t){return e},sample:function(n,r){return e.randn()*t.sqrt(1/(2*e.randg(.5)))*r+n}}),e.extend(e.chisquare,{pdf:function(n,r){return n<0?0:0===n&&2===r?.5:t.exp((r/2-1)*t.log(n)-n/2-r/2*t.log(2)-e.gammaln(r/2))},cdf:function(t,n){return t<0?0:e.lowRegGamma(n/2,t/2)},inv:function(t,n){return 2*e.gammapinv(t,.5*n)},mean:function(e){return e},median:function(e){return e*t.pow(1-2/(9*e),3)},mode:function(e){return e-2>0?e-2:0},sample:function(t){return 2*e.randg(t/2)},variance:function(e){return 2*e}}),e.extend(e.exponential,{pdf:function(e,n){return e<0?0:n*t.exp(-n*e)},cdf:function(e,n){return e<0?0:1-t.exp(-n*e)},inv:function(e,n){return-t.log(1-e)/n},mean:function(e){return 1/e},median:function(e){return 1/e*t.log(2)},mode:function(e){return 0},sample:function(e){return-1/e*t.log(t.random())},variance:function(e){return t.pow(e,-2)}}),e.extend(e.gamma,{pdf:function(n,r,i){return n<0?0:0===n&&1===r?1/i:t.exp((r-1)*t.log(n)-n/i-e.gammaln(r)-r*t.log(i))},cdf:function(t,n,r){return t<0?0:e.lowRegGamma(n,t/r)},inv:function(t,n,r){return e.gammapinv(t,n)*r},mean:function(e,t){return e*t},mode:function(e,t){if(e>1)return(e-1)*t},sample:function(t,n){return e.randg(t)*n},variance:function(e,t){return e*t*t}}),e.extend(e.invgamma,{pdf:function(n,r,i){return n<=0?0:t.exp(-(r+1)*t.log(n)-i/n-e.gammaln(r)+r*t.log(i))},cdf:function(t,n,r){return t<=0?0:1-e.lowRegGamma(n,r/t)},inv:function(t,n,r){return r/e.gammapinv(1-t,n)},mean:function(e,t){return e>1?t/(e-1):void 0},mode:function(e,t){return t/(e+1)},sample:function(t,n){return n/e.randg(t)},variance:function(e,t){if(!(e<=2))return t*t/((e-1)*(e-1)*(e-2))}}),e.extend(e.kumaraswamy,{pdf:function(e,n,r){return 0===e&&1===n?r:1===e&&1===r?n:t.exp(t.log(n)+t.log(r)+(n-1)*t.log(e)+(r-1)*t.log(1-t.pow(e,n)))},cdf:function(e,n,r){return e<0?0:e>1?1:1-t.pow(1-t.pow(e,n),r)},inv:function(e,n,r){return t.pow(1-t.pow(1-e,1/r),1/n)},mean:function(t,n){return n*e.gammafn(1+1/t)*e.gammafn(n)/e.gammafn(1+1/t+n)},median:function(e,n){return t.pow(1-t.pow(2,-1/n),1/e)},mode:function(e,n){if(e>=1&&n>=1&&1!==e&&1!==n)return t.pow((e-1)/(e*n-1),1/e)},variance:function(e,t){throw new Error("variance not yet implemented")}}),e.extend(e.lognormal,{pdf:function(e,n,r){return e<=0?0:t.exp(-t.log(e)-.5*t.log(2*t.PI)-t.log(r)-t.pow(t.log(e)-n,2)/(2*r*r))},cdf:function(n,r,i){return n<0?0:.5+.5*e.erf((t.log(n)-r)/t.sqrt(2*i*i))},inv:function(n,r,i){return t.exp(-1.4142135623730951*i*e.erfcinv(2*n)+r)},mean:function(e,n){return t.exp(e+n*n/2)},median:function(e,n){return t.exp(e)},mode:function(e,n){return t.exp(e-n*n)},sample:function(n,r){return t.exp(e.randn()*r+n)},variance:function(e,n){return(t.exp(n*n)-1)*t.exp(2*e+n*n)}}),e.extend(e.noncentralt,{pdf:function(n,r,i){return t.abs(i)<1e-14?e.studentt.pdf(n,r):t.abs(n)<1e-14?t.exp(e.gammaln((r+1)/2)-i*i/2-.5*t.log(t.PI*r)-e.gammaln(r/2)):r/n*(e.noncentralt.cdf(n*t.sqrt(1+2/r),r+2,i)-e.noncentralt.cdf(n,r,i))},cdf:function(n,r,i){if(t.abs(i)<1e-14)return e.studentt.cdf(n,r);var o=!1;n<0&&(o=!0,i=-i);for(var a=e.normal.cdf(-i,0,1),s=1e-14+1,l=s,c=n*n/(n*n+r),u=0,f=t.exp(-i*i/2),h=t.exp(-i*i/2-.5*t.log(2)-e.gammaln(1.5))*i;u<200||l>1e-14||s>1e-14;)l=s,u>0&&(f*=i*i/(2*u),h*=i*i/(2*(u+.5))),a+=.5*(s=f*e.beta.cdf(c,u+.5,r/2)+h*e.beta.cdf(c,u+1,r/2)),u++;return o?1-a:a}}),e.extend(e.normal,{pdf:function(e,n,r){return t.exp(-.5*t.log(2*t.PI)-t.log(r)-t.pow(e-n,2)/(2*r*r))},cdf:function(n,r,i){return.5*(1+e.erf((n-r)/t.sqrt(2*i*i)))},inv:function(t,n,r){return-1.4142135623730951*r*e.erfcinv(2*t)+n},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},sample:function(t,n){return e.randn()*n+t},variance:function(e,t){return t*t}}),e.extend(e.pareto,{pdf:function(e,n,r){return e1e100?1e100:r,1/(t.sqrt(r)*e.betafn(.5,r/2))*t.pow(1+n*n/r,-(r+1)/2)},cdf:function(n,r){var i=r/2;return e.ibeta((n+t.sqrt(n*n+r))/(2*t.sqrt(n*n+r)),i,i)},inv:function(n,r){var i=e.ibetainv(2*t.min(n,1-n),.5*r,.5);return i=t.sqrt(r*(1-i)/i),n>.5?i:-i},mean:function(e){return e>1?0:void 0},median:function(e){return 0},mode:function(e){return 0},sample:function(n){return e.randn()*t.sqrt(n/(2*e.randg(n/2)))},variance:function(e){return e>2?e/(e-2):e>1?1/0:void 0}}),e.extend(e.weibull,{pdf:function(e,n,r){return e<0||n<0||r<0?0:r/n*t.pow(e/n,r-1)*t.exp(-t.pow(e/n,r))},cdf:function(e,n,r){return e<0?0:1-t.exp(-t.pow(e/n,r))},inv:function(e,n,r){return n*t.pow(-t.log(1-e),1/r)},mean:function(t,n){return t*e.gammafn(1+1/n)},median:function(e,n){return e*t.pow(t.log(2),1/n)},mode:function(e,n){return n<=1?0:e*t.pow((n-1)/n,1/n)},sample:function(e,n){return e*t.pow(-t.log(t.random()),1/n)},variance:function(n,r){return n*n*e.gammafn(1+2/r)-t.pow(e.weibull.mean(n,r),2)}}),e.extend(e.uniform,{pdf:function(e,t,n){return en?0:1/(n-t)},cdf:function(e,t,n){return e>>0&&(n<0?0:e.combination(n+r-1,r-1)*t.pow(1-i,n)*t.pow(i,r))},cdf:function(t,n,r){var i=0,o=0;if(t<0)return 0;for(;o<=t;o++)i+=e.negbin.pdf(o,n,r);return i}}),e.extend(e.hypgeom,{pdf:function(n,r,i,o){if(n!==n|0)return!1;if(n<0||no||n>i)return 0;if(2*i>r)return 2*o>r?e.hypgeom.pdf(r-i-o+n,r,r-i,r-o):e.hypgeom.pdf(o-n,r,r-i,o);if(2*o>r)return e.hypgeom.pdf(i-n,r,i,r-o);if(i1&&s=o||n>=i)return 1;if(2*i>r)return 2*o>r?e.hypgeom.cdf(r-i-o+n,r,r-i,r-o):1-e.hypgeom.cdf(o-n-1,r,r-i,o);if(2*o>r)return 1-e.hypgeom.cdf(i-n-1,r,i,r-o);if(i1&&li);return r-1}}),e.extend(e.triangular,{pdf:function(e,t,n,r){return n<=t||rn?NaN:en?0:er?NaN:e<=n?0:e>=r?1:e<=i?t.pow(e-n,2)/((r-n)*(i-n)):1-t.pow(r-e,2)/((r-n)*(r-i))},inv:function(e,n,r,i){return r<=n||ir?NaN:e<=(i-n)/(r-n)?n+(r-n)*t.sqrt(e*((i-n)/(r-n))):n+(r-n)*(1-t.sqrt((1-e)*(1-(i-n)/(r-n))))},mean:function(e,t,n){return(e+t+n)/3},median:function(e,n,r){return r<=(e+n)/2?n-t.sqrt((n-e)*(n-r))/t.sqrt(2):r>(e+n)/2?e+t.sqrt((n-e)*(r-e))/t.sqrt(2):void 0},mode:function(e,t,n){return n},sample:function(e,n,r){var i=t.random();return i<(r-e)/(n-e)?e+t.sqrt(i*(n-e)*(r-e)):n-t.sqrt((1-i)*(n-e)*(n-r))},variance:function(e,t,n){return(e*e+t*t+n*n-e*t-e*n-t*n)/18}}),e.extend(e.arcsine,{pdf:function(e,n,r){return r<=n?NaN:e<=n||e>=r?0:2/t.PI*t.pow(t.pow(r-n,2)-t.pow(2*e-n-r,2),-.5)},cdf:function(e,n,r){return e25e3)return n(r,1,a);var c,u=.5*o,f=u*t.log(o)-o*t.log(2)-e.gammaln(u),h=u-1,d=.25*o;c=o<=100?1:o<=800?.5:o<=5e3?.25:.125,f+=t.log(c);for(var p=0,m=1;m<=50;m++){for(var v=0,g=(2*m-1)*c,y=1;y<=16;y++){var b,w;8=-30&&(v+=n(8=1&&v<=1e-14)break;p+=v}if(v>1e-14)throw new Error("tukey.cdf failed to converge");return p>1&&(p=1),p},inv:function(n,r,i){if(i<2||r<2)return NaN;if(n<0||n>1)return NaN;if(0===n)return 0;if(1===n)return 1/0;var o,a=function(e,n,r){var i=.5-.5*e,o=t.sqrt(t.log(1/(i*i))),a=o+((((-453642210148e-16*o-.204231210125)*o-.342242088547)*o-1)*o+.322232421088)/((((.0038560700634*o+.10353775285)*o+.531103462366)*o+.588581570495)*o+.099348462606);r<120&&(a+=(a*a*a+a)/r/4);var s=.8832-.2368*a;return r<120&&(s+=-1.214/r+1.208*a/r),a*(s*t.log(n-1)+1.4142)}(n,r,i),s=e.tukey.cdf(a,r,i)-n;o=s>0?t.max(0,a-1):a+1;for(var l,c=e.tukey.cdf(o,r,i)-n,u=1;u<50;u++)if(l=o-c*(o-a)/(c-s),s=c,a=o,l<0&&(l=0,c=-n),c=e.tukey.cdf(l,r,i)-n,o=l,t.abs(o-a)<1e-4)return l;throw new Error("tukey.inv failed to converge")}})}(e,Math),function(e,t){var n=Array.prototype.push,o=e.utils.isArray;function a(t){return o(t)||t instanceof e}e.extend({add:function(t,n){return a(n)?(a(n[0])||(n=[n]),e.map(t,function(e,t,r){return e+n[t][r]})):e.map(t,function(e){return e+n})},subtract:function(t,n){return a(n)?(a(n[0])||(n=[n]),e.map(t,function(e,t,r){return e-n[t][r]||0})):e.map(t,function(e){return e-n})},divide:function(t,n){return a(n)?(a(n[0])||(n=[n]),e.multiply(t,e.inv(n))):e.map(t,function(e){return e/n})},multiply:function(t,n){var r,i,o,s,l,c,u,f;if(void 0===t.length&&void 0===n.length)return t*n;if(l=t.length,c=t[0].length,u=e.zeros(l,o=a(n)?n[0].length:c),f=0,a(n)){for(;f=0;l--){for(d=0,c=l+1;c<=u-1;c++)d+=p[c]*n[l][c];p[l]=(n[l][i-1]-d)/n[l][l]}return p},gauss_jordan:function(n,r){for(var i=e.aug(n,r),o=i.length,a=i[0].length,s=0,l=0;lt.abs(i[c][l])&&(c=u);var f=i[l];for(i[l]=i[c],i[c]=f,u=l+1;u=0;l--){for(s=i[l][l],u=0;ul-1;h--)i[u][h]-=i[l][h]*i[u][l]/s;for(i[l][l]/=s,h=o;hf?(d[u][f]=n[u][f],p[u][f]=m[u][f]=0):uo;)a=c,c=e.add(e.multiply(l,a),s),u++;return c},gauss_seidel:function(n,r,i,o){for(var a,s,l,c,u,f=0,h=n.length,d=[],p=[],m=[];fa?(d[f][a]=n[f][a],p[f][a]=m[f][a]=0):fo;)s=u,u=e.add(e.multiply(c,s),l),f+=1;return u},SOR:function(n,r,i,o,a){for(var s,l,c,u,f,h=0,d=n.length,p=[],m=[],v=[];hs?(p[h][s]=n[h][s],m[h][s]=v[h][s]=0):ho;)l=f,f=e.add(e.multiply(u,l),c),h++;return f},householder:function(n){for(var r,i,o,a,s=n.length,l=n[0].length,c=0,u=[],f=[];c0?-1:1)*t.sqrt(r),i=t.sqrt((r*r-n[c+1][c]*r)/2),(u=e.zeros(s,1))[c+1][0]=(n[c+1][c]-r)/(2*i),o=c+2;o0?t.PI/4:-t.PI/4:t.atan(2*n[i][o]/(n[i][i]-n[o][o]))/2,(l=e.identity(u,u))[i][i]=t.cos(s),l[i][o]=-t.sin(s),l[o][i]=t.sin(s),l[o][o]=t.cos(s),f=e.multiply(f,l),n=e.multiply(e.multiply(e.inv(l),n),l),c=0,d=1;d.001&&(c=1)}for(d=0;d=f;)a=o(e,r+i),s=o(e,r),d[h]=(n[a]-2*n[s]+n[2*s-a])/(i*i),i/=2,h++;for(c=d.length,l=1;1!=c;){for(u=0;ur);i++);return n[i-=1]+(r-t[i])*h[i]+e.sq(r-t[i])*o[i]+(r-t[i])*e.sq(r-t[i])*d[i]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(t){var n,r,i,o,a,s=t.length,l=t[0].length,c=0,u=[],f=[],h=[],d=[],p=[],m=[],v=[];for(c=0;c1||r>1||e<=0||r<=0)throw new Error("Proportions should be greater than 0 and less than 1");var o=(e*n+r*i)/(n+i);return(e-r)/t.sqrt(o*(1-o)*(1/n+1/i))}e.extend({zscore:function(){var t=n.call(arguments);return r(t[1])?(t[0]-t[1])/t[2]:(t[0]-e.mean(t[1]))/e.stdev(t[1],t[2])},ztest:function(){var r,o=n.call(arguments);return i(o[1])?(r=e.zscore(o[0],o[1],o[3]),1===o[2]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1)):o.length>2?(r=e.zscore(o[0],o[1],o[2]),1===o[3]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1)):(r=o[0],1===o[1]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1))}}),e.extend(e.fn,{zscore:function(e,t){return(e-this.mean())/this.stdev(t)},ztest:function(n,r,i){var o=t.abs(this.zscore(n,i));return 1===r?e.normal.cdf(-o,0,1):2*e.normal.cdf(-o,0,1)}}),e.extend({tscore:function(){var r=n.call(arguments);return 4===r.length?(r[0]-r[1])/(r[2]/t.sqrt(r[3])):(r[0]-e.mean(r[1]))/(e.stdev(r[1],!0)/t.sqrt(r[1].length))},ttest:function(){var i,o=n.call(arguments);return 5===o.length?(i=t.abs(e.tscore(o[0],o[1],o[2],o[3])),1===o[4]?e.studentt.cdf(-i,o[3]-1):2*e.studentt.cdf(-i,o[3]-1)):r(o[1])?(i=t.abs(o[0]),1==o[2]?e.studentt.cdf(-i,o[1]-1):2*e.studentt.cdf(-i,o[1]-1)):(i=t.abs(e.tscore(o[0],o[1])),1==o[2]?e.studentt.cdf(-i,o[1].length-1):2*e.studentt.cdf(-i,o[1].length-1))}}),e.extend(e.fn,{tscore:function(e){return(e-this.mean())/(this.stdev(!0)/t.sqrt(this.cols()))},ttest:function(n,r){return 1===r?1-e.studentt.cdf(t.abs(this.tscore(n)),this.cols()-1):2*e.studentt.cdf(-t.abs(this.tscore(n)),this.cols()-1)}}),e.extend({anovafscore:function(){var r,i,o,a,s,l,c,u=n.call(arguments);if(1===u.length){s=new Array(u[0].length);for(var f=0;f.5?1-r:r)}),l=e.studentt.inv(.975,n.df_resid),c=n.coef.map(function(e,t){var n=l*o[t];return[e-n,e+n]});return{se:o,t:a,p:s,sigmaHat:i,interval95:c}}return{ols:function(r,i){var o=t(r,i),a=n(o),s=function(t){var n,r,i,o=t.R2/t.df_model/((1-t.R2)/t.df_resid);return{F_statistic:o,pvalue:1-(n=o,r=t.df_model,i=t.df_resid,e.beta.cdf(n/(i/r+n),r/2,i/2))}}(o),l=1-(1-o.R2)*((o.nobs-1)/o.df_resid);return o.t=a,o.f=s,o.adjust_R2=l,o}}}(),e}()},function(e,t,n){var r=n(1),i=n(0);t.UNIQUE=function(){for(var e=[],t=0;t=i.length?o.REPT("0",t-i.length)+i:r.num},t.BIN2OCT=function(e,t){if(!l(e))return r.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(1073741312+parseInt(n.substring(1),2)).toString(8);var i=parseInt(e,2).toString(8);return void 0===t?i:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=i.length?o.REPT("0",t-i.length)+i:r.num},t.BITAND=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e&t},t.BITLSHIFT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0?r.num:Math.floor(e)!==e?r.num:e>0xffffffffffff?r.num:Math.abs(t)>53?r.num:t>=0?e<>-t},t.BITOR=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e|t},t.BITRSHIFT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0?r.num:Math.floor(e)!==e?r.num:e>0xffffffffffff?r.num:Math.abs(t)>53?r.num:t>=0?e>>t:e<<-t},t.BITXOR=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e^t},t.COMPLEX=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t))return e;if("i"!==(n=void 0===n?"i":n)&&"j"!==n)return r.value;if(0===e&&0===t)return 0;if(0===e)return 1===t?n:t.toString()+n;if(0===t)return e.toString();var i=t>0?"+":"";return e.toString()+i+(1===t?n:t.toString()+n)},t.CONVERT=function(e,t,n){if((e=a.parseNumber(e))instanceof Error)return e;for(var i,o=[["a.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["a.u. of charge","e",null,"electric_charge",!1,!1,1.60217653141414e-19],["a.u. of energy","Eh",null,"energy",!1,!1,4.35974417757576e-18],["a.u. of length","a?",null,"length",!1,!1,5.29177210818182e-11],["a.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["a.u. of time","?/Eh",null,"time",!1,!1,2.41888432650516e-17],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["\xe5ngstr\xf6m","\xc5",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,1.49597870691667e-11],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic \xe5ngstr\xf6m","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,8.46786664623715e-47],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,1.66053886282828e-27],["day","d",["day"],"time",!1,!0,86400],["degree","\xb0",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["n.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,1.28808866778687e-21],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["\u0153rsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","\u03a9",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdest\xe4rke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square \xe5ngstr\xf6m","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,8.95054210748189e31],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],s={Yi:["yobi",80,1.2089258196146292e24,"Yi","yotta"],Zi:["zebi",70,0x400000000000000000,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},l={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},c=null,u=null,f=t,h=n,d=1,p=1,m=0;m=0)&&(c=o[m]),(o[m][1]===h||i.indexOf(h)>=0)&&(u=o[m]);if(null===c){var v=s[t.substring(0,2)],g=l[t.substring(0,1)];"da"===t.substring(0,2)&&(g=["dekao",10,"da"]),v?(d=v[2],f=t.substring(2)):g&&(d=g[1],f=t.substring(g[2].length));for(var y=0;y=0)&&(c=o[y])}if(null===u){var b=s[n.substring(0,2)],w=l[n.substring(0,1)];"da"===n.substring(0,2)&&(w=["dekao",10,"da"]),b?(p=b[2],h=n.substring(2)):w&&(p=w[1],h=n.substring(w[2].length));for(var _=0;_=0)&&(u=o[_])}return null===c||null===u?r.na:c[3]!==u[3]?r.na:e*c[6]*d/(u[6]*p)},t.DEC2BIN=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,3}$/.test(e)||e<-512||e>511)return r.num;if(e<0)return"1"+o.REPT("0",9-(512+e).toString(2).length)+(512+e).toString(2);var n=parseInt(e,10).toString(2);return"undefined"===typeof t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?o.REPT("0",t-n.length)+n:r.num},t.DEC2HEX=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,12}$/.test(e)||e<-549755813888||e>549755813887)return r.num;if(e<0)return(1099511627776+e).toString(16);var n=parseInt(e,10).toString(16);return"undefined"===typeof t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?o.REPT("0",t-n.length)+n:r.num},t.DEC2OCT=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,9}$/.test(e)||e<-536870912||e>536870911)return r.num;if(e<0)return(1073741824+e).toString(8);var n=parseInt(e,10).toString(8);return"undefined"===typeof t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?o.REPT("0",t-n.length)+n:r.num},t.DELTA=function(e,t){return t=void 0===t?0:t,e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e===t?1:0},t.ERF=function(e,t){return t=void 0===t?0:t,e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:i.erf(e)},t.ERF.PRECISE=function(){throw new Error("ERF.PRECISE is not implemented")},t.ERFC=function(e){return isNaN(e)?r.value:i.erfc(e)},t.ERFC.PRECISE=function(){throw new Error("ERFC.PRECISE is not implemented")},t.GESTEP=function(e,t){return t=t||0,e=a.parseNumber(e),a.anyIsError(t,e)?e:e>=t?1:0},t.HEX2BIN=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var n=10===e.length&&"f"===e.substring(0,1).toLowerCase(),i=n?parseInt(e,16)-1099511627776:parseInt(e,16);if(i<-512||i>511)return r.num;if(n)return"1"+o.REPT("0",9-(512+i).toString(2).length)+(512+i).toString(2);var a=i.toString(2);return void 0===t?a:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=a.length?o.REPT("0",t-a.length)+a:r.num},t.HEX2DEC=function(e){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var t=parseInt(e,16);return t>=549755813888?t-1099511627776:t},t.HEX2OCT=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var n=parseInt(e,16);if(n>536870911&&n<0xffe0000000)return r.num;if(n>=0xffe0000000)return(n-0xffc0000000).toString(8);var i=n.toString(8);return void 0===t?i:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=i.length?o.REPT("0",t-i.length)+i:r.num},t.IMABS=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.value:Math.sqrt(Math.pow(n,2)+Math.pow(i,2))},t.IMAGINARY=function(e){if(void 0===e||!0===e||!1===e)return r.value;if(0===e||"0"===e)return 0;if(["i","j"].indexOf(e)>=0)return 1;var t=(e=e.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j")).indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var i=e.substring(e.length-1,e.length),o="i"===i||"j"===i;return t>=0||n>=0?o?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?r.num:Number(e.substring(t+1,e.length-1)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?r.num:-Number(e.substring(n+1,e.length-1)):r.num:o?isNaN(e.substring(0,e.length-1))?r.num:e.substring(0,e.length-1):isNaN(e)?r.num:0},t.IMARGUMENT=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.value:0===n&&0===i?r.div0:0===n&&i>0?Math.PI/2:0===n&&i<0?-Math.PI/2:0===i&&n>0?0:0===i&&n<0?-Math.PI:n>0?Math.atan(i/n):n<0&&i>=0?Math.atan(i/n)+Math.PI:Math.atan(i/n)-Math.PI},t.IMCONJUGATE=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",0!==i?t.COMPLEX(n,-i,o):e},t.IMCOS=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.cos(n)*(Math.exp(i)+Math.exp(-i))/2,-Math.sin(n)*(Math.exp(i)-Math.exp(-i))/2,o)},t.IMCOSH=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.cos(i)*(Math.exp(n)+Math.exp(-n))/2,Math.sin(i)*(Math.exp(n)-Math.exp(-n))/2,o)},t.IMCOT=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.value:t.IMDIV(t.IMCOS(e),t.IMSIN(e))},t.IMDIV=function(e,n){var i=t.IMREAL(e),o=t.IMAGINARY(e),s=t.IMREAL(n),l=t.IMAGINARY(n);if(a.anyIsError(i,o,s,l))return r.value;var c=e.substring(e.length-1),u=n.substring(n.length-1),f="i";if("j"===c?f="j":"j"===u&&(f="j"),0===s&&0===l)return r.num;var h=s*s+l*l;return t.COMPLEX((i*s+o*l)/h,(o*s-i*l)/h,f)},t.IMEXP=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);o="i"===o||"j"===o?o:"i";var s=Math.exp(n);return t.COMPLEX(s*Math.cos(i),s*Math.sin(i),o)},t.IMLN=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+i*i)),Math.atan(i/n),o)},t.IMLOG10=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+i*i))/Math.log(10),Math.atan(i/n)/Math.log(10),o)},t.IMLOG2=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+i*i))/Math.log(2),Math.atan(i/n)/Math.log(2),o)},t.IMPOWER=function(e,n){n=a.parseNumber(n);var i=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,i,o))return r.value;var s=e.substring(e.length-1);s="i"===s||"j"===s?s:"i";var l=Math.pow(t.IMABS(e),n),c=t.IMARGUMENT(e);return t.COMPLEX(l*Math.cos(n*c),l*Math.sin(n*c),s)},t.IMPRODUCT=function(){var e=arguments[0];if(!arguments.length)return r.value;for(var n=1;n=0)return 0;var t=e.indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var i=e.substring(e.length-1,e.length),o="i"===i||"j"===i;return t>=0||n>=0?o?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?r.num:Number(e.substring(0,t)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?r.num:Number(e.substring(0,n)):r.num:o?isNaN(e.substring(0,e.length-1))?r.num:0:isNaN(e)?r.num:e},t.IMSEC=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.value:t.IMDIV("1",t.IMCOS(e))},t.IMSECH=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.value:t.IMDIV("1",t.IMCOSH(e))},t.IMSIN=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.sin(n)*(Math.exp(i)+Math.exp(-i))/2,Math.cos(n)*(Math.exp(i)-Math.exp(-i))/2,o)},t.IMSINH=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.cos(i)*(Math.exp(n)-Math.exp(-n))/2,Math.sin(i)*(Math.exp(n)+Math.exp(-n))/2,o)},t.IMSQRT=function(e){var n=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,i))return r.value;var o=e.substring(e.length-1);o="i"===o||"j"===o?o:"i";var s=Math.sqrt(t.IMABS(e)),l=t.IMARGUMENT(e);return t.COMPLEX(s*Math.cos(l/2),s*Math.sin(l/2),o)},t.IMCSC=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.num:t.IMDIV("1",t.IMSIN(e))},t.IMCSCH=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),i=t.IMAGINARY(e);return a.anyIsError(n,i)?r.num:t.IMDIV("1",t.IMSINH(e))},t.IMSUB=function(e,t){var n=this.IMREAL(e),i=this.IMAGINARY(e),o=this.IMREAL(t),s=this.IMAGINARY(t);if(a.anyIsError(n,i,o,s))return r.value;var l=e.substring(e.length-1),c=t.substring(t.length-1),u="i";return"j"===l?u="j":"j"===c&&(u="j"),this.COMPLEX(n-o,i-s,u)},t.IMSUM=function(){if(!arguments.length)return r.value;for(var e=a.flatten(arguments),t=e[0],n=1;n511)return r.num;if(n)return"1"+o.REPT("0",9-(512+i).toString(2).length)+(512+i).toString(2);var a=i.toString(2);return"undefined"===typeof t?a:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=a.length?o.REPT("0",t-a.length)+a:r.num},t.OCT2DEC=function(e){if(!/^[0-7]{1,10}$/.test(e))return r.num;var t=parseInt(e,8);return t>=536870912?t-1073741824:t},t.OCT2HEX=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return r.num;var n=parseInt(e,8);if(n>=536870912)return"ff"+(n+3221225472).toString(16);var i=n.toString(16);return void 0===t?i:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=i.length?o.REPT("0",t-i.length)+i:r.num}},function(e,t,n){"use strict";t.__esModule=!0;t.default=["ABS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","ADD","AGGREGATE","AND","ARABIC","ARGS2ARRAY","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILINGMATH","CEILINGPRECISE","CHAR","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHOOSE","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUNTIN","COUNTUNIQUE","COVARIANCE.P","COVARIANCE.S","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DIVIDE","DOLLARDE","DOLLARFR","E","EDATE","EFFECT","EOMONTH","EQ","ERF","ERFC","EVEN","EXACT","EXP","EXPON.DIST","EXPONDIST","F.DIST","F.DIST.RT","F.INV","F.INV.RT","FACT","FACTDOUBLE","FALSE","FDIST","FDISTRT","FIND","FINV","FINVRT","FISHER","FISHERINV","FLATTEN","FLOOR","FORECAST","FREQUENCY","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GROWTH","GTE","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HOUR","HTML2TEXT","HYPGEOM.DIST","HYPGEOMDIST","IF","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INT","INTERCEPT","INTERVAL","IPMT","IRR","ISBINARY","ISBLANK","ISEVEN","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISODD","ISOWEEKNUM","ISPMT","ISTEXT","JOIN","KURT","LARGE","LCM","LEFT","LEN","LINEST","LN","LOG","LOG10","LOGEST","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOGNORMINV","LOWER","LT","LTE","MATCH","MAX","MAXA","MEDIAN","MID","MIN","MINA","MINUS","MINUTE","MIRR","MOD","MODE.MULT","MODE.SNGL","MODEMULT","MODESNGL","MONTH","MROUND","MULTINOMIAL","MULTIPLY","NE","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","NUMBERS","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OR","PDURATION","PEARSON","PERCENTILEEXC","PERCENTILEINC","PERCENTRANKEXC","PERCENTRANKINC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON.DIST","POISSONDIST","POW","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE.EXC","QUARTILE.INC","QUARTILEEXC","QUARTILEINC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANKAVG","RANKEQ","RATE","REFERENCE","REGEXEXTRACT","REGEXMATCH","REGEXREPLACE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SKEWP","SLN","SLOPE","SMALL","SPLIT","SPLIT","SQRT","SQRTPI","STANDARDIZE","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STDEVS","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TDIST2T","TDISTRT","TIME","TIMEVALUE","TINV","TINV2T","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","UNICHAR","UNICODE","UNIQUE","UPPER","VAR.P","VAR.S","VARA","VARP","VARPA","VARS","WEEKDAY","WEEKNUM","WEIBULL.DIST","WEIBULLDIST","WORKDAY","XIRR","XNPV","XOR","YEAR","YEARFRAC"]},function(e,t,n){"use strict";function r(e){var t=parseInt(e,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function i(e){var t="";return e>=0&&(t=""+(e+1)),t}t.__esModule=!0,t.rowLabelToIndex=r,t.rowIndexToLabel=i,t.columnLabelToIndex=s,t.columnIndexToLabel=l,t.extractLabel=function(e){if("string"!==typeof e||!c.test(e))return[];var t=e.toUpperCase().match(c),n=t[1],i=t[2],o=t[3],a=t[4];return[{index:r(a),label:a,isAbsolute:"$"===o},{index:s(i),label:i,isAbsolute:"$"===n}]},t.toLabel=function(e,t){var n=(e.isAbsolute?"$":"")+i(e.index);return(t.isAbsolute?"$":"")+l(t.index)+n};var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=o.length;function s(e){var t=0;if("string"===typeof e)for(var n=0,r=(e=e.toUpperCase()).length-1;n=0;)t=String.fromCharCode(e%a+97)+t,e=Math.floor(e/a)-1;return t.toUpperCase()}var c=/^([$])?([A-Za-z]+)([$])?([0-9]+)$/},function(e,t,n){"use strict";t.__esModule=!0,t.rowLabelToIndex=t.rowIndexToLabel=t.columnLabelToIndex=t.columnIndexToLabel=t.toLabel=t.extractLabel=t.error=t.Parser=t.ERROR_VALUE=t.ERROR_REF=t.ERROR_NUM=t.ERROR_NULL=t.ERROR_NOT_AVAILABLE=t.ERROR_NAME=t.ERROR_DIV_ZERO=t.ERROR=t.SUPPORTED_FORMULAS=void 0;var r=l(n(16)),i=l(n(13)),o=n(2),a=l(o),s=n(14);function l(e){return e&&e.__esModule?e:{default:e}}t.SUPPORTED_FORMULAS=i.default,t.ERROR=o.ERROR,t.ERROR_DIV_ZERO=o.ERROR_DIV_ZERO,t.ERROR_NAME=o.ERROR_NAME,t.ERROR_NOT_AVAILABLE=o.ERROR_NOT_AVAILABLE,t.ERROR_NULL=o.ERROR_NULL,t.ERROR_NUM=o.ERROR_NUM,t.ERROR_REF=o.ERROR_REF,t.ERROR_VALUE=o.ERROR_VALUE,t.Parser=r.default,t.error=a.default,t.extractLabel=s.extractLabel,t.toLabel=s.toLabel,t.columnIndexToLabel=s.columnIndexToLabel,t.columnLabelToIndex=s.columnLabelToIndex,t.rowIndexToLabel=s.rowIndexToLabel,t.rowLabelToIndex=s.rowLabelToIndex},function(e,t,n){"use strict";t.__esModule=!0;var r=f(n(17)),i=f(n(18)),o=n(39),a=n(40),s=n(3),l=n(2),c=f(l),u=n(14);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this));return n.parser=new o.Parser,n.parser.yy={toNumber:s.toNumber,trimEdges:a.trimEdges,invertNumber:s.invertNumber,throwError:function(e){return n._throwError(e)},callVariable:function(e){return n._callVariable(e)},evaluateByOperator:i.default,callFunction:function(e,t){return n._callFunction(e,t)},cellValue:function(e){return n._callCellValue(e)},rangeValue:function(e,t){return n._callRangeValue(e,t)}},n.variables=Object.create(null),n.functions=Object.create(null),n.setVariable("TRUE",!0).setVariable("FALSE",!1).setVariable("NULL",null),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.parse=function(e){var t=null,n=null;try{t=""===e?"":this.parser.parse(e)}catch(i){var r=(0,c.default)(i.message);n=r||(0,c.default)(l.ERROR)}return t instanceof Error&&(n=(0,c.default)(t.message)||(0,c.default)(l.ERROR),t=null),{error:n,result:t}},t.prototype.setVariable=function(e,t){return this.variables[e]=t,this},t.prototype.getVariable=function(e){return this.variables[e]},t.prototype._callVariable=function(e){var t=this.getVariable(e);if(this.emit("callVariable",e,function(e){void 0!==e&&(t=e)}),void 0===t)throw Error(l.ERROR_NAME);return t},t.prototype.setFunction=function(e,t){return this.functions[e]=t,this},t.prototype.getFunction=function(e){return this.functions[e]},t.prototype._callFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.getFunction(e),r=void 0;return n&&(r=n(t)),this.emit("callFunction",e,t,function(e){void 0!==e&&(r=e)}),void 0===r?(0,i.default)(e,t):r},t.prototype._callCellValue=function(e){e=e.toUpperCase();var t=(0,u.extractLabel)(e),n=t[0],r=t[1],i=void 0;return this.emit("callCellValue",{label:e,row:n,column:r},function(e){i=e}),i},t.prototype._callRangeValue=function(e,t){e=e.toUpperCase(),t=t.toUpperCase();var n=(0,u.extractLabel)(e),r=n[0],i=n[1],o=(0,u.extractLabel)(t),a=o[0],s=o[1],l={},c={};r.index<=a.index?(l.row=r,c.row=a):(l.row=a,c.row=r),i.index<=s.index?(l.column=i,c.column=s):(l.column=s,c.column=i),l.label=(0,u.toLabel)(l.row,l.column),c.label=(0,u.toLabel)(c.row,c.column);var f=[];return this.emit("callRangeValue",l,c,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];f=e}),f},t.prototype._throwError=function(e){if((0,l.isValidStrict)(e))throw Error(e);throw Error(l.ERROR)},t}(r.default);t.default=h},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r1&&void 0!==arguments[1]?arguments[1]:[];if(e=e.toUpperCase(),!y[e])throw Error(v.ERROR_NAME);return y[e].apply(y,t)},t.registerOperation=b;var r=g(n(19)),i=g(n(20)),o=g(n(21)),a=g(n(22)),s=g(n(23)),l=g(n(31)),c=g(n(32)),u=g(n(33)),f=g(n(34)),h=g(n(35)),d=g(n(36)),p=g(n(37)),m=g(n(38)),v=n(2);function g(e){return e&&e.__esModule?e:{default:e}}var y=Object.create(null);function b(e,t){Array.isArray(e)||(e=[e.toUpperCase()]),e.forEach(function(e){t.isFactory?y[e]=t(e):y[e]=t})}b(r.default.SYMBOL,r.default),b(i.default.SYMBOL,i.default),b(o.default.SYMBOL,o.default),b(a.default.SYMBOL,a.default),b(m.default.SYMBOL,m.default),b(s.default.SYMBOL,s.default),b(l.default.SYMBOL,l.default),b(c.default.SYMBOL,c.default),b(u.default.SYMBOL,u.default),b(f.default.SYMBOL,f.default),b(d.default.SYMBOL,d.default),b(p.default.SYMBOL,p.default),b(h.default.SYMBOL,h.default)},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),i=n(2),o=t.SYMBOL="+";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o1?t-1:0),o=1;ot)n=o(e,t,l(r.abs(e)),d(r.abs(e)),-1);else{for(a=0,c=n=s=0,u=1,i=2*r.floor((t+r.floor(r.sqrt(40*t)))/2);i>0;i--)f=i*h*u-c,c=u,u=f,r.abs(u)>1e10&&(u*=1e-10,c*=1e-10,n*=1e-10,s*=1e-10),a&&(s+=u),a=!a,i==t&&(n=c);n/=s=2*s-u}return e<0&&t%2?-n:n}}(),l=function(){var e=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),t=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),n=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),o=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),l=.636619772;var c=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),u=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),f=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),h=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return a(function(a){var c,u,f,h=a*a,d=a-.785398164;return a<8?c=(u=i(e,h))/(f=i(t,h))+l*s(a,0)*r.log(a):(u=i(n,h=64/h),f=i(o,h),c=r.sqrt(l/a)*(r.sin(d)*u+r.cos(d)*f*8/a)),c},function(e){var t,n,o,a=e*e,d=e-2.356194491;return e<8?t=(n=e*i(c,a))/(o=i(u,a))+l*(s(e,1)*r.log(e)-1/e):(n=i(f,a=64/a),o=i(h,a),t=r.sqrt(l/e)*(r.sin(d)*n+r.cos(d)*o*8/e)),t},"BESSELY",1,-1)}(),c=function(){var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),t=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse();var n=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),o=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();return function a(s,l){if(0===(l=Math.round(l)))return function(n){return n<=3.75?i(e,n*n/14.0625):r.exp(r.abs(n))/r.sqrt(r.abs(n))*i(t,3.75/r.abs(n))}(s);if(1==l)return function(e){return e<3.75?e*i(n,e*e/14.0625):(e<0?-1:1)*r.exp(r.abs(e))/r.sqrt(r.abs(e))*i(o,3.75/r.abs(e))}(s);if(l<0)throw"BESSELI Order ("+l+") must be nonnegative";if(0===r.abs(s))return 0;var c,u,f,h,d,p=2/r.abs(s);for(f=c=0,h=1,u=2*r.round((l+r.round(r.sqrt(40*l)))/2);u>0;u--)d=u*p*h+f,f=h,h=d,r.abs(h)>1e10&&(h*=1e-10,f*=1e-10,c*=1e-10),u==l&&(c=f);return c*=a(s,0)/h,s<0&&l%2?-c:c}}(),u=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse();var n=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),o=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return a(function(n){return n<=2?-r.log(n/2)*c(n,0)+i(e,n*n/4):r.exp(-n)/r.sqrt(n)*i(t,2/n)},function(e){return e<=2?r.log(e/2)*c(e,1)+1/e*i(n,e*e/4):r.exp(-e)/r.sqrt(e)*i(o,2/e)},"BESSELK",2,1)}();t.besselj=s,t.bessely=l,t.besseli=c,t.besselk=u},function(e,t,n){var r=n(0),i=n(5),o=n(4),a=n(1),s=n(7);function l(e){var t=[];return a.arrayEach(e,function(e){e&&t.push(e)}),t}function c(e,t){for(var n={},r=1;ri&&(i=t[r].length);for(var o=1;o1?r.num:s[o[0]]},t.DMAX=function(e,n,i){if(isNaN(n)&&"string"!==typeof n)return r.value;var o=c(e,i),s=[];if("string"===typeof n){var l=t.FINDFIELD(e,n);s=a.rest(e[l])}else s=a.rest(e[n]);var u=s[o[0]];return a.arrayEach(o,function(e){us[e]&&(u=s[e])}),u},t.DPRODUCT=function(e,n,i){if(isNaN(n)&&"string"!==typeof n)return r.value;var o=c(e,i),s=[];if("string"===typeof n){var u=t.FINDFIELD(e,n);s=a.rest(e[u])}else s=a.rest(e[n]);var f=[];a.arrayEach(o,function(e){f.push(s[e])}),f=l(f);var h=1;return a.arrayEach(f,function(e){h*=e}),h},t.DSTDEV=function(e,n,o){if(isNaN(n)&&"string"!==typeof n)return r.value;var s=c(e,o),u=[];if("string"===typeof n){var f=t.FINDFIELD(e,n);u=a.rest(e[f])}else u=a.rest(e[n]);var h=[];return a.arrayEach(s,function(e){h.push(u[e])}),h=l(h),i.STDEV.S(h)},t.DSTDEVP=function(e,n,o){if(isNaN(n)&&"string"!==typeof n)return r.value;var s=c(e,o),u=[];if("string"===typeof n){var f=t.FINDFIELD(e,n);u=a.rest(e[f])}else u=a.rest(e[n]);var h=[];return a.arrayEach(s,function(e){h.push(u[e])}),h=l(h),i.STDEV.P(h)},t.DSUM=function(e,n,i){if(isNaN(n)&&"string"!==typeof n)return r.value;var s=c(e,i),l=[];if("string"===typeof n){var u=t.FINDFIELD(e,n);l=a.rest(e[u])}else l=a.rest(e[n]);var f=[];return a.arrayEach(s,function(e){f.push(l[e])}),o.SUM(f)},t.DVAR=function(e,n,o){if(isNaN(n)&&"string"!==typeof n)return r.value;var s=c(e,o),l=[];if("string"===typeof n){var u=t.FINDFIELD(e,n);l=a.rest(e[u])}else l=a.rest(e[n]);var f=[];return a.arrayEach(s,function(e){f.push(l[e])}),i.VAR.S(f)},t.DVARP=function(e,n,o){if(isNaN(n)&&"string"!==typeof n)return r.value;var s=c(e,o),l=[];if("string"===typeof n){var u=t.FINDFIELD(e,n);l=a.rest(e[u])}else l=a.rest(e[n]);var f=[];return a.arrayEach(s,function(e){f.push(l[e])}),i.VAR.P(f)}},function(e,t,n){var r=n(0),i=n(1),o=n(8);t.AND=function(){for(var e=i.flatten(arguments),t=!0,n=0;n254?r.value:arguments.length0){var t=arguments[0],n=arguments.length-1,i=Math.floor(n/2),o=!1,a=n%2!==0,s=n%2===0?null:arguments[arguments.length-1];if(i)for(var l=0;ls)return r.num;if(0!==l&&1!==l)return r.num;var c=t.PMT(e,n,i,0,l),u=0;1===a&&0===l&&(u=-i,a++);for(var f=a;f<=s;f++)u+=1===l?t.FV(e,f-2,c,i,1)-c:t.FV(e,f-1,c,i,0);return u*=e},t.CUMPRINC=function(e,n,i,a,s,l){if(e=o.parseNumber(e),n=o.parseNumber(n),i=o.parseNumber(i),o.anyIsError(e,n,i))return r.value;if(e<=0||n<=0||i<=0)return r.num;if(a<1||s<1||a>s)return r.num;if(0!==l&&1!==l)return r.num;var c=t.PMT(e,n,i,0,l),u=0;1===a&&(u=0===l?c+i*e:c,a++);for(var f=a;f<=s;f++)u+=l>0?c-(t.FV(e,f-2,c,i,1)-c)*e:c-t.FV(e,f-1,c,i,0)*e;return u},t.DB=function(e,t,n,i,a){if(a=void 0===a?12:a,e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),i=o.parseNumber(i),a=o.parseNumber(a),o.anyIsError(e,t,n,i,a))return r.value;if(e<0||t<0||n<0||i<0)return r.num;if(-1===[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(a))return r.num;if(i>n)return r.num;if(t>=e)return 0;for(var s=(1-Math.pow(t/e,1/n)).toFixed(3),l=e*s*a/12,c=l,u=0,f=i===n?n-1:i,h=2;h<=f;h++)c+=u=(e-c)*s;return 1===i?l:i===n?(e-c)*s:u},t.DDB=function(e,t,n,i,a){if(a=void 0===a?2:a,e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),i=o.parseNumber(i),a=o.parseNumber(a),o.anyIsError(e,t,n,i,a))return r.value;if(e<0||t<0||n<0||i<0||a<=0)return r.num;if(i>n)return r.num;if(t>=e)return 0;for(var s=0,l=0,c=1;c<=i;c++)s+=l=Math.min(a/n*(e-s),e-t-s);return l},t.DISC=function(){throw new Error("DISC is not implemented")},t.DOLLARDE=function(e,t){if(e=o.parseNumber(e),t=o.parseNumber(t),o.anyIsError(e,t))return r.value;if(t<0)return r.num;if(t>=0&&t<1)return r.div0;t=parseInt(t,10);var n=parseInt(e,10);n+=e%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t;var i=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return n=Math.round(n*i)/i},t.DOLLARFR=function(e,t){if(e=o.parseNumber(e),t=o.parseNumber(t),o.anyIsError(e,t))return r.value;if(t<0)return r.num;if(t>=0&&t<1)return r.div0;t=parseInt(t,10);var n=parseInt(e,10);return n+=e%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t},t.DURATION=function(){throw new Error("DURATION is not implemented")},t.EFFECT=function(e,t){return e=o.parseNumber(e),t=o.parseNumber(t),o.anyIsError(e,t)?r.value:e<=0||t<1?r.num:(t=parseInt(t,10),Math.pow(1+e/t,t)-1)},t.FV=function(e,t,n,i,a){if(i=i||0,a=a||0,e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),i=o.parseNumber(i),a=o.parseNumber(a),o.anyIsError(e,t,n,i,a))return r.value;var s;if(0===e)s=i+n*t;else{var l=Math.pow(1+e,t);s=1===a?i*l+n*(1+e)*(l-1)/e:i*l+n*(l-1)/e}return-s},t.FVSCHEDULE=function(e,t){if(e=o.parseNumber(e),t=o.parseNumberArray(o.flatten(t)),o.anyIsError(e,t))return r.value;for(var n=t.length,i=e,a=0;a0&&(s=!0),e[c]<0&&(l=!0);if(!s||!l)return r.num;var u,f,h,d=t=void 0===t?.1:t,p=!0;do{u=d-(h=n(e,a,d))/i(e,a,d),f=Math.abs(u-d),d=u,p=f>1e-10&&Math.abs(h)>1e-10}while(p);return d},t.ISPMT=function(e,t,n,i){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),i=o.parseNumber(i),o.anyIsError(e,t,n,i)?r.value:i*e*(t/n-1)},t.MDURATION=function(){throw new Error("MDURATION is not implemented")},t.MIRR=function(e,n,i){if(e=o.parseNumberArray(o.flatten(e)),n=o.parseNumber(n),i=o.parseNumber(i),o.anyIsError(e,n,i))return r.value;for(var a=e.length,s=[],l=[],c=0;c1e-10&&d<50;)p=(c*u-l*f)/(c-l),u=f,f=p,l=c,c=Math.abs(p)<1e-10?n*(1+e*p)+t*(1+p*a)*e+i:n*(h=Math.exp(e*Math.log(1+p)))+t*(1/p+a)*(h-1)+i,++d;return p},t.RECEIVED=function(){throw new Error("RECEIVED is not implemented")},t.RRI=function(e,t,n){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:0===e||0===t?r.num:Math.pow(n/t,1/e)-1},t.SLN=function(e,t,n){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:0===n?r.num:(e-t)/n},t.SYD=function(e,t,n,i){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),i=o.parseNumber(i),o.anyIsError(e,t,n,i)?r.value:0===n?r.num:i<1||i>n?r.num:(e-t)*(n-(i=parseInt(i,10))+1)*2/(n*(n+1))},t.TBILLEQ=function(e,t,n){return e=o.parseDate(e),t=o.parseDate(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:365*n/(360-n*i.DAYS360(e,t,!1))},t.TBILLPRICE=function(e,t,n){return e=o.parseDate(e),t=o.parseDate(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:100*(1-n*i.DAYS360(e,t,!1)/360)},t.TBILLYIELD=function(e,t,n){return e=o.parseDate(e),t=o.parseDate(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:360*(100-n)/(n*i.DAYS360(e,t,!1))},t.VDB=function(){throw new Error("VDB is not implemented")},t.XNPV=function(e,t,n){if(e=o.parseNumber(e),t=o.parseNumberArray(o.flatten(t)),n=o.parseDateArray(o.flatten(n)),o.anyIsError(e,t,n))return r.value;for(var a=0,s=0;so&&(i=a+1,o=t[a]):(i=a+1,o=t[a]))}else if(0===n){if("string"===typeof e){if(e=e.replace(/\?/g,"."),t[a].toLowerCase().match(e.toLowerCase()))return a+1}else if(t[a]===e)return a+1}else if(-1===n){if(t[a]===e)return a+1;t[a]>e&&(o?t[a]";function i(e,t){return e>t}i.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=i;var r=t.SYMBOL=">=";function i(e,t){return e>=t}i.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=i;var r=t.SYMBOL="<";function i(e,t){return e1?t-1:0),o=1;o1?t-1:0),o=1;o";function i(e,t){return e!==t}i.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),i=n(2),o=t.SYMBOL="^";function a(e,t){var n=Math.pow((0,r.toNumber)(e),(0,r.toNumber)(t));if(isNaN(n))throw Error(i.ERROR_VALUE);return n}a.SYMBOL=o},function(e,t,n){var r=function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,5],n=[1,8],r=[1,6],i=[1,7],o=[1,9],a=[1,14],s=[1,15],l=[1,16],c=[1,12],u=[1,13],f=[1,17],h=[1,19],d=[1,20],p=[1,21],m=[1,22],v=[1,23],g=[1,24],y=[1,25],b=[1,26],w=[1,27],_=[1,28],S=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],E=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],C=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],x=[5,10,11,13,14,15,16,17,29,30],k=[5,10,13,14,15,16,29,30],O=[5,10,11,13,14,15,16,17,18,19,29,30],T=[13,29,30],A={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,EOF:5,variableSequence:6,number:7,STRING:8,"&":9,"=":10,"+":11,"(":12,")":13,"<":14,">":15,NOT:16,"-":17,"*":18,"/":19,"^":20,FUNCTION:21,expseq:22,cell:23,ABSOLUTE_CELL:24,RELATIVE_CELL:25,MIXED_CELL:26,":":27,ARRAY:28,";":29,",":30,VARIABLE:31,DECIMAL:32,NUMBER:33,"%":34,ERROR:35,$accept:0,$end:1},terminals_:{5:"EOF",8:"STRING",9:"&",10:"=",11:"+",12:"(",13:")",14:"<",15:">",16:"NOT",17:"-",18:"*",19:"/",20:"^",21:"FUNCTION",24:"ABSOLUTE_CELL",25:"RELATIVE_CELL",26:"MIXED_CELL",27:":",28:"ARRAY",29:";",30:",",31:"VARIABLE",32:"DECIMAL",33:"NUMBER",34:"%",35:"ERROR"},productions_:[0,[3,2],[4,1],[4,1],[4,1],[4,3],[4,3],[4,3],[4,3],[4,4],[4,4],[4,4],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,3],[4,4],[4,1],[4,1],[4,2],[23,1],[23,1],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[22,1],[22,1],[22,3],[22,3],[6,1],[6,3],[7,1],[7,3],[7,2],[2,1]],performAction:function(e,t,n,r,i,o,a){var s=o.length-1;switch(i){case 1:return o[s-1];case 2:this.$=r.callVariable(o[s][0]);break;case 3:this.$=r.toNumber(o[s]);break;case 4:this.$=r.trimEdges(o[s]);break;case 5:this.$=r.evaluateByOperator("&",[o[s-2],o[s]]);break;case 6:this.$=r.evaluateByOperator("=",[o[s-2],o[s]]);break;case 7:this.$=r.evaluateByOperator("+",[o[s-2],o[s]]);break;case 8:this.$=o[s-1];break;case 9:this.$=r.evaluateByOperator("<=",[o[s-3],o[s]]);break;case 10:this.$=r.evaluateByOperator(">=",[o[s-3],o[s]]);break;case 11:this.$=r.evaluateByOperator("<>",[o[s-3],o[s]]);break;case 12:this.$=r.evaluateByOperator("NOT",[o[s-2],o[s]]);break;case 13:this.$=r.evaluateByOperator(">",[o[s-2],o[s]]);break;case 14:this.$=r.evaluateByOperator("<",[o[s-2],o[s]]);break;case 15:this.$=r.evaluateByOperator("-",[o[s-2],o[s]]);break;case 16:this.$=r.evaluateByOperator("*",[o[s-2],o[s]]);break;case 17:this.$=r.evaluateByOperator("/",[o[s-2],o[s]]);break;case 18:this.$=r.evaluateByOperator("^",[o[s-2],o[s]]);break;case 19:var l=r.invertNumber(o[s]);this.$=l,isNaN(this.$)&&(this.$=0);break;case 20:l=r.toNumber(o[s]);this.$=l,isNaN(this.$)&&(this.$=0);break;case 21:this.$=r.callFunction(o[s-2]);break;case 22:this.$=r.callFunction(o[s-3],o[s-1]);break;case 26:case 27:case 28:this.$=r.cellValue(o[s]);break;case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:this.$=r.rangeValue(o[s-2],o[s]);break;case 38:case 42:this.$=[o[s]];break;case 39:this.$=r.trimEdges(e).split(",");break;case 40:case 41:o[s-2].push(o[s]),this.$=o[s-2];break;case 43:this.$=Array.isArray(o[s-2])?o[s-2]:[o[s-2]],this.$.push(o[s]);break;case 44:this.$=o[s];break;case 45:this.$=1*(o[s-2]+"."+o[s]);break;case 46:this.$=.01*o[s-1];break;case 47:this.$=r.throwError(o[s])}},table:[{2:11,3:1,4:2,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{1:[3]},{5:[1,18],9:h,10:d,11:p,14:m,15:v,16:g,17:y,18:b,19:w,20:_},e(S,[2,2],{32:[1,29]}),e(S,[2,3],{34:[1,30]}),e(S,[2,4]),{2:11,4:31,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:32,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:33,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{12:[1,34]},e(S,[2,23]),e(S,[2,24],{2:35,35:f}),e(E,[2,42]),e(C,[2,44],{32:[1,36]}),e(S,[2,26],{27:[1,37]}),e(S,[2,27],{27:[1,38]}),e(S,[2,28],{27:[1,39]}),e([5,9,10,11,13,14,15,16,17,18,19,20,29,30,35],[2,47]),{1:[2,1]},{2:11,4:40,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:41,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:42,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:45,6:3,7:4,8:t,10:[1,43],11:n,12:r,15:[1,44],17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:47,6:3,7:4,8:t,10:[1,46],11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:48,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:49,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:50,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:51,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:52,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{31:[1,53]},e(C,[2,46]),{9:h,10:d,11:p,13:[1,54],14:m,15:v,16:g,17:y,18:b,19:w,20:_},e(x,[2,19],{9:h,18:b,19:w,20:_}),e(x,[2,20],{9:h,18:b,19:w,20:_}),{2:11,4:57,6:3,7:4,8:t,11:n,12:r,13:[1,55],17:i,21:o,22:56,23:10,24:a,25:s,26:l,28:[1,58],31:c,33:u,35:f},e(S,[2,25]),{33:[1,59]},{24:[1,60],25:[1,61],26:[1,62]},{24:[1,63],25:[1,64],26:[1,65]},{24:[1,66],25:[1,67],26:[1,68]},e(S,[2,5]),e([5,10,13,29,30],[2,6],{9:h,11:p,14:m,15:v,16:g,17:y,18:b,19:w,20:_}),e(x,[2,7],{9:h,18:b,19:w,20:_}),{2:11,4:69,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:70,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},e(k,[2,14],{9:h,11:p,17:y,18:b,19:w,20:_}),{2:11,4:71,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},e(k,[2,13],{9:h,11:p,17:y,18:b,19:w,20:_}),e([5,10,13,16,29,30],[2,12],{9:h,11:p,14:m,15:v,17:y,18:b,19:w,20:_}),e(x,[2,15],{9:h,18:b,19:w,20:_}),e(O,[2,16],{9:h,20:_}),e(O,[2,17],{9:h,20:_}),e([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:h}),e(E,[2,43]),e(S,[2,8]),e(S,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},e(T,[2,38],{9:h,10:d,11:p,14:m,15:v,16:g,17:y,18:b,19:w,20:_}),e(T,[2,39]),e(C,[2,45]),e(S,[2,29]),e(S,[2,30]),e(S,[2,31]),e(S,[2,32]),e(S,[2,33]),e(S,[2,34]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(k,[2,9],{9:h,11:p,17:y,18:b,19:w,20:_}),e(k,[2,11],{9:h,11:p,17:y,18:b,19:w,20:_}),e(k,[2,10],{9:h,11:p,17:y,18:b,19:w,20:_}),e(S,[2,22]),{2:11,4:75,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},{2:11,4:76,6:3,7:4,8:t,11:n,12:r,17:i,21:o,23:10,24:a,25:s,26:l,31:c,33:u,35:f},e(T,[2,40],{9:h,10:d,11:p,14:m,15:v,16:g,17:y,18:b,19:w,20:_}),e(T,[2,41],{9:h,10:d,11:p,14:m,15:v,16:g,17:y,18:b,19:w,20:_})],defaultActions:{18:[2,1]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],o=this.table,a="",s=0,l=0,c=0,u=i.slice.call(arguments,1),f=Object.create(this.lexer),h={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(h.yy[d]=this.yy[d]);f.setInput(e,h.yy),h.yy.lexer=f,h.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var p=f.yylloc;i.push(p);var m=f.options&&f.options.ranges;"function"===typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,g,y,b,w,_,S,E,C,x,k=function(){var e;return"number"!==typeof(e=f.lex()||1)&&(e=t.symbols_[e]||e),e},O={};;){if(y=n[n.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(null!==v&&"undefined"!=typeof v||(v=k()),b=o[y]&&o[y][v]),"undefined"===typeof b||!b.length||!b[0]){var T,A=function(e){for(var t=n.length-1,r=0;;){if(2..toString()in o[e])return r;if(0===e||t<2)return!1;e=n[t-=2],++r}},R="";if(c)1!==g&&(T=A(y));else{for(_ in T=A(y),C=[],o[y])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");R=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(R,{text:f.match,token:this.terminals_[v]||v,line:f.yylineno,loc:p,expected:C,recoverable:!1!==T})}if(3==c){if(1===v||1===g)throw new Error(R||"Parsing halted while starting to recover from another error.");l=f.yyleng,a=f.yytext,s=f.yylineno,p=f.yylloc,v=k()}if(!1===T)throw new Error(R||"Parsing halted. No suitable error recovery rule available.");x=T,n.length=n.length-2*x,r.length=r.length-x,i.length=i.length-x,g=2==v?null:v,v=2,y=n[n.length-1],b=o[y]&&o[y][2],c=3}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(b[0]){case 1:n.push(v),r.push(f.yytext),i.push(f.yylloc),n.push(b[1]),v=null,g?(v=g,g=null):(l=f.yyleng,a=f.yytext,s=f.yylineno,p=f.yylloc,c>0&&c--);break;case 2:if(S=this.productions_[b[1]][1],O.$=r[r.length-S],O._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},m&&(O._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),"undefined"!==typeof(w=this.performAction.apply(O,[a,l,s,h.yy,b[1],r,i].concat(u))))return w;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),i=i.slice(0,-1*S)),n.push(this.productions_[b[1]][0]),r.push(O.$),i.push(O._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},R={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;ot[0].length)){if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:case 2:return 8;case 3:return 21;case 4:return 35;case 5:return 24;case 6:case 7:return 26;case 8:return 25;case 9:return 21;case 10:case 11:return 31;case 12:return 33;case 13:return 28;case 14:return 9;case 15:return" ";case 16:return 32;case 17:return 27;case 18:return 29;case 19:return 30;case 20:return 18;case 21:return 19;case 22:return 17;case 23:return 11;case 24:return 20;case 25:return 12;case 26:return 13;case 27:return 15;case 28:return 14;case 29:return 16;case 30:return'"';case 31:return"'";case 32:return"!";case 33:return 10;case 34:return 34;case 35:return"#";case 36:return 5}},rules:[/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,/^(?:#[A-Z0-9\/]+(!|\?)?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z\.]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\[(.*)?\])/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:>)/,/^(?:<)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}};function M(){this.yy={}}return A.lexer=R,M.prototype=A,A.Parser=M,new M}();t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)}},function(e,t,n){"use strict";t.__esModule=!0,t.trimEdges=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e=e.substring(t,e.length-t)}}])},e.exports=o()},function(e,t,n){(function(t){var n="object",r=function(e){return e&&e.Math==Math&&e};e.exports=r(typeof globalThis==n&&globalThis)||r(typeof window==n&&window)||r(typeof self==n&&self)||r(typeof t==n&&t)||Function("return this")()}).call(this,n(53))},function(e,t,n){"use strict";var r=n(30),i=n(224),o=n(67);r({target:"String",proto:!0,forced:!n(225)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=n(580).Buffer}catch(C){}function s(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)i=s(e,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=s(e,t,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&l,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],d=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);n=(p=p.idivn(d)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,C=S>>>13,x=0|a[5],k=8191&x,O=x>>>13,T=0|a[6],A=8191&T,R=T>>>13,M=0|a[7],P=8191&M,I=M>>>13,N=0|a[8],D=8191&N,j=N>>>13,L=0|a[9],B=8191&L,F=L>>>13,H=0|s[0],U=8191&H,z=H>>>13,W=0|s[1],V=8191&W,Y=W>>>13,q=0|s[2],G=8191&q,X=q>>>13,K=0|s[3],Z=8191&K,$=K>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],fe=8191&ue,he=ue>>>13,de=0|s[9],pe=8191&de,me=de>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ge=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,U),i=(i=Math.imul(g,z))+Math.imul(y,U)|0,o=Math.imul(y,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ye=(c+(r=r+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),r=r+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,X)|0;var be=(c+(r=r+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,z))+Math.imul(C,U)|0,o=Math.imul(C,z),r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,$)|0;var we=(c+(r=r+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,U),i=(i=Math.imul(k,z))+Math.imul(O,U)|0,o=Math.imul(O,z),r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,$)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(h,ne)|0))<<13)|0;c=((o=o+Math.imul(h,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,z))+Math.imul(R,U)|0,o=Math.imul(R,z),r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,$)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(c+(r=r+Math.imul(f,le)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(j,U)|0,o=Math.imul(j,z),r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,X)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Ce=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(D,V)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,Y)|0,r=r+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,$)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,$)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(g,le)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0;var xe=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,Y))+Math.imul(F,V)|0,o=Math.imul(F,Y),r=r+Math.imul(D,G)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,X)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0,r=r+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,he)|0;var ke=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,G),i=(i=Math.imul(B,X))+Math.imul(F,G)|0,o=Math.imul(F,X),r=r+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,$)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,he)|0;var Oe=(c+(r=r+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,$))+Math.imul(F,Z)|0,o=Math.imul(F,$),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,he)|0;var Te=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(j,ne)|0,o=o+Math.imul(j,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,r=r+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,he)|0;var Re=(c+(r=r+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,oe),i=(i=Math.imul(B,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,he)|0;var Me=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),r=r+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,he)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,fe),i=(i=Math.imul(B,he))+Math.imul(F,fe)|0,o=Math.imul(F,he);var Ie=(c+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Ne=(c+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ve,l[1]=ge,l[2]=ye,l[3]=be,l[4]=we,l[5]=_e,l[6]=Se,l[7]=Ee,l[8]=Ce,l[9]=xe,l[10]=ke,l[11]=Oe,l[12]=Te,l[13]=Ae,l[14]=Re,l[15]=Me,l[16]=Pe,l[17]=Ie,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=h),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-o|f>>>o,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,f);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(l)):(n.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var f=0,h=1;0===(n.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):n.strip(),n},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(y,g),y.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var f=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}l=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(93)(e))},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"a",function(){return c}),n.d(t,"c",function(){return v}),n.d(t,"e",function(){return g}),n.d(t,"f",function(){return y}),n.d(t,"g",function(){return b}),n.d(t,"d",function(){return w});n(10),n(11),n(12),n(32),n(44),n(7),n(95),n(6),n(102),n(50),n(8),n(9);var r=n(5),i=n(1),o=n(14);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=0,c=1,u=2,f=3,h=[f,u],d=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],p=Symbol("root"),m=Symbol("child");function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;if(t!==p&&t!==m)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),i=t===p,o=l;if(n){var a=e[0];if(0===e.length)o=c;else if(i&&a instanceof r.b)o=f;else if(i&&Array.isArray(a))o=v(a,m);else if(e.length>=2&&e.length<=4){!e.some(function(e,t){return!d[t].includes(s(e))})&&(o=u)}}return o}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,i=t.propToCol;if(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===f,a=n?t.from.row:t[0],s=n?t.from.col:t[1],l=n?t.to.row:t[2],c=n?t.to.col:t[3];if("function"===typeof i&&("string"===typeof s&&(s=i(s)),"string"===typeof c&&(c=i(c))),Object(o.isUndefined)(l)&&(l=a),Object(o.isUndefined)(c)&&(c=s),!r){var u=a,h=s,d=l,p=c;a=Math.min(u,d),s=Math.min(h,p),l=Math.max(u,d),c=Math.max(h,p)}return[a,s,l,c]}}function y(e){var t=v(e);if(t===l||t===c)return[];var n=g(t),r=new Set;Object(i.arrayEach)(e,function(e){var t=a(n(e),4),o=t[1],s=t[3]-o+1;Object(i.arrayEach)(Array.from(new Array(s),function(e,t){return o+t}),function(e){r.has(e)||r.add(e)})});var o=Array.from(r).sort(function(e,t){return e-t});return Object(i.arrayReduce)(o,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e},[])}function b(e){var t=v(e);if(t===l||t===c)return[];var n=g(t),r=new Set;Object(i.arrayEach)(e,function(e){var t=a(n(e),3),o=t[0],s=t[2]-o+1;Object(i.arrayEach)(Array.from(new Array(s),function(e,t){return o+t}),function(e){r.has(e)||r.add(e)})});var o=Array.from(r).sort(function(e,t){return e-t});return Object(i.arrayReduce)(o,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e},[])}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"===typeof e&&e>=0&&e1)for(var n=1;n-1;return(n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||i?n:r).format(t)}(r,this.dateFormat),f=this.instance.runHooks("unmodifyRow",this.row),h=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(f,h,u,"dateValidator"),i=!0}else i=!1;t(i)}),h("numeric",function(e,t){var n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&Object(c.isNumeric)(e))}),h("time",function(e,t){var n=this.timeFormat||"h:mm:ss a",r=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;var o=/^\d{1,2}$/.test(i);o&&(i+=":00");var s=a()(i,u,!0).isValid()?a()(i):a()(i,n),l=s.isValid(),c=a()(i,n,!0).isValid()&&!o;if(this.allowEmpty&&""===i&&(l=!0,c=!0),l||(r=!1),!l&&c&&(r=!0),l&&!c)if(!0===this.correctFormat){var f=s.format(n),h=this.instance.runHooks("unmodifyRow",this.row),d=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(h,d,f,"timeValidator"),r=!0}else r=!1;t(r)})},function(e,t,n){"use strict";var r=n(166),i=n(59),o=n(78),a=n(69),s=n(110),l=n(67),c=n(223),u=n(167),f=Math.max,h=Math.min,d=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,function(e,t,n){return[function(n,r){var i=l(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var l=n(t,e,this,o);if(l.done)return l.value;var d=i(e),p=String(this),m="function"===typeof o;m||(o=String(o));var v=d.global;if(v){var g=d.unicode;d.lastIndex=0}for(var y=[];;){var b=u(d,p);if(null===b)break;if(y.push(b),!v)break;""===String(b[0])&&(d.lastIndex=c(p,a(d.lastIndex),g))}for(var w,_="",S=0,E=0;E=S&&(_+=p.slice(S,x)+R,S=x+C.length)}return _+p.slice(S)}];function r(e,n,r,i,a,s){var l=r+e.length,c=i.length,u=m;return void 0!==a&&(a=o(a),u=p),t.call(s,u,function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return t;if(u>c){var f=d(u/10);return 0===f?t:f<=c?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[u-1]}return void 0===s?"":s})}})},function(e,t,n){"use strict";var r="undefined"!==typeof window;e.exports={ERROR:"tableschema.error",INFER_THRESHOLD:10,INFER_CONFIDENCE:.75,DEFAULT_FORMAT:"csv",DEFAULT_ENCODING:"utf-8",DEFAULT_FIELD_TYPE:"string",DEFAULT_FIELD_FORMAT:"default",DEFAULT_MISSING_VALUES:[""],IS_BROWSER:r}},function(e,t,n){var r=n(54);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});n(10),n(11),n(12),n(32),n(7),n(94),n(6),n(26),n(8),n(9);function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"common";i.has(e)||i.set(e,new Map);var t=i.get(e);return{register:function(e,n){t.set(e,n)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return r(t.keys())},getValues:function(){return r(t.values())}}}},function(e,t,n){!function(e){"use strict";var t=Object.freeze;function n(e){var t,n,r,i;for(n=1,r=arguments.length;n0?Math.floor(e):Math.ceil(e)};function I(e,t,n){return e instanceof M?e:g(e)?new M(e[0],e[1]):void 0===e||null===e?e:"object"===typeof e&&"x"in e&&"y"in e?new M(e.x,e.y):new M(e,t,n)}function N(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=D(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>=t.x&&r.x<=n.x,a=i.y>=t.y&&r.y<=n.y;return o&&a},overlaps:function(e){e=D(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>t.x&&r.xt.y&&r.y=r.lat&&n.lat<=i.lat&&t.lng>=r.lng&&n.lng<=i.lng},intersects:function(e){e=B(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>=t.lat&&r.lat<=n.lat,a=i.lng>=t.lng&&r.lng<=n.lng;return o&&a},overlaps:function(e){e=B(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>t.lat&&r.latt.lng&&r.lng1,xe=!!document.createElement("canvas").getContext,ke=!(!document.createElementNS||!X("svg").createSVGRect),Oe=!ke&&function(){try{var e=document.createElement("div");e.innerHTML='';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"===typeof t.adj}catch(n){return!1}}();function Te(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Ae=(Object.freeze||Object)({ie:$,ielt9:J,edge:Q,webkit:ee,android:te,android23:ne,androidStock:ie,opera:oe,chrome:ae,gecko:se,safari:le,phantom:ce,opera12:ue,win:fe,ie3d:he,webkit3d:de,gecko3d:pe,any3d:me,mobile:ve,mobileWebkit:ge,mobileWebkit3d:ye,msPointer:be,pointer:we,touch:_e,mobileOpera:Se,mobileGecko:Ee,retina:Ce,canvas:xe,svg:ke,vml:Oe}),Re=be?"MSPointerDown":"pointerdown",Me=be?"MSPointerMove":"pointermove",Pe=be?"MSPointerUp":"pointerup",Ie=be?"MSPointerCancel":"pointercancel",Ne=["INPUT","SELECT","OPTION"],De={},je=!1,Le=0;function Be(e,t,n,r){return"touchstart"===t?function(e,t,n){var r=i(function(e){if("mouse"!==e.pointerType&&e.MSPOINTER_TYPE_MOUSE&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){if(!(Ne.indexOf(e.target.tagName)<0))return;Dt(e)}ze(e,t)});e["_leaflet_touchstart"+n]=r,e.addEventListener(Re,r,!1),je||(document.documentElement.addEventListener(Re,Fe,!0),document.documentElement.addEventListener(Me,He,!0),document.documentElement.addEventListener(Pe,Ue,!0),document.documentElement.addEventListener(Ie,Ue,!0),je=!0)}(e,n,r):"touchmove"===t?function(e,t,n){var r=function(e){(e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&"mouse"!==e.pointerType||0!==e.buttons)&&ze(e,t)};e["_leaflet_touchmove"+n]=r,e.addEventListener(Me,r,!1)}(e,n,r):"touchend"===t&&function(e,t,n){var r=function(e){ze(e,t)};e["_leaflet_touchend"+n]=r,e.addEventListener(Pe,r,!1),e.addEventListener(Ie,r,!1)}(e,n,r),this}function Fe(e){De[e.pointerId]=e,Le++}function He(e){De[e.pointerId]&&(De[e.pointerId]=e)}function Ue(e){delete De[e.pointerId],Le--}function ze(e,t){for(var n in e.touches=[],De)e.touches.push(De[n]);e.changedTouches=[e],t(e)}var We=be?"MSPointerDown":we?"pointerdown":"touchstart",Ve=be?"MSPointerUp":we?"pointerup":"touchend",Ye="_leaflet_";function qe(e,t,n){var r,i,o=!1,a=250;function s(e){var t;if(we){if(!Q||"mouse"===e.pointerType)return;t=Le}else t=e.touches.length;if(!(t>1)){var n=Date.now(),s=n-(r||n);i=e.touches?e.touches[0]:e,o=s>0&&s<=a,r=n}}function l(e){if(o&&!i.cancelBubble){if(we){if(!Q||"mouse"===e.pointerType)return;var n,a,s={};for(a in i)n=i[a],s[a]=n&&n.bind?n.bind(i):n;i=s}i.type="dblclick",i.button=0,t(i),r=null}}return e[Ye+We+n]=s,e[Ye+Ve+n]=l,e[Ye+"dblclick"+n]=t,e.addEventListener(We,s,!1),e.addEventListener(Ve,l,!1),e.addEventListener("dblclick",t,!1),this}function Ge(e,t){var n=e[Ye+We+t],r=e[Ye+Ve+t],i=e[Ye+"dblclick"+t];return e.removeEventListener(We,n,!1),e.removeEventListener(Ve,r,!1),Q||e.removeEventListener("dblclick",i,!1),this}var Xe,Ke,Ze,$e,Je,Qe=mt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),et=mt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tt="webkitTransition"===et||"OTransition"===et?et+"End":"transitionend";function nt(e){return"string"===typeof e?document.getElementById(e):e}function rt(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}function it(e,t,n){var r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}function ot(e){var t=e.parentNode;t&&t.removeChild(e)}function at(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function lt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function ct(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=dt(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function ut(e,t){if(void 0!==e.classList)for(var n=h(t),r=0,i=n.length;r100&&r<500||e.target._simulatedClick&&!e._simulated?jt(e):(Ht=n,t(e))}(e,s)}),e.addEventListener(t,o,!1)):"attachEvent"in e&&e.attachEvent("on"+t,o):qe(e,o,i),e[Tt]=e[Tt]||{},e[Tt][i]=o}function Mt(e,t,n,r){var i=t+a(n)+(r?"_"+a(r):""),o=e[Tt]&&e[Tt][i];if(!o)return this;we&&0===t.indexOf("touch")?function(e,t,n){var r=e["_leaflet_"+t+n];"touchstart"===t?e.removeEventListener(Re,r,!1):"touchmove"===t?e.removeEventListener(Me,r,!1):"touchend"===t&&(e.removeEventListener(Pe,r,!1),e.removeEventListener(Ie,r,!1))}(e,t,i):!_e||"dblclick"!==t||!Ge||we&&ae?"removeEventListener"in e?"mousewheel"===t?e.removeEventListener("onwheel"in e?"wheel":"mousewheel",o,!1):e.removeEventListener("mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,o,!1):"detachEvent"in e&&e.detachEvent("on"+t,o):Ge(e,i),e[Tt][i]=null}function Pt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,Wt(e),this}function It(e){return Rt(e,"mousewheel",Pt),this}function Nt(e){return Ot(e,"mousedown touchstart dblclick",Pt),Rt(e,"click",zt),this}function Dt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function jt(e){return Dt(e),Pt(e),this}function Lt(e,t){if(!t)return new M(e.clientX,e.clientY);var n=xt(t),r=n.boundingClientRect;return new M((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}var Bt=fe&&ae?2*window.devicePixelRatio:se?window.devicePixelRatio:1;function Ft(e){return Q?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Bt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}var Ht,Ut={};function zt(e){Ut[e.type]=!0}function Wt(e){var t=Ut[e.type];return Ut[e.type]=!1,t}function Vt(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(r){return!1}return n!==e}var Yt=(Object.freeze||Object)({on:Ot,off:At,stopPropagation:Pt,disableScrollPropagation:It,disableClickPropagation:Nt,preventDefault:Dt,stop:jt,getMousePosition:Lt,getWheelDelta:Ft,fakeStop:zt,skipped:Wt,isExternalTarget:Vt,addListener:Ot,removeListener:At}),qt=R.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=yt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=x(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;tthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,B(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=I((t=t||{}).paddingTopLeft||t.padding||[0,0]),r=I(t.paddingBottomRight||t.padding||[0,0]),i=this.getCenter(),o=this.project(i),a=this.project(e),s=this.getPixelBounds(),l=s.getSize().divideBy(2),c=D([s.min.add(n),s.max.subtract(r)]);if(!c.contains(a)){this._enforcingBounds=!0;var u=o.subtract(a),f=I(a.x+u.x,a.y+u.y);(a.xc.max.x)&&(f.x=o.x-u.x,u.x>0?f.x+=l.x-n.x:f.x-=l.x-r.x),(a.yc.max.y)&&(f.y=o.y-u.y,u.y>0?f.y+=l.y-n.y:f.y-=l.y-r.y),this.panTo(this.unproject(f),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=t.divideBy(2).round(),a=r.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,r,e):navigator.geolocation.getCurrentPosition(t,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(e){var t=e.coords.latitude,n=e.coords.longitude,r=new F(t,n),i=r.toBounds(2*e.coords.accuracy),o=this._locateOptions;if(o.setView){var a=this.getBoundsZoom(i);this.setView(r,o.maxZoom?Math.min(a,o.maxZoom):a)}var s={latlng:r,bounds:i,timestamp:e.timestamp};for(var l in e.coords)"number"===typeof e.coords[l]&&(s[l]=e.coords[l]);this.fire("locationfound",s)},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ot(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)ot(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),r=it("div",n,t||this._mapPane);return e&&(this._panes[e]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new j(t,n)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=B(e),n=I(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),l=this.getSize().subtract(n),c=D(this.project(s,r),this.project(a,r)).getSize(),u=me?this.options.zoomSnap:1,f=l.x/c.x,h=l.y/c.y,d=t?Math.max(f,h):Math.min(f,h);return r=this.getScaleZoom(d,r),u&&(r=Math.round(r/(u/100))*(u/100),r=t?Math.ceil(r/u)*u:Math.floor(r/u)*u),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new N(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"===typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(H(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(I(e),t)},layerPointToLatLng:function(e){var t=I(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){var t=this.project(H(e))._round();return t._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(H(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(B(e))},distance:function(e,t){return this.options.crs.distance(H(e),H(t))},containerPointToLayerPoint:function(e){return I(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return I(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(I(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(e)))},mouseEventToContainerPoint:function(e){return Lt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=nt(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");Ot(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&me,ut(e,"leaflet-container"+(_e?" leaflet-touch":"")+(Ce?" leaflet-retina":"")+(J?" leaflet-oldie":"")+(le?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=rt(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),gt(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ut(e.markerPane,"leaflet-zoom-hide"),ut(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t){gt(this._mapPane,new M(0,0));var n=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r,!1)._move(e,t)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),(r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){gt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[a(this._container)]=this;var t=e?At:Ot;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),me&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,r=[],i="mouseout"===t||"mouseover"===t,o=e.target||e.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===t||"preclick"===t)&&!e._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(t,!0)){if(i&&!Vt(o,e))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||s||i||!Vt(o,e)||(r=[this]),r},_handleDOMEvent:function(e){if(this._loaded&&!Wt(e)){var t=e.type;"mousedown"!==t&&"keypress"!==t&&"keyup"!==t&&"keydown"!==t||St(e.target||e.srcElement),this._fireDOMEvent(e,t)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,r){if("click"===e.type){var i=n({},e);i.type="preclick",this._fireDOMEvent(i,i.type,r)}if(!e._stopped&&(r=(r||[]).concat(this._findEventTargets(e,t))).length){var o=r[0];"contextmenu"===t&&o.listens(t,!0)&&Dt(e);var a={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var s=o.getLatLng&&(!o._radius||o._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(e),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),r=me?this.options.zoomSnap:1;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ft(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n))&&(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=it("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=Qe,n=this._proxy.style[t];vt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),t=this.getZoom();vt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ot(this._proxy),delete this._proxy},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i))&&(x(function(){this._moveStart(!0,!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,ut(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ft(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),x(function(){this._moveEnd(!0)},this))}}),Xt=T.extend({options:{position:"topright"},initialize:function(e){d(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return ut(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ot(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Kt=function(e){return new Xt(e)};Gt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=it("div",t+"control-container",this._container);function r(r,i){var o=t+r+" "+t+i;e[r+i]=it("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)ot(this._controlCorners[e]);ot(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Zt=Xt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,r){return n1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(a(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(e){var t,n=document.createElement("label"),r=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=r):t=this._createRadioElement("leaflet-base-layers_"+a(this),r),this._layerControlInputs.push(t),t.layerId=a(e.layer),Ot(t,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+e.name;var o=document.createElement("div");n.appendChild(o),o.appendChild(t),o.appendChild(i);var s=e.overlay?this._overlaysList:this._baseLayersList;return s.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var e,t,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.checked?r.push(t):e.checked||i.push(t);for(o=0;o=0;i--)e=n[i],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&rt.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$t=Xt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=it("div",t+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,r,i){var o=it("a",n,r);return o.innerHTML=e,o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),Nt(o),Ot(o,"click",jt),Ot(o,"click",i,this),Ot(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";ft(this._zoomInButton,t),ft(this._zoomOutButton,t),(this._disabled||e._zoom===e.getMinZoom())&&ut(this._zoomOutButton,t),(this._disabled||e._zoom===e.getMaxZoom())&&ut(this._zoomInButton,t)}});Gt.mergeOptions({zoomControl:!0}),Gt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $t,this.addControl(this.zoomControl))});var Jt=Xt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t=it("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",t),e.on(n.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),t},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=it("div",t,n)),e.imperial&&(this._iScale=it("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,r,i=3.2808399*e;i>5280?(t=i/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Qt=Xt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(e){d(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=it("div","leaflet-control-attribution"),Nt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),this._container},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(" | ")}}});Gt.mergeOptions({attributionControl:!0}),Gt.addInitHook(function(){this.options.attributionControl&&(new Qt).addTo(this)}),Xt.Layers=Zt,Xt.Zoom=$t,Xt.Scale=Jt,Xt.Attribution=Qt,Kt.layers=function(e,t,n){return new Zt(e,t,n)},Kt.zoom=function(e){return new $t(e)},Kt.scale=function(e){return new Jt(e)},Kt.attribution=function(e){return new Qt(e)};var en=T.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});en.addTo=function(e,t){return e.addHandler(t,this),this};var tn,nn={Events:A},rn=_e?"touchstart mousedown":"mousedown",on={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},an={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},sn=R.extend({options:{clickTolerance:3},initialize:function(e,t,n,r){d(this,r),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(Ot(this._dragStartTarget,rn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(sn._dragging===this&&this.finishDrag(),At(this._dragStartTarget,rn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(!e._simulated&&this._enabled&&(this._moved=!1,!ct(this._element,"leaflet-zoom-anim")&&!(sn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches)&&(sn._dragging=this,this._preventOutline&&St(this._element),wt(),Xe(),!this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,n=Ct(this._element);this._startPoint=new M(t.clientX,t.clientY),this._parentScale=xt(n),Ot(document,an[e.type],this._onMove,this),Ot(document,on[e.type],this._onUp,this)}},_onMove:function(e){if(!e._simulated&&this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new M(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)c&&(a=s,c=l);c>r&&(n[a]=1,e(t,n,r,i,a),e(t,n,r,a,o))}(e,r,t,0,n-1);var i,o=[];for(i=0;it&&(n.push(e[r]),i=r);return it.max.x&&(n|=2),e.yt.max.y&&(n|=8),n}function dn(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function pn(e,t,n,r){var i,o=t.x,a=t.y,s=n.x-o,l=n.y-a,c=s*s+l*l;return c>0&&((i=((e.x-o)*s+(e.y-a)*l)/c)>1?(o=n.x,a=n.y):i>0&&(o+=s*i,a+=l*i)),s=e.x-o,l=e.y-a,r?s*s+l*l:new M(o,a)}function mn(e){return!g(e[0])||"object"!==typeof e[0][0]&&"undefined"!==typeof e[0][0]}function vn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mn(e)}var gn=(Object.freeze||Object)({simplify:ln,pointToSegmentDistance:cn,closestPointOnSegment:function(e,t,n){return pn(e,t,n)},clipSegment:un,_getEdgeIntersection:fn,_getBitCode:hn,_sqClosestPointOnSegment:pn,isFlat:mn,_flat:vn});function yn(e,t,n){var r,i,o,a,s,l,c,u,f,h=[1,4,2,8];for(i=0,c=e.length;i1e-7;l++)t=o*Math.sin(s),t=Math.pow((1-t)/(1+t),o/2),c=Math.PI/2-2*Math.atan(a*t)-s,s+=c;return new F(s*n,e.x*n/r)}},Sn=(Object.freeze||Object)({LonLat:wn,Mercator:_n,SphericalMercator:W}),En=n({},z,{code:"EPSG:3395",projection:_n,transformation:function(){var e=.5/(Math.PI*_n.R);return Y(e,.5,-e,.5)}()}),Cn=n({},z,{code:"EPSG:4326",projection:wn,transformation:Y(1/180,1,-1/180,.5)}),xn=n({},U,{projection:wn,transformation:Y(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)},infinite:!0});U.Earth=z,U.EPSG3395=En,U.EPSG3857=q,U.EPSG900913=G,U.EPSG4326=Cn,U.Simple=xn;var kn=R.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[a(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[a(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",function(){t.off(n,this)},this)}this.onAdd(t),this.getAttribution&&t.attributionControl&&t.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),t.fire("layeradd",{layer:this})}}});Gt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=a(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=a(e);return this._layers[t]?(this._loaded&&e.onRemove(this),e.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(e.getAttribution()),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return!!e&&a(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){e=e?g(e)?e:[e]:[];for(var t=0,n=e.length;tthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t)return a=(r-t)/n,this._map.layerPointToLatLng([o.x-a*(o.x-i.x),o.y-a*(o.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=H(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new j,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return mn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=mn(e),r=0,i=e.length;r=2&&t[0]instanceof F&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){jn.prototype._setLatLngs.call(this,e),mn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new M(t,t);if(e=new N(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;ie.y!==r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c||jn.prototype._containsPoint.call(this,e,!0)}}),Bn=Tn.extend({initialize:function(e,t){d(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r,i=g(e)?e:e.features;if(i){for(t=0,n=i.length;t0?r:[t.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&t.style.hasOwnProperty("objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop;for(var a=0;ai?(t.height=i+"px",ut(e,"leaflet-popup-scrolled")):ft(e,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();gt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var e=this._map,t=parseInt(rt(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,r=this._containerWidth,i=new M(this._containerLeft,-n-this._containerBottom);i._add(yt(this._container));var o=e.layerPointToContainerPoint(i),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),l=I(this.options.autoPanPaddingBottomRight||a),c=e.getSize(),u=0,f=0;o.x+r+l.x>c.x&&(u=o.x+r-c.x+l.x),o.x-u-s.x<0&&(u=o.x-s.x),o.y+n+l.y>c.y&&(f=o.y+n-c.y+l.y),o.y-f-s.y<0&&(f=o.y-s.y),(u||f)&&e.fire("autopanstart").panBy([u,f])}},_onCloseButtonClick:function(e){this._close(),jt(e)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Gt.mergeOptions({closePopupOnClick:!0}),Gt.include({openPopup:function(e,t,n){return e instanceof Qn||(e=new Qn(n).setContent(e)),t&&e.setLatLng(t),this.hasLayer(e)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=e,this.addLayer(e))},closePopup:function(e){return e&&e!==this._popup||(e=this._popup,this._popup=null),e&&this.removeLayer(e),this}}),kn.include({bindPopup:function(e,t){return e instanceof Qn?(d(e,t),this._popup=e,e._source=this):(this._popup&&!t||(this._popup=new Qn(t,this)),this._popup.setContent(e)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e,t){return this._popup&&this._map&&(t=this._popup._prepareOpen(this,e,t),this._map.openPopup(this._popup,t)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(e){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(e)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){var t=e.layer||e.target;this._popup&&this._map&&(jt(e),t instanceof In?this.openPopup(e.layer||e.target,e.latlng):this._map.hasLayer(this._popup)&&this._popup._source===t?this.closePopup():this.openPopup(t,e.latlng))},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var er=Jn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(e){Jn.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(e){Jn.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var e=Jn.prototype.getEvents.call(this);return _e&&!this.options.permanent&&(e.preclick=this._close),e},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=it("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t=this._map,n=this._container,r=t.latLngToContainerPoint(t.getCenter()),i=t.layerPointToContainerPoint(e),o=this.options.direction,a=n.offsetWidth,s=n.offsetHeight,l=I(this.options.offset),c=this._getAnchor();"top"===o?e=e.add(I(-a/2+l.x,-s+l.y+c.y,!0)):"bottom"===o?e=e.subtract(I(a/2-l.x,-l.y,!0)):"center"===o?e=e.subtract(I(a/2+l.x,s/2-c.y+l.y,!0)):"right"===o||"auto"===o&&i.xthis.options.maxZoom||nr&&this._retainParent(i,o,a,r))},_retainChildren:function(e,t,n,r){for(var i=2*e;i<2*e+2;i++)for(var o=2*t;o<2*t+2;o++){var a=new M(i,o);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&i1)this._setView(e,n);else{for(var f=i.min.y;f<=i.max.y;f++)for(var h=i.min.x;h<=i.max.x;h++){var d=new M(h,f);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:a.push(d)}}if(a.sort(function(e,t){return e.distanceTo(o)-t.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(h=0;hn.max.x)||!t.wrapLat&&(e.yn.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return B(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n),o=t.unproject(r,e.z),a=t.unproject(i,e.z);return[o,a]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new j(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new M(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(ot(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){ut(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=c,e.onmousemove=c,J&&this.options.opacity<1&&pt(e,this.options.opacity),te&&!ne&&(e.style.WebkitBackfaceVisibility="hidden")},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),o=this.createTile(this._wrapCoords(e),i(this._tileReady,this,e));this._initTile(o),this.createTile.length<2&&x(i(this._tileReady,this,e,null,o)),gt(o,n),this._tiles[r]={el:o,coords:e,current:!0},t.appendChild(o),this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(pt(n.el,0),k(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(ut(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),J||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new M(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new N(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}}),rr=nr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(e,t){this._url=e,(t=d(this,t)).detectRetina&&Ce&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=Math.max(0,t.minZoom)),"string"===typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),te||this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return Ot(n,"load",i(this._tileOnLoad,this,t,n)),Ot(n,"error",i(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Ce?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t["-y"]=r}return v(this._url,n(t,this.options))},_tileOnLoad:function(e,t){J?setTimeout(i(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var r=this.options.errorTileUrl;r&&t.getAttribute("src")!==r&&(t.src=r),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(e=t-e),e+r},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=c,t.onerror=c,t.complete||(t.src=b,ot(t),delete this._tiles[e]))},_removeTile:function(e){var t=this._tiles[e];if(t)return ie||t.el.setAttribute("src",b),nr.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==b))return nr.prototype._tileReady.call(this,e,t,n)}});function ir(e,t){return new rr(e,t)}var or=rr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var r=n({},this.defaultWmsParams);for(var i in t)i in this.options||(r[i]=t[i]);var o=(t=d(this,t)).detectRetina&&Ce?2:1,a=this.getTileSize();r.width=a.x*o,r.height=a.y*o,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,rr.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,r=D(n.project(t[0]),n.project(t[1])),i=r.min,o=r.max,a=(this._wmsVersion>=1.3&&this._crs===Cn?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),s=rr.prototype.getTileUrl.call(this,e);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});rr.WMS=or,ir.wms=function(e,t){return new or(e,t)};var ar=kn.extend({options:{padding:.1,tolerance:0},initialize:function(e){d(this,e),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ut(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),r=yt(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,t),a=this._map.project(e,t),s=a.subtract(o),l=i.multiplyBy(-n).add(r).add(i).subtract(s);me?vt(this._container,l,n):gt(this._container,l)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new N(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sr=ar.extend({getEvents:function(){var e=ar.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ar.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Ot(e,"mousemove",s(this._onMouseMove,32,this),this),Ot(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ot(e,"mouseout",this._handleMouseOut,this),this._ctx=e.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,ot(this._container),At(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ar.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),r=Ce?2:1;gt(t,e.min),t.width=r*n.x,t.height=r*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Ce&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){ar.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[a(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[a(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"===typeof e.options.dashArray){var t,n,r=e.options.dashArray.split(/[, ]+/),i=[];for(n=0;n')}}catch(e){return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),ur={_initContainer:function(){this._container=it("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ar.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=cr("shape");ut(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=cr("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;ot(t),e.removeInteractiveTarget(t),delete this._layers[a(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,r=e.options,i=e._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(t||(t=e._stroke=cr("stroke")),i.appendChild(t),t.weight=r.weight+"px",t.color=r.color,t.opacity=r.opacity,r.dashArray?t.dashStyle=g(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=r.lineCap.replace("butt","flat"),t.joinstyle=r.lineJoin):t&&(i.removeChild(t),e._stroke=null),r.fill?(n||(n=e._fill=cr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),r=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+r+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){st(e._container)},_bringToBack:function(e){lt(e._container)}},fr=Oe?cr:X,hr=ar.extend({getEvents:function(){var e=ar.prototype.getEvents.call(this);return e.zoomstart=this._onZoomStart,e},_initContainer:function(){this._container=fr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ot(this._container),At(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){ar.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),gt(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=fr("path");e.options.className&&ut(t,e.options.className),e.options.interactive&&ut(t,"leaflet-interactive"),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){ot(e._path),e.removeInteractiveTarget(e._path),delete this._layers[a(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,K(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),r=Math.max(Math.round(e._radiusY),1)||n,i="a"+n+","+r+" 0 1,0 ",o=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(e,o)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){st(e._path)},_bringToBack:function(e){lt(e._path)}});function dr(e){return ke||Oe?new hr(e):null}Oe&&hr.include(ur),Gt.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&lr(e)||dr(e)}});var pr=Ln.extend({initialize:function(e,t){Ln.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=B(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});hr.create=fr,hr.pointsToPath=K,Bn.geometryToLayer=Fn,Bn.coordsToLatLng=Hn,Bn.coordsToLatLngs=Un,Bn.latLngToCoords=zn,Bn.latLngsToCoords=Wn,Bn.getFeature=Vn,Bn.asFeature=Yn,Gt.mergeOptions({boxZoom:!0});var mr=en.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Ot(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){At(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ot(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),Xe(),wt(),this._startPoint=this._map.mouseEventToContainerPoint(e),Ot(document,{contextmenu:jt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=it("div","leaflet-zoom-box",this._container),ut(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new N(this._point,this._startPoint),n=t.getSize();gt(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ot(this._box),ft(this._container,"leaflet-crosshair")),Ke(),_t(),At(document,{contextmenu:jt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var t=new j(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}});Gt.addInitHook("addHandler","boxZoom",mr),Gt.mergeOptions({doubleClickZoom:!0});var vr=en.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r;"center"===t.options.doubleClickZoom?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}});Gt.addInitHook("addHandler","doubleClickZoom",vr),Gt.mergeOptions({dragging:!0,inertia:!ne,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gr=en.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new sn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}ut(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ft(this._map._container,"leaflet-grab"),ft(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=B(this._map.options.maxBounds);this._offsetLimit=D(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.xt.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,o=(r+t+n)%e-t-n,a=Math.abs(i+n)0?o:-o))-t;this._delta=0,this._startTime=null,a&&("center"===e.options.scrollWheelZoom?e.setZoom(t+a):e.setZoomAround(this._lastMousePos,t+a))}});Gt.addInitHook("addHandler","scrollWheelZoom",br),Gt.mergeOptions({tap:!0,tapTolerance:15});var wr=en.extend({addHooks:function(){Ot(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){At(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(e.touches){if(Dt(e),this._fireClick=!0,e.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var t=e.touches[0],n=t.target;this._startPos=this._newPos=new M(t.clientX,t.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ut(n,"leaflet-active"),this._holdTimeout=setTimeout(i(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",t))},this),1e3),this._simulateEvent("mousedown",t),Ot(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(e){if(clearTimeout(this._holdTimeout),At(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&e&&e.changedTouches){var t=e.changedTouches[0],n=t.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ft(n,"leaflet-active"),this._simulateEvent("mouseup",t),this._isTapValid()&&this._simulateEvent("click",t)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(e){var t=e.touches[0];this._newPos=new M(t.clientX,t.clientY),this._simulateEvent("mousemove",t)},_simulateEvent:function(e,t){var n=document.createEvent("MouseEvents");n._simulated=!0,t.target._simulatedClick=!0,n.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(n)}});_e&&!we&&Gt.addInitHook("addHandler","tap",wr),Gt.mergeOptions({touchZoom:_e&&!ne,bounceAtZoomLimits:!0});var _r=en.extend({addHooks:function(){ut(this._map._container,"leaflet-touch-zoom"),Ot(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),At(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),Ot(document,"touchmove",this._onTouchMove,this),Ot(document,"touchend",this._onTouchEnd,this),Dt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(o,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoomt.getMaxZoom()&&o>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var s=i(t._move,t,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=x(s,this,!0),Dt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),At(document,"touchmove",this._onTouchMove),At(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Gt.addInitHook("addHandler","touchZoom",_r),Gt.BoxZoom=mr,Gt.DoubleClickZoom=vr,Gt.Drag=gr,Gt.Keyboard=yr,Gt.ScrollWheelZoom=br,Gt.Tap=wr,Gt.TouchZoom=_r,Object.freeze=t,e.version="1.5.1+build.2e3e0ffb",e.Control=Xt,e.control=Kt,e.Browser=Ae,e.Evented=R,e.Mixin=nn,e.Util=O,e.Class=T,e.Handler=en,e.extend=n,e.bind=i,e.stamp=a,e.setOptions=d,e.DomEvent=Yt,e.DomUtil=kt,e.PosAnimation=qt,e.Draggable=sn,e.LineUtil=gn,e.PolyUtil=bn,e.Point=M,e.point=I,e.Bounds=N,e.bounds=D,e.Transformation=V,e.transformation=Y,e.Projection=Sn,e.LatLng=F,e.latLng=H,e.LatLngBounds=j,e.latLngBounds=B,e.CRS=U,e.GeoJSON=Bn,e.geoJSON=Gn,e.geoJson=Xn,e.Layer=kn,e.LayerGroup=On,e.layerGroup=function(e,t){return new On(e,t)},e.FeatureGroup=Tn,e.featureGroup=function(e){return new Tn(e)},e.ImageOverlay=Kn,e.imageOverlay=function(e,t,n){return new Kn(e,t,n)},e.VideoOverlay=Zn,e.videoOverlay=function(e,t,n){return new Zn(e,t,n)},e.SVGOverlay=$n,e.svgOverlay=function(e,t,n){return new $n(e,t,n)},e.DivOverlay=Jn,e.Popup=Qn,e.popup=function(e,t){return new Qn(e,t)},e.Tooltip=er,e.tooltip=function(e,t){return new er(e,t)},e.Icon=An,e.icon=function(e){return new An(e)},e.DivIcon=tr,e.divIcon=function(e){return new tr(e)},e.Marker=Pn,e.marker=function(e,t){return new Pn(e,t)},e.TileLayer=rr,e.tileLayer=ir,e.GridLayer=nr,e.gridLayer=function(e){return new nr(e)},e.SVG=hr,e.svg=dr,e.Renderer=ar,e.Canvas=sr,e.canvas=lr,e.Path=In,e.CircleMarker=Nn,e.circleMarker=function(e,t){return new Nn(e,t)},e.Circle=Dn,e.circle=function(e,t,n){return new Dn(e,t,n)},e.Polyline=jn,e.polyline=function(e,t){return new jn(e,t)},e.Polygon=Ln,e.polygon=function(e,t){return new Ln(e,t)},e.Rectangle=pr,e.rectangle=function(e,t){return new pr(e,t)},e.Map=Gt,e.map=function(e,t){return new Gt(e,t)};var Sr=window.L;e.noConflict=function(){return window.L=Sr,this},window.L=e}(t)},function(e,t,n){"use strict";var r=n(30),i=n(111).filter;r({target:"Array",proto:!0,forced:!n(141)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(91),i=n(73),o=n(72),a="[object String]";e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&r(e)==a}},function(e,t,n){var r=n(38);e.exports=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=n(441)},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(64),i=n(283),o=n(59),a=n(131),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(110),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=t;r.version=n(586).version,r.utils=n(587),r.rand=n(350),r.curve=n(183),r.curves=n(592),r.ec=n(600),r.eddsa=n(604)},function(e,t,n){var r=n(376),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n(10),n(11),n(12),n(7),n(19),n(20),n(6),n(8),n(168),n(9);var r=n(5),i=n(14),o=n(2),a=n(1),s={_hooksStorage:Object.create(null),addHook:function(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey:function(e){var t=this;Object(a.arrayEach)(this._hooksStorage[e]||[],function(n){t.hot.removeHook(e,n)})},clearHooks:function(){var e=this;Object(o.objectEach)(this._hooksStorage,function(t,n){return e.removeHooksByKey(n)}),this._hooksStorage={}}};Object(o.defineGetter)(s,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});var l=s;function c(e){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;nn[2]&&(r=n[0],n[0]=n[2],n[2]=r),n[1]>n[3]&&(r=n[1],n[1]=n[3],n[3]=r)):n=[this.row,this.col,null,null],this.hot.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")}},{key:"beginEditing",value:function(e,t){if(this.state===m.VIRGIN){if(this.hot.view.scrollViewport(new r.a(this.row,this.col)),this.state=m.EDITING,this.isInFullEditMode()){var n="string"===typeof e?e:Object(i.stringify)(this.originalValue);this.setValue(n)}this.open(t),this._opened=!0,this.focus(),this.hot.view.render(),this.hot.runHooks("afterBeginEditing",this.row,this.col)}}},{key:"finishEditing",value:function(e,t,n){var r,i=this;if(n){var o=this._closeCallback;this._closeCallback=function(e){o&&o(e),n(e),i.hot.view.render()}}if(!this.isWaiting())if(this.state!==m.VIRGIN){if(this.state===m.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();var a=this.getValue();r=this.hot.getSettings().trimWhitespace?[["string"===typeof a?String.prototype.trim.call(a||""):a]]:[[a]],this.state=m.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",function(e){i.state=m.FINISHED,i.discardEditor(e)}):(this.state=m.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(function(){i._fireCallbacks(!0)})}},{key:"cancelChanges",value:function(){this.state=m.FINISHED,this.discardEditor()}},{key:"discardEditor",value:function(e){this.state===m.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=m.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=m.VIRGIN,this._fireCallbacks(!0)))}},{key:"enableFullEditMode",value:function(){this._fullEditMode=!0}},{key:"isInFullEditMode",value:function(){return this._fullEditMode}},{key:"isOpened",value:function(){return this._opened}},{key:"isWaiting",value:function(){return this.state===m.WAITING}},{key:"checkEditorSection",value:function(){var e=this.hot.countRows(),t="";return this.row=e-this.hot.getSettings().fixedRowsBottom?t=this.col1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,l,c,u=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,m=new RegExp(e.source,h+"g");(s=f.call(m,r))&&!((l=m.lastIndex)>p&&(u.push(r.slice(p,s.index)),s.length>1&&s.index=o));)m.lastIndex===s.index&&m.lastIndex++;return p===r.length?!c&&m.test("")||u.push(""):u.push(r.slice(p)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=void 0==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),v=f.unicode,g=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(m?"y":"g"),y=new d(m?f:"^(?:"+f.source+")",g),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===u(y,h)?[h]:[];for(var w=0,_=0,S=[];_0;)t=(n-1)%a,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/a,10);return r}function l(e){var t=0;if(e)for(var n=0,r=e.length-1;n0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,i=[];for(e=0;e0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,i=[];for(e=0;e=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var l=0,c=t;return l+=(c=c+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,l,c){var u=0,f=t;return u+=(f=f+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,l,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(150),i=n(678),o=n(679),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:l&&l in Object(e)?i(e):o(e)}},function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});n(32),n(7),n(6),n(102),n(8),n(9);var r=n(21),i=n(18),o=new r.a,a=new Set,s=0;function l(e){0===s&&(o.addEventListener(e,"keydown",function(e){a.has(e.keyCode)||a.add(e.keyCode)}),o.addEventListener(e,"keyup",function(e){a.has(e.keyCode)&&a.delete(e.keyCode)}),o.addEventListener(e,"visibilitychange",function(){e.hidden&&a.clear()}),o.addEventListener(e.defaultView,"blur",function(){a.clear()})),s+=1}function c(){s>0&&(s-=1),0===s&&(o.clearEvents(),a.clear(),s=0)}function u(){return Array.from(a.values()).some(function(e){return Object(i.isCtrlMetaKey)(e)})}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(162),i=n(304);e.exports=r("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},i,!0)},function(e,t,n){"use strict";var r=n(30),i=n(216),o=n(78),a=n(38),s=n(165),l=[].sort,c=[1,2,3],u=a(function(){c.sort(void 0)}),f=a(function(){c.sort(null)}),h=s("sort");r({target:"Array",proto:!0,forced:u||!f||h},{sort:function(e){return void 0===e?l.call(o(this)):l.call(o(this),i(e))}})},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"instanceToHTML",function(){return o}),n.d(t,"_dataToHTML",function(){return a}),n.d(t,"htmlToGridSettings",function(){return l});n(10),n(11),n(12),n(25),n(62),n(471),n(32),n(44),n(7),n(76),n(46),n(6),n(26),n(50),n(8),n(57),n(9);var r=n(14);function i(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0?o[0].length:0,l=["","
"],c=t?["",""]:[],u=["",""],f=n?1:0,h=t?1:0,d=0;d".concat(e.getColHeader(v-f),"");else if(g)y="".concat(e.getRowHeader(d-h),"");else{var b=o[d][v],w=e.getCellMeta(d-f,v-h),_=w.hidden,S=w.rowspan,E=w.colspan;if(!_){var C=[];if(S&&C.push('rowspan="'.concat(S,'"')),E&&C.push('colspan="'.concat(E,'"')),Object(r.isEmpty)(b))y="");else{var x=b.toString().replace(/((\r\n|\n)?|\r\n|\n)/g,"
\r\n").replace(/\x20/gi," ").replace(/\t/gi," ");y="").concat(x,"")}}}m.push(y)}var k=[""].concat(m,[""]).join("");p?c.splice(1,0,k):u.splice(-1,0,k)}return l.splice(1,0,c.join(""),u.join("")),l.join("")}function a(e){for(var t=e.length,n=[""],i=0;i");for(var l=0;l(\r\n|\n)?|\r\n|\n)/g,"
\r\n").replace(/\x20/gi," ").replace(/\t/gi," ");s.push("
"))}n.push.apply(n,[""].concat(s,[""])),i+1===t&&n.push("")}return n.push("
".concat(u,"
"),n.join("")}function s(e,t){var n;return e.msMatchesSelector?n=e.msMatchesSelector(t):e.matches&&(n=e.matches(t)),n}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},r=t.createDocumentFragment(),o=t.createElement("div");r.appendChild(o);var a=e;if("string"===typeof a&&(o.insertAdjacentHTML("afterbegin","".concat(a)),a=o.querySelector("table")),a&&function(e){return"TABLE"===(e&&e.nodeName||"")}(a)){var l=o.querySelector("style"),c=null,u=[];l&&(t.body.appendChild(l),l.disabled=!0,c=l.sheet,u=c?Array.from(c.cssRules):[],t.body.removeChild(l));var f,h=o.querySelector('meta[name$="enerator"]'),d=null!==a.querySelector("tbody th"),p=Array.from(a.querySelector("tr").cells).reduce(function(e,t){return e+t.colSpan},0)-(d?1:0),m=a.tFoot&&Array.from(a.tFoot.rows)||[],v=[],g=!1,y=0;if(a.tHead){var b=Array.from(a.tHead.rows).filter(function(e){var t=null!==e.querySelector("td");return t&&v.push(e),!t});g=(y=b.length)>0,y>1?n.nestedHeaders=Array.from(b).reduce(function(e,t){var n=Array.from(t.cells).reduce(function(e,t,n){if(d&&0===n)return e;var r=t.colSpan,i=t.innerHTML,o=r>1?{label:i,colspan:r}:i;return e.push(o),e},[]);return e.push(n),e},[]):g&&(n.colHeaders=Array.from(b[0].children).reduce(function(e,t,n){return d&&0===n?e:(e.push(t.innerHTML),e)},[]))}v.length&&(n.fixedRowsTop=v.length),m.length&&(n.fixedRowsBottom=m.length);var w=[].concat(v,i(Array.from(a.tBodies).reduce(function(e,t){return e.push.apply(e,i(t.rows)),e},[])),i(m));f=w.length;for(var _=Array(f),S=0;S1||o>1){for(var l=x;l/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/ /gi," "):h&&/excel/gi.test(h.content)?_[x][a]=r.replace(/[\r\n]?[\x20]{0,2}/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/ /gi," "):_[x][a]=r.replace(/[\r\n]?/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/ /gi," ")}else C.push(r)},R=0;R2)if(43===(t=(c=v(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;si)return NaN;return parseInt(o,r)}return+c};if(o("Number",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var _,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(b?f(function(){y.valueOf.call(n)}):"Number"!=l(n))?c(new g(w(t)),n,S):w(t)},E=r?d(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;E.length>C;C++)s(g,_=E[C])&&!s(S,_)&&m(S,_,p(g,_));S.prototype=y,y.constructor=S,a(i,"Number",S)}},function(e,t,n){n(30)({target:"Number",stat:!0},{isInteger:n(468)})},function(e,t,n){"use strict";var r=n(162),i=n(304);e.exports=r("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},i)},function(e,t,n){e.exports=!n(122)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(29).Buffer,i=n(79).Transform,o=n(144).StringDecoder;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(27)(a,i),a.prototype.update=function(e,t,n){"string"===typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){r=i}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(n){t=n}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),l=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var n=s.styles[t];return n?"\x1b["+s.colors[n][0]+"m"+e+"\x1b["+s.colors[n][1]+"m":e}function c(e,t){return e}function u(e,n,r){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return g(i)||(i=u(e,i,r)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(g(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(E(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var c,w="",C=!1,x=["{","}"];(d(n)&&(C=!0,x=["[","]"]),E(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(w=" "+RegExp.prototype.toString.call(n)),_(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||C&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=C?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,w,x)):x[0]+w+x[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),O(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function m(e){return null===e}function v(e){return"number"===typeof e}function g(e){return"string"===typeof e}function y(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===C(e)}function w(e){return"object"===typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===C(e)}function S(e){return w(e)&&("[object Error]"===C(e)||e instanceof Error)}function E(e){return"function"===typeof e}function C(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(y(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=g,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=y,t.isRegExp=b,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(636);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",function(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}(),t.format.apply(t,arguments))},t.inherits=n(27),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var T="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!==typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),i=[],o=0;o1&&""===i[i.length-1]&&i.pop(),t=0,r=i.length;t0&&(a+="\t"),"string"===typeof(o=e[t][r])?o.indexOf("\n")>-1?a+='"'+o.replace(/"/g,'""')+'"':a+=o:a+=null===o||void 0===o?"":o;t!==n-1&&(a+="\n")}return a};t.parse=r,t.stringify=i}(window)},function(e,t,n){var r;e.exports=function e(t,n,i){function o(s,l){if(!n[s]){if(!t[s]){var c="function"==typeof r&&r;if(!l&&c)return r(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return o(n||e)},f,f.exports,e,t,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s0||e===t?t:t-1}function r(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rc^n?1:-1;for(s=(l=i.length)<(c=o.length)?l:c,a=0;ao[a]^n?1:-1;return l==c?0:l>c^n?1:-1}function o(e,t,n){return(e=u(e))>=t&&e<=n}function a(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(e,t,n){for(var r,i,o=[0],a=0,s=e.length;an-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function l(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function c(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(n=e.length,++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t15&&R(N,g,e),o=!1):l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=x(s,10,t,l.s)}else{if(e instanceof f)return l.s=e.s,l.e=e.e,l.c=(e=e.c)?e.slice():e,void(N=0);if((o="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return l.e=r,l.c=[e],void(N=0)}s=e+""}else{if(!h.test(s=e+""))return I(l,s,o);l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(i=s.search(/e/i))>0?(r<0&&(r=i),r+=+s.slice(i+1),s=s.substring(0,i)):r<0&&(r=s.length),i=0;48===s.charCodeAt(i);i++);for(a=s.length;48===s.charCodeAt(--a););if(s=s.slice(i,a+1))if(a=s.length,o&&W&&a>15&&(e>_||e!==p(e))&&R(N,g,l.s*e),(r=r-i-1)>z)l.c=l.e=null;else if(r=0&&(l=G,G=0,e=e.replace(".",""),h=(p=new f(n)).pow(e.length-m),G=l,p.c=s(c(r(h.c),h.e),10,t),p.e=p.c.length),a=l=(d=s(e,n,t)).length;0==d[--l];d.pop());if(!d[0])return"0";if(m<0?--a:(h.c=d,h.e=a,h.s=i,d=(h=P(h,p,v,g,t)).c,u=h.r,a=h.e),m=d[o=a+v+1],l=t/2,u=u||o<0||null!=d[o+1],u=g<4?(null!=m||u)&&(0==g||g==(h.s<0?3:2)):m>l||m==l&&(4==g||u||6==g&&1&d[o-1]||g==(h.s<0?8:7)),o<1||!d[0])e=u?c("1",-v):"0";else{if(d.length=o,u)for(--t;++d[--o]>t;)d[o]=0,o||(++a,d=[1].concat(d));for(l=d.length;!d[--l];);for(m=0,e="";m<=l;e+=y.charAt(d[m++]));e=c(e,a)}return e}function k(e,t,n,i){var o,a,s,u,h;if(n=null!=n&&V(n,0,8,i,v)?0|n:B,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)h=r(e.c),h=19==i||24==i&&s<=F?l(h,s):c(h,s);else if(e=M(new f(e),t,n),a=e.e,h=r(e.c),u=h.length,19==i||24==i&&(t<=a||a<=F)){for(;uu){if(--t>0)for(h+=".";t--;h+="0");}else if((t+=a-u)>0)for(a+1==u&&(h+=".");t--;h+="0");return e.s<0&&o?"-"+h:h}function O(e,t){var n,r,i=0;for(a(e[0])&&(e=e[0]),n=new f(e[0]);++in||e!=u(e))&&R(r,(i||"decimal places")+(en?" out of range":" not an integer"),e),!0}function A(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*w-1)>z?e.c=e.e=null:n=10;s/=10,i++);if((o=t-i)<0)o+=w,a=t,u=(l=f[c=0])/h[i-a-1]%10|0;else if((c=d((o+1)/w))>=f.length){if(!r)break e;for(;f.length<=c;f.push(0));l=u=0,i=1,a=(o%=w)-w+1}else{for(l=s=f[c],i=1;s>=10;s/=10,i++);u=(a=(o%=w)-w+i)<0?0:l/h[i-a-1]%10|0}if(r=r||t<0||null!=f[c+1]||(a<0?l:l%h[i-a-1]),r=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/h[i-a]:0:f[c-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=h[(w-t%w)%w],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=c,s=1,c--):(f.length=c+1,s=h[w-o],f[c]=a>0?p(l/h[i-a]%h[a])*s:0),r)for(;;){if(0==c){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,f[0]==b&&(f[0]=1));break}if(f[c]+=s,f[c]!=b)break;f[c--]=0,s=1}for(o=f.length;0===f[--o];f.pop());}e.e>z?e.c=e.e=null:e.en)return null!=(e=i[n++])};return l(t="DECIMAL_PLACES")&&V(e,0,C,2,t)&&(L=0|e),r[t]=L,l(t="ROUNDING_MODE")&&V(e,0,8,2,t)&&(B=0|e),r[t]=B,l(t="EXPONENTIAL_AT")&&(a(e)?V(e[0],-C,0,2,t)&&V(e[1],0,C,2,t)&&(F=0|e[0],H=0|e[1]):V(e,-C,C,2,t)&&(F=-(H=0|(e<0?-e:e)))),r[t]=[F,H],l(t="RANGE")&&(a(e)?V(e[0],-C,-1,2,t)&&V(e[1],1,C,2,t)&&(U=0|e[0],z=0|e[1]):V(e,-C,C,2,t)&&(0|e?U=-(z=0|(e<0?-e:e)):W&&R(2,t+" cannot be zero",e))),r[t]=[U,z],l(t="ERRORS")&&(e===!!e||1===e||0===e?(N=0,V=(W=!!e)?T:o):W&&R(2,t+m,e)),r[t]=W,l(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?Y=!0:W?R(2,"crypto unavailable",e?void 0:crypto):Y=!1:Y=!1:W&&R(2,t+m,e)),r[t]=Y,l(t="MODULO_MODE")&&V(e,0,9,2,t)&&(q=0|e),r[t]=q,l(t="POW_PRECISION")&&V(e,0,C,2,t)&&(G=0|e),r[t]=G,l(t="FORMAT")&&("object"==typeof e?X=e:W&&R(2,t+" not an object",e)),r[t]=X,r},f.max=function(){return O(arguments,D.lt)},f.min=function(){return O(arguments,D.gt)},f.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return p(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,r,i,o,a,s=0,l=[],c=new f(j);if(t=null!=t&&V(t,0,C,14)?0|t:L,o=d(t/w),Y)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(o*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[s]=r[0],n[s+1]=r[1]):(l.push(a%1e14),s+=2);s=o/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(o*=7);s=9e15?crypto.randomBytes(7).copy(n,s):(l.push(a%1e14),s+=7);s=o/7}else Y=!1,W&&R(14,"crypto unavailable",crypto);if(!Y)for(;s=10;a/=10,s++);sr?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(i,o,a,s,l){var c,u,h,d,m,v,g,y,_,S,E,C,x,k,O,T,A,R=i.s==o.s?1:-1,P=i.c,I=o.c;if(!(P&&P[0]&&I&&I[0]))return new f(i.s&&o.s&&(P?!I||P[0]!=I[0]:I)?P&&0==P[0]||!I?0*R:R/0:NaN);for(_=(y=new f(R)).c=[],R=a+(u=i.e-o.e)+1,l||(l=b,u=n(i.e/w)-n(o.e/w),R=R/w|0),h=0;I[h]==(P[h]||0);h++);if(I[h]>(P[h]||0)&&u--,R<0)_.push(1),d=!0;else{for(k=P.length,T=I.length,h=0,R+=2,(m=p(l/(I[0]+1)))>1&&(I=e(I,m,l),P=e(P,m,l),T=I.length,k=P.length),x=T,E=(S=P.slice(0,T)).length;E=l/2&&O++;do{if(m=0,(c=t(I,S,T,E))<0){if(C=S[0],T!=E&&(C=C*l+(S[1]||0)),(m=p(C/O))>1)for(m>=l&&(m=l-1),g=(v=e(I,m,l)).length,E=S.length;1==t(v,S,g,E);)m--,r(v,T=10;R/=10,h++);M(y,a+(y.e=h+u*w-1)+1,s,d)}else y.e=u,y.r=+d;return y}}(),I=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,l){var c,u=s?a:a.replace(i,"");if(r.test(u))o.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return c="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=c?e:t}),l&&(c=l,u=u.replace(t,"$1").replace(n,"0.$1")),a!=u))return new f(u,c);W&&R(N,"not a"+(l?" base "+l:"")+" number",a),o.s=null}o.c=o.e=null,N=0}}(),D.absoluteValue=D.abs=function(){var e=new f(this);return e.s<0&&(e.s=1),e},D.ceil=function(){return M(new f(this),this.e+1,2)},D.comparedTo=D.cmp=function(e,t){return N=1,i(this,new f(e,t))},D.decimalPlaces=D.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-n(this.e/w))*w,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},D.dividedBy=D.div=function(e,t){return N=3,P(this,new f(e,t),L,B)},D.dividedToIntegerBy=D.divToInt=function(e,t){return N=4,P(this,new f(e,t),0,1)},D.equals=D.eq=function(e,t){return N=5,0===i(this,new f(e,t))},D.floor=function(){return M(new f(this),this.e+1,3)},D.greaterThan=D.gt=function(e,t){return N=6,i(this,new f(e,t))>0},D.greaterThanOrEqualTo=D.gte=function(e,t){return N=7,1===(t=i(this,new f(e,t)))||0===t},D.isFinite=function(){return!!this.c},D.isInteger=D.isInt=function(){return!!this.c&&n(this.e/w)>this.c.length-2},D.isNaN=function(){return!this.s},D.isNegative=D.isNeg=function(){return this.s<0},D.isZero=function(){return!!this.c&&0==this.c[0]},D.lessThan=D.lt=function(e,t){return N=8,i(this,new f(e,t))<0},D.lessThanOrEqualTo=D.lte=function(e,t){return N=9,-1===(t=i(this,new f(e,t)))||0===t},D.minus=D.sub=function(e,t){var r,i,o,a,s=this,l=s.s;if(N=10,e=new f(e,t),t=e.s,!l||!t)return new f(NaN);if(l!=t)return e.s=-t,s.plus(e);var c=s.e/w,u=e.e/w,h=s.c,d=e.c;if(!c||!u){if(!h||!d)return h?(e.s=-t,e):new f(d?s:NaN);if(!h[0]||!d[0])return d[0]?(e.s=-t,e):new f(h[0]?s:3==B?-0:0)}if(c=n(c),u=n(u),h=h.slice(),l=c-u){for((a=l<0)?(l=-l,o=h):(u=c,o=d),o.reverse(),t=l;t--;o.push(0));o.reverse()}else for(i=(a=(l=h.length)<(t=d.length))?l:t,l=t=0;t0)for(;t--;h[r++]=0);for(t=b-1;i>l;){if(h[--i]0?(s=a,r=c):(o=-o,r=l),r.reverse();o--;r.push(0));r.reverse()}for((o=l.length)-(t=c.length)<0&&(r=c,c=l,l=r,t=o),o=0;t;)o=(l[--t]=l[t]+c[t]+o)/b|0,l[t]=b===l[t]?0:l[t]%b;return o&&(l=[o].concat(l),++s),A(e,l,s)},D.precision=D.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(W&&R(13,"argument"+m,e),e!=!!e&&(e=null)),!i)return null;if(n=i.length-1,t=n*w+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},D.round=function(e,t){var n=new f(this);return(null==e||V(e,0,C,15))&&M(n,~~e+this.e+1,null!=t&&V(t,0,8,15,v)?0|t:B),n},D.shift=function(e){var t=this;return V(e,-_,_,16,"argument")?t.times("1e"+u(e)):new f(t.c&&t.c[0]&&(e<-_||e>_)?t.s*(e<0?0:1/0):t)},D.squareRoot=D.sqrt=function(){var e,t,i,o,a,s=this,l=s.c,c=s.s,u=s.e,h=L+4,d=new f("0.5");if(1!==c||!l||!l[0])return new f(!c||c<0&&(!l||l[0])?NaN:l?s:1/0);if(0==(c=Math.sqrt(+s))||c==1/0?(((t=r(l)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=n((u+1)/2)-(u<0||u%2),i=new f(t=c==1/0?"1e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):i=new f(c+""),i.c[0])for((c=(u=i.e)+h)<3&&(c=0);;)if(a=i,i=d.times(a.plus(P(s,a,h,1))),r(a.c).slice(0,c)===(t=r(i.c)).slice(0,c)){if(i.e=0;){for(r=0,p=C[o]%y,m=C[o]/y|0,a=o+(s=c);a>o;)r=((u=p*(u=S[--s]%y)+(l=m*u+(h=S[s]/y|0)*p)%y*y+v[a]+r)/g|0)+(l/y|0)+m*h,v[a--]=u%g;v[a]=r}return r?++i:v.splice(0,1),A(e,v,i)},D.toDigits=function(e,t){var n=new f(this);return e=null!=e&&V(e,1,C,18,"precision")?0|e:null,t=null!=t&&V(t,0,8,18,v)?0|t:B,e?M(n,e,t):n},D.toExponential=function(e,t){return k(this,null!=e&&V(e,0,C,19)?1+~~e:null,t,19)},D.toFixed=function(e,t){return k(this,null!=e&&V(e,0,C,20)?~~e+this.e+1:null,t,20)},D.toFormat=function(e,t){var n=k(this,null!=e&&V(e,0,C,21)?~~e+this.e+1:null,t,21);if(this.c){var r,i=n.split("."),o=+X.groupSize,a=+X.secondaryGroupSize,s=X.groupSeparator,l=i[0],c=i[1],u=this.s<0,f=u?l.slice(1):l,h=f.length;if(a&&(r=o,o=a,a=r,h-=r),o>0&&h>0){for(r=h%o||o,l=f.substr(0,r);r0&&(l+=s+f.slice(r)),u&&(l="-"+l)}n=c?l+X.decimalSeparator+((a=+X.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+X.fractionGroupSeparator):c):l}return n},D.toFraction=function(e){var t,n,i,o,a,s,l,c,u,h=W,d=this,p=d.c,m=new f(j),v=n=new f(j),g=l=new f(j);if(null!=e&&(W=!1,s=new f(e),W=h,(h=s.isInt())&&!s.lt(j)||(W&&R(22,"max denominator "+(h?"out of range":"not an integer"),e),e=!h&&s.c&&M(s,s.e+1,1).gte(j)?s:null)),!p)return d.toString();for(u=r(p),o=m.e=u.length-d.e-1,m.c[0]=S[(a=o%w)<0?w+a:a],e=!e||s.cmp(m)>0?o>0?m:v:s,a=z,z=1/0,s=new f(u),l.c[0]=0;c=P(s,m,0,1),1!=(i=n.plus(c.times(g))).cmp(e);)n=g,g=i,v=l.plus(c.times(i=v)),l=i,m=s.minus(c.times(i=m)),s=i;return i=P(e.minus(n),g,0,1),l=l.plus(i.times(v)),n=n.plus(i.times(g)),l.s=v.s=d.s,t=P(v,g,o*=2,B).minus(d).abs().cmp(P(l,n,o,B).minus(d).abs())<1?[v.toString(),g.toString()]:[l.toString(),n.toString()],z=a,t},D.toNumber=function(){return+this},D.toPower=D.pow=function(e,t){var n,r,i,o=p(e<0?-e:+e),a=this;if(null!=t&&(N=23,t=new f(t)),!V(e,-_,_,23,"exponent")&&(!isFinite(e)||o>_&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return n=Math.pow(+a,e),new f(t?n%t:n);for(t?e>1&&a.gt(j)&&a.isInt()&&t.gt(j)&&t.isInt()?a=a.mod(t):(i=t,t=null):G&&(n=d(G/w+2)),r=new f(j);;){if(o%2){if(!(r=r.times(a)).c)break;n?r.c.length>n&&(r.c.length=n):t&&(r=r.mod(t))}if(!(o=p(o/2)))break;a=a.times(a),n?a.c&&a.c.length>n&&(a.c.length=n):t&&(a=a.mod(t))}return t?r:(e<0&&(r=j.div(r)),i?r.mod(i):n?M(r,G,B):r)},D.toPrecision=function(e,t){return k(this,null!=e&&V(e,1,C,24,"precision")?0|e:null,t,24)},D.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(t=r(n.c),t=null!=e&&V(e,2,64,25,"base")?x(c(t,o),0|e,10,i):o<=F||o>=H?l(t,o):c(t,o),i<0&&n.c[0]&&(t="-"+t)),t},D.truncated=D.trunc=function(){return M(new f(this),this.e+1,1)},D.valueOf=D.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=r(t.c),e=n<=F||n>=H?l(e,n):c(e,n),t.s<0?"-"+e:e)},D.isBigNumber=!0,null!=t&&f.config(t),f}()).default=f.BigNumber=f,void 0!==t&&t.exports?t.exports=f:(e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=f)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if("string"==typeof t&&(t=m.parseFormat(t)),!p.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",o=t.postfix||"",a=function(e,t,n){switch(t.output){case"currency":return t=f(t,d.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),i=Object.assign({},y,t),o=void 0,a="",s=!!i.totalLength||!!i.forceAverage||i.average,l=t.currencyPosition||r.position,c=t.currencySymbol||r.symbol;i.spaceSeparated&&(a=" "),"infix"===l&&(o=a+c+a);var f=u({instance:e,providedFormat:t,state:n,decimalSeparator:o});return"prefix"===l&&(f=e._value<0&&"sign"===i.negative?"-"+a+c+f.slice(1):c+a+f),l&&"postfix"!==l||(f=f+(a=s?"":a)+c),f}(e,t,d);case"percent":return t=f(t,d.currentPercentageDefaultFormat()),function(e,t,n,r){var i=t.prefixSymbol,o=u({instance:r(100*e._value),providedFormat:t,state:n}),a=Object.assign({},y,t);return i?"%"+(a.spaceSeparated?" ":"")+o:o+(a.spaceSeparated?" ":"")+"%"}(e,t,d,n);case"byte":return t=f(t,d.currentByteDefaultFormat()),function(e,t,n,r){var o=t.base||"binary",a=g[o],s=i(e._value,a.suffixes,a.scale),l=s.value,c=s.suffix;return u({instance:r(l),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})+(n.currentAbbreviations().spaced?" ":"")+c}(e,t,d,n);case"time":return t=f(t,d.currentTimeDefaultFormat()),function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0":"")+n+":"+(r<10?"0":"")+r}(e);case"ordinal":return t=f(t,d.currentOrdinalDefaultFormat()),function(e,t,n){var r=n.currentOrdinal(),i=Object.assign({},y,t),o=u({instance:e,providedFormat:t,state:n}),a=r(e._value);return o+(i.spaceSeparated?" ":"")+a}(e,t,d);case"number":default:return u({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return a=function(e,t){return e+t}(a=function(e,t){return t+e}(a,r),o)}function i(e,t,n){var r=t[0],i=Math.abs(e);if(i>=n){for(var o=1;o=a&&i=0?"+"+s:s),{value:l,abbreviation:"e"+s}):{value:l,abbreviation:"e"+s}}function a(e){for(var t="",n=0;n0)n=u+d+a(s-d.length);else{var p=".";p=+u<0?"-0"+p:"0"+p;var m=(a(-s-1)+Math.abs(u)+d).substr(0,t);m.length0&&t>0&&(n+="."+a(t)),n}(e,t):(Math.round(+(e+"e+"+t))/Math.pow(10,t)).toFixed(t)}function l(e,t,n,r,i){if(-1===r)return e;var o=s(t,r),a=o.toString().split("."),l=h(a,2),c=l[0],u=l[1],f=void 0===u?"":u;if(f.match(/^0+$/)&&(n||i))return c;var d=f.match(/0+$/);return i&&d?c+"."+f.toString().slice(0,d.index):o.toString()}function c(e,t,n,r){var i=e,o=i.toString().split("."),a=h(o,2),s=a[0],l=a[1];if(s.match(/^-?0$/)&&n)return l?s.replace("0","")+"."+l:s.replace("0","");if(s.length=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):c=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):c=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(c=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3));var f=o?" ":"";if(l&&(l=f+l),s){var h=t.toString().split(".")[0];u=Math.max(s-h.length,0)}return{value:t,abbreviation:l,mantissaPrecision:u}}({value:f,forceAverage:g,abbreviations:i.currentAbbreviations(),spaceSeparated:C,totalLength:p});f=A.value,T+=A.abbreviation,p&&(w=A.mantissaPrecision)}if(O){var R=o({value:f,characteristicPrecision:m});f=R.value,T=R.abbreviation+T}var M=l(f.toString(),f,_,w,S);return M=function(e,t,n,r,i){var o=r.currentDelimiters(),a=o.thousands;i=i||o.decimal;var s=o.thousandsSize||3,l=e.toString(),c=l.split(".")[0],u=l.split(".")[1];return n&&(t<0&&(c=c.slice(1)),function(e,t){for(var n=[],r=0,i=e;i>0;i--)r===t&&(n.unshift(i),r=0),r++;return n}(c.length,s).forEach(function(e,t){c=c.slice(0,e+t)+a+c.slice(e+t)}),t<0&&(c="-"+c)),u?c+i+u:c}(M=c(M,0,v,m),f,E,i,a),(b||O)&&(M=function(e,t){return e+t}(M,T)),(k||f<0)&&(M=function(e,t,n){return 0===t?e:0==+e?e.replace("-",""):t>0?"+"+e:"sign"===n?e:"("+e.replace("-","")+")"}(M,f,x)),M}function f(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}var h=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},d=e("./globalState"),p=e("./validating"),m=e("./parsing"),v=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],g={general:{scale:1024,suffixes:v,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:v,marker:"d"}},y={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};t.exports=function(e){return{format:function(){for(var t=arguments.length,n=Array(t),i=0;i1&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");u[e.languageTag]=e,t&&r(e.languageTag)},l.setLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.languageTag;if(!u[e]){var n=e.split("-")[0],i=Object.keys(u).find(function(e){return e.split("-")[0]===n});return u[i]?void r(i):void r(t)}r(e)},l.registerLanguage(o),c=o.languageTag,t.exports=l},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";function r(t,n){t.forEach(function(t){var r=void 0;try{r=e("../languages/"+t)}catch(e){console.error('Unable to load "'+t+'". No matching language file found.')}r&&n.registerLanguage(r)})}t.exports=function(e){return{loadLanguagesInNode:function(t){return r(t,e)}}}},{}],6:[function(e,t,n){"use strict";function r(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.minus(o).toNumber(),e}var i=e("bignumber.js");t.exports=function(e){return{add:function(t,n){return function(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.add(o).toNumber(),e}(t,n,e)},subtract:function(t,n){return r(t,n,e)},multiply:function(t,n){return function(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.times(o).toNumber(),e}(t,n,e)},divide:function(t,n){return function(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.dividedBy(o).toNumber(),e}(t,n,e)},set:function(t,n){return function(e,t,n){var r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(t,n,e)},difference:function(t,n){return function(e,t,n){var i=n(e._value);return r(i,t,n),Math.abs(i._value)}(t,n,e)}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e){var t=e;return i.isNumbro(e)?t=e._value:"string"==typeof e?t=i.unformat(e):isNaN(e)&&(t=NaN),t}function i(e){return new d(r(e))}var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return u.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=h.parseFormat(e)),(e=u.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",u.format(this,e)}},{key:"formatTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",u.format(this,e)}},{key:"binaryByteUnits",value:function(){return u.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return u.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return u.getByteUnit(this)}},{key:"difference",value:function(e){return f.difference(this,e)}},{key:"add",value:function(e){return f.add(this,e)}},{key:"subtract",value:function(e){return f.subtract(this,e)}},{key:"multiply",value:function(e){return f.multiply(this,e)}},{key:"divide",value:function(e){return f.divide(this,e)}},{key:"set",value:function(e){return f.set(this,r(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}]),e}();i.version="2.1.1",i.isNumbro=function(e){return e instanceof d},i.language=a.currentLanguage,i.registerLanguage=a.registerLanguage,i.setLanguage=a.setLanguage,i.languages=a.languages,i.languageData=a.languageData,i.zeroFormat=a.setZeroFormat,i.defaultFormat=a.currentDefaults,i.setDefaults=a.setDefaults,i.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,i.validate=s.validate,i.loadLanguagesInNode=l.loadLanguagesInNode,i.unformat=c.unformat,t.exports=i},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}(e=function(e,t){var n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e=function(e,t){var n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),t),t),function(e,t){var n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){var n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0)}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}}},{}],9:[function(e,t,n){"use strict";function r(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments[3],a=arguments[4],l=arguments[5],c=arguments[6];if(!isNaN(+e))return+e;var u="",f=e.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(f!==e)return-1*i(f,t,n,o,a,l,c);for(var h=0;h2&&void 0!==arguments[2]?arguments[2]:"",i=e.replace(n,"");return i=(i=i.replace(new RegExp("([0-9])"+r(t.thousands)+"([0-9])","g"),"$1$2")).replace(t.decimal,".")}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],a=arguments[4],s=arguments[5],l=arguments[6];if(""!==e)return isNaN(+e)?e===a?0:i(o(e,t,n),t,n,r,a,s,l):+e}var s=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];t.exports={unformat:function(t,n){var r=e("./globalState"),i=r.currentDelimiters(),o=r.currentCurrency().symbol,s=r.currentOrdinal(),l=r.getZeroFormat(),c=r.currentAbbreviations(),u=void 0;if("string"==typeof t)u=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],i=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(o)}(t,i)?function(e){var t=e.split(":"),n=+t[0],r=+t[1];return+t[2]+60*r+3600*n}(t):a(t,i,o,s,l,c,n);else{if("number"!=typeof t)return;u=t}if(void 0!==u)return u}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return!!s.unformat(e)}function i(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e).map(function(r){if(!t[r])return console.error(n+" Invalid key: "+r),!1;var o=e[r],s=t[r];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!i(o,c,"[Validate "+r+"]",!0))return!1}else if((void 0===o?"undefined":a(o))!==s.type)return console.error(n+" "+r+' type mismatched: "'+s.type+'" expected, "'+(void 0===o?"undefined":a(o))+'" provided'),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,u=0;u=0},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return e>=0},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return e>=0},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},u={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(l)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};t.exports={validate:function(e,t){var n=r(e),i=o(t);return n&&i},validateFormat:o,validateInput:r,validateLanguage:function(e){return i(e,u,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){var r,i,o,a=n(285),s=n(49),l=n(54),c=n(84),u=n(65),f=n(155),h=n(133),d=s.WeakMap;if(a){var p=new d,m=p.get,v=p.has,g=p.set;r=function(e,t){return g.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},o=function(e){return v.call(p,e)}}else{var y=f("state");h[y]=!0,r=function(e,t){return c(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},o=function(e){return u(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(140),i=n(153),o=n(78),a=n(69),s=n(219),l=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,f=6==e,h=5==e||f;return function(d,p,m,v){for(var g,y,b=o(d),w=i(b),_=r(p,m,3),S=a(w.length),E=0,C=v||s,x=t?C(d,S):n?C(d,0):void 0;S>E;E++)if((h||E in w)&&(y=_(g=w[E],E,b),e))if(t)x[E]=y;else if(y)switch(e){case 3:return!0;case 5:return g;case 6:return E;case 2:l.call(x,g)}else if(u)return!1;return f?-1:c||u?u:x}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(e,t,n){var r=n(123);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r=n(180),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(143);o.inherits=n(27);var a=n(330),s=n(243);o.inherits(f,a);for(var l=i(s.prototype),c=0;c2&&void 0!==arguments[2]&&arguments[2],q=!1,G=this,X=function(){},K=new h.a(G);Object(d.extend)(X.prototype,T.a.prototype),Object(d.extend)(X.prototype,n),Object(d.extend)(X.prototype,ie(n)),Object(P.a)(X.prototype,n.language),Object(x.a)(Y)&&Object(x.c)(this),this.rootElement=t,this.rootDocument=t.ownerDocument,this.rootWindow=this.rootDocument.defaultView,Object(I.b)(this.rootDocument),this.isDestroyed=!1,this.isHotTableEnv=Object(i.isChildOfWebComponentTable)(this.rootElement),h.a.isHotTableEnv=this.isHotTableEnv,this.container=this.rootDocument.createElement("div"),this.renderCall=!1,t.insertBefore(this.container,t.firstChild),Object(x.b)(this)&&Object(l._injectProductInfo)(n.licenseKey,t),this.guid="ht_".concat(Object(b.randomString)());var Z=Object(C.a)(G);U=new S.a(G),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),F={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new X,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var $=new N.a(F.settings,{countCols:function(){return G.countCols()},countRows:function(){return G.countRows()},propToCol:function(e){return H.propToCol(e)},isEditorOpened:function(){return!!G.getActiveEditor()&&G.getActiveEditor().isOpened()}});function J(e){var t=Object(P.c)(e);Object(M.d)(t)?(G.runHooks("beforeLanguageChange",t),X.prototype.language=t,G.runHooks("afterLanguageChange",t)):Object(P.d)(e)}function Q(){var e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ee(e){var t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function te(e,t,n){if(e.length){var r=G.runHooks("beforeChange",e,t||"edit");if(Object(a.isFunction)(r))Object(s.b)("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed).");else if(!1===r){var o=G.getActiveEditor();return void(o&&o.cancelChanges())}var l,c=new Q;c.onQueueEmpty=n;for(var u=e.length-1;u>=0;u--)if(null===e[u])e.splice(u,1);else{var f=j(e[u],4),h=f[0],d=f[1],p=f[3],m=H.propToCol(d),v=G.getCellMeta(h,m);"numeric"===v.type&&"string"===typeof p&&((l=p).length>0&&/^\s*[+-.]?\s*(?:(?:\d+(?:(\.|,)\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/.test(l))&&(e[u][3]=ee(p)),G.getCellValidator(v)&&(c.addValidatorToQueue(),G.validateCell(e[u][3],v,function(t,n){return function(r){if("boolean"!==typeof r)throw new Error("Validation error: result is not boolean");if(!1===r&&!1===n.allowInvalid){e.splice(t,1),n.valid=!0;var o=G.getCell(n.visualRow,n.visualCol);null!==o&&Object(i.removeClass)(o,G.getSettings().invalidCellClassName)}c.removeValidatorFormQueue()}}(u,v),t))}c.checkIfQueueIsEmpty()}}function ne(e,t){var n=e.length-1;if(!(n<0)){for(;n>=0;n--){var r=!1;if(null!==e[n]){if(null!==e[n][2]&&void 0!==e[n][2]||null!==e[n][3]&&void 0!==e[n][3]){if(F.settings.allowInsertRow)for(;e[n][0]>G.countRows()-1;){if(0===H.createRow(void 0,void 0,t)){r=!0;break}}if("array"===G.dataType&&(!F.settings.columns||0===F.settings.columns.length)&&F.settings.allowInsertColumn)for(;H.propToCol(e[n][1])>G.countCols()-1;){if(0===H.createCol(void 0,void 0,t)){r=!0;break}}r||H.set(e[n][0],e[n][1],e[n][3])}}else e.splice(n,1)}G.forceFullRender=!0,z.adjustRowsAndCols(),G.runHooks("beforeChangeRender",e,t),W.lockEditor(),G._refreshBorders(null),W.unlockEditor(),G.view.wt.wtOverlays.adjustElementsSize(),G.runHooks("afterChange",e,t||"edit");var i=G.getActiveEditor();i&&Object(l.isDefined)(i.refreshValue)&&i.refreshValue()}}function re(e,t,n){return"object"===D(e)?e:[[e,t,n]]}function ie(e){if(Object(d.hasOwnProperty)(e,"type")){var t,n={};for(var r in"object"===D(e.type)?t=e.type:"string"===typeof e.type&&(t=Object(A.a)(e.type)),t)Object(d.hasOwnProperty)(t,r)&&!Object(d.hasOwnProperty)(e,r)&&(n[r]=t[r]);return n}}this.selection=$,this.selection.addLocalHook("beforeSetRangeStart",function(e){V.runHooks("beforeSetRangeStart",e)}),this.selection.addLocalHook("beforeSetRangeStartOnly",function(e){V.runHooks("beforeSetRangeStartOnly",e)}),this.selection.addLocalHook("beforeSetRangeEnd",function(e){V.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=V.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=V.view.wt.wtTable.getFirstVisibleColumn())}),this.selection.addLocalHook("afterSetRangeEnd",function(e){var t=Object(d.createObjectPropListener)(!1),n=V.selection.getSelectedRange(),r=n.current(),o=r.from,a=r.to,s=n.size()-1;V.runHooks("afterSelection",o.row,o.col,a.row,a.col,t,s),V.runHooks("afterSelectionByProp",o.row,G.colToProp(o.col),a.row,G.colToProp(a.col),t,s);var l=V.selection.isSelectedByAnyHeader(),c=V.selection.selectedRange.current(),u=!0;q&&(u=!1),t.isTouched()&&(u=!t.value);var f=V.selection.isSelectedByRowHeader(),h=V.selection.isSelectedByColumnHeader();!1!==u&&(l?f?V.view.scrollViewportVertically(e.row):h&&V.view.scrollViewportHorizontally(e.col):c&&!V.selection.isMultiple()?V.view.scrollViewport(c.from):V.view.scrollViewport(e)),f&&h?Object(i.addClass)(V.rootElement,["ht__selection--rows","ht__selection--columns"]):f?(Object(i.removeClass)(V.rootElement,"ht__selection--columns"),Object(i.addClass)(V.rootElement,"ht__selection--rows")):h?(Object(i.removeClass)(V.rootElement,"ht__selection--rows"),Object(i.addClass)(V.rootElement,"ht__selection--columns")):Object(i.removeClass)(V.rootElement,["ht__selection--rows","ht__selection--columns"]),V._refreshBorders(null)}),this.selection.addLocalHook("afterSelectionFinished",function(e){var t=e.length-1,n=e[t],r=n.from,i=n.to;V.runHooks("afterSelectionEnd",r.row,r.col,i.row,i.col,t),V.runHooks("afterSelectionEndByProp",r.row,G.colToProp(r.col),i.row,G.colToProp(i.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",function(e){var t=V.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("beforeModifyTransformStart",function(e){V.runHooks("modifyTransformStart",e)}),this.selection.addLocalHook("afterModifyTransformStart",function(e,t,n){V.runHooks("afterModifyTransformStart",e,t,n)}),this.selection.addLocalHook("beforeModifyTransformEnd",function(e){V.runHooks("modifyTransformEnd",e)}),this.selection.addLocalHook("afterModifyTransformEnd",function(e,t,n){V.runHooks("afterModifyTransformEnd",e,t,n)}),this.selection.addLocalHook("afterDeselect",function(){W.destroyEditor(),V._refreshBorders(),Object(i.removeClass)(V.rootElement,["ht__selection--rows","ht__selection--columns"]),V.runHooks("afterDeselect")}),this.selection.addLocalHook("insertRowRequire",function(e){V.alter("insert_row",e,1,"auto")}),this.selection.addLocalHook("insertColRequire",function(e){V.alter("insert_col",e,1,"auto")}),z={alter:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;function a(e,t,n,r){var i=Object(p.arrayMap)(new Array(n),function(){return function(){var e;return"array"===r?e=[]:"object"===r&&(e={}),e}()});i.unshift(t,0),e.splice.apply(e,L(i))}var s=function(e){if(0===e.length)return[];var t=L(e);return t.sort(function(e,t){var n=j(e,1)[0],r=j(t,1)[0];return n===r?0:n>r?1:-1}),Object(p.arrayReduce)(t,function(e,t){var n=j(t,2),r=n[0],i=n[1],o=e[e.length-1],a=j(o,2),s=a[0]+a[1];if(r<=s){var l=Math.max(i-(s-r),0);o[1]+=l}else e.push([r,i]);return e},[t[0]])};switch(e){case"insert_row":var c=G.countSourceRows();if(G.getSettings().maxRows===c)return;t=Object(l.isDefined)(t)?t:c,n=H.createRow(t,r,i),a(F.cellSettings,t,r,"array"),n&&($.isSelected()&&$.selectedRange.current().from.row>=t?($.selectedRange.current().from.row+=n,$.transformEnd(n,0)):G._refreshBorders());break;case"insert_col":n=H.createCol(t,r,i);for(var u=0,f=G.countSourceRows();u=t?($.selectedRange.current().from.col+=n,$.transformEnd(0,n)):G._refreshBorders()}break;case"remove_row":var d=function(e){var t=0;Object(p.arrayEach)(e,function(e){var n=j(e,2),o=n[0],a=n[1],s=Object(l.isEmpty)(o)?G.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0)),H.removeRow(o,a,i),F.cellSettings.splice(s,r);var c=G.countRows(),u=G.getSettings().fixedRowsTop;u>=s+1&&(G.getSettings().fixedRowsTop-=Math.min(a,u-s));var f=G.getSettings().fixedRowsBottom;f&&s>=c-f&&(G.getSettings().fixedRowsBottom-=Math.min(a,f)),t+=a})};Array.isArray(t)?d(s(t)):d([[t,r]]),z.adjustRowsAndCols(),G._refreshBorders();break;case"remove_col":var m=function(e){var t=0;Object(p.arrayEach)(e,function(e){var n=j(e,2),r=n[0],o=n[1],a=Object(l.isEmpty)(r)?G.countCols()-1:Math.max(r-t,0),s=Z.toPhysicalColumn(a);Number.isInteger(r)&&(r=Math.max(r-t,0)),H.removeCol(r,o,i);for(var c=0,u=G.countSourceRows();c=a+1&&(G.getSettings().fixedColumnsLeft-=Math.min(o,f-a)),Array.isArray(G.getSettings().colHeaders)&&("undefined"===typeof s&&(s=-1),G.getSettings().colHeaders.splice(s,o)),t+=o})};Array.isArray(t)?m(s(t)):m([[t,r]]),z.adjustRowsAndCols(),G._refreshBorders();break;default:throw new Error('There is no such action "'.concat(e,'"'))}o||z.adjustRowsAndCols()},adjustRowsAndCols:function(){if(F.settings.minRows){var e=G.countRows();if(eo-1?(t=!0,i>(n=o-1)&&(i=n)):i>o-1&&(t=!0,n>(i=o-1)&&(n=i)),r>a-1?(t=!0,s>(r=a-1)&&(s=r)):s>a-1&&(t=!0,r>(s=a-1)&&(r=s)),t&&G.selectCell(n,r,i,s)}),G.view&&G.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,n,r,i,o,a){var s,c,u,f,h,p,m,v,g=[],y={};if(0===(c=t.length))return!1;switch(i){case"shift_down":for(h=n?n.col-e.col+1:0,p=n?n.row-e.row+1:0,u=0,f=(t=Object(E.translateRowsToColumns)(t)).length,m=Math.max(f,h);u1&&void 0!==arguments[1]?arguments[1]:null,r=t[e%t.length];return null!==n?r[n%r.length]:r},R=t.length,M=n?n.row-e.row+1:0;for(c=n?M:Math.max(R,M),s=0;sn.row&&M>R||!F.settings.allowInsertRow&&y.row>G.countRows()-1||y.row>=F.settings.maxRows);s++){var P=s-k,I=A(P).length,N=n?n.col-e.col+1:0;if(f=n?N:Math.max(I,N),y.col=e.col,C=G.getCellMeta(y.row,y.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!C.skipRowOnPaste){for(O=0,u=0;un.col&&N>I||!F.settings.allowInsertColumn&&y.col>G.countCols()-1||y.col>=F.settings.maxCols);u++)if(C=G.getCellMeta(y.row,y.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!C.skipColumnOnPaste)if(C.readOnly)y.col+=1;else{var j=u-O,B=A(P,j),H=G.getDataAtCell(y.row,y.col),U={row:P,col:j};if("Autofill.fill"===r){var z=G.runHooks("beforeAutofillInsidePopulate",U,o,t,a,{},x);z&&(B=Object(l.isUndefined)(z.value)?B:z.value)}if(null!==B&&"object"===D(B))if(Array.isArray(B)&&null===H&&(H=[]),null===H||"object"!==D(H))T=!1;else{var W=Object(d.duckSchema)(Array.isArray(H)?H:H[0]||H),V=Object(d.duckSchema)(Array.isArray(B)?B:B[0]||B);Object(d.isObjectEqual)(W,V)?B=Object(d.deepClone)(B):T=!1}else null!==H&&"object"===D(H)&&(T=!1);T&&g.push([y.row,y.col,B]),T=!0,y.col+=1}else O+=1,y.col+=1,f+=1;y.row+=1}else k+=1,y.row+=1,c+=1}G.setDataAtCell(g,null,null,r||"populateFromArray")}}},this.init=function(){U.setData(F.settings.data),G.runHooks("beforeInit"),Object(c.isMobileBrowser)()&&Object(i.addClass)(G.rootElement,"mobile"),this.updateSettings(F.settings,!0),this.view=new _.a(this),W=f.a.getInstance(G,F,$,H),this.forceFullRender=!0,G.runHooks("init"),this.view.render(),"object"===D(F.firstRun)&&(G.runHooks("afterChange",F.firstRun[0],F.firstRun[1]),F.firstRun=!1),G.runHooks("afterInit")},this.validateCell=function(e,t,n,r){var i,o=G.getCellValidator(t);function s(e){if((!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&!0!==t.hidden){var r=t.visualCol,i=t.visualRow,o=G.getCell(i,r,!0);o&&"TH"!==o.nodeName&&G.view.wt.wtSettings.settings.cellRenderer(i,r,o),n(e)}else n(e)}Object(l.isRegExp)(o)&&(i=o,o=function(e,t){t(i.test(e))}),Object(a.isFunction)(o)?(e=G.runHooks("beforeValidate",e,t.visualRow,t.prop,r),G._registerImmediate(function(){o.call(t,e,function(n){G&&(n=G.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,s(n),G.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))})})):G._registerImmediate(function(){t.valid=!0,s(t.valid,!1)})},this.setDataAtCell=function(e,t,n,r){var i,o,a,s=re(e,t,n),l=[],c=r;for(i=0,o=s.length;i0&&void 0!==arguments[0])||arguments[0],t=G.rootDocument;if(e){var n=!t.activeElement||t.activeElement&&void 0===t.activeElement.nodeName;t.activeElement&&t.activeElement!==t.body&&!n?t.activeElement.blur():n&&t.body.focus()}G&&!G.isListening()&&(B=G.guid,G.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(B=null,G.runHooks("afterUnlisten"))},this.isListening=function(){return B===G.guid},this.destroyEditor=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];G._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,r,i,o,a,s,l){if("object"!==D(n)||"object"!==D(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var c="number"===typeof r?new k.a(r,i):null;return z.populateFromArray(new k.a(e,t),n,c,o,a,s,l)},this.spliceCol=function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a3?i-3:0),a=3;a0&&(e=t[t.length-1]),e},this.getSelectedRange=function(){if($.isSelected())return Array.from($.getSelectedRange())},this.getSelectedRangeLast=function(){var e,t=this.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.emptySelectedCells=function(){var e=this;if($.isSelected()){var t=[];Object(p.arrayEach)($.getSelectedRange(),function(n){var r=n.getTopLeftCorner(),i=n.getBottomRightCorner();Object(w.rangeEach)(r.row,i.row,function(n){Object(w.rangeEach)(r.col,i.col,function(r){e.getCellMeta(n,r).readOnly||t.push([n,r,""])})})}),t.length>0&&this.setDataAtCell(t)}},this.render=function(){G.view&&(G.renderCall=!0,G.forceFullRender=!0,W.lockEditor(),G._refreshBorders(null),W.unlockEditor())},this.refreshDimensions=function(){if(G.view){var e=G.view.getLastSize(),t=e.width,n=e.height,r=G.rootElement.getBoundingClientRect(),i=r.width,o=r.height,a=i!==t||o!==n;!1===G.runHooks("beforeRefreshDimensions",{width:t,height:n},{width:i,height:o},a)||((a||G.view.wt.wtOverlays.scrollableElement===G.rootWindow)&&(G.view.setLastSize(i,o),G.render()),G.runHooks("afterRefreshDimensions",{width:t,height:n},{width:i,height:o},a))}},this.loadData=function(e){if(Array.isArray(F.settings.dataSchema)?G.dataType="array":Object(a.isFunction)(F.settings.dataSchema)?G.dataType="function":G.dataType="object",H&&H.destroy(),H=new u.a(G,F,X),"object"===D(e)&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error("loadData only accepts array of objects or array of arrays (".concat(D(e)," given)"));var t,n=H.getSchema();e=[];var r,i=0;for(i=0,r=F.settings.startRows;i1&&void 0!==arguments[1]&&arguments[1],c=!1;if(Object(l.isDefined)(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if(Object(l.isDefined)(e.cols))throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(t in e)"data"!==t&&("language"!==t?O.a.getSingleton().getRegistered().indexOf(t)>-1?(Object(a.isFunction)(e[t])||Array.isArray(e[t]))&&(e[t].initialHook=!0,G.addHook(t,e[t])):!s&&Object(d.hasOwnProperty)(e,t)&&(X.prototype[t]=e[t]):J(e.language));void 0===e.data&&void 0===F.settings.data?G.loadData(null):void 0!==e.data?G.loadData(e.data):void 0!==e.columns&&H.createMap(),r=G.countCols();var u,f,h=e.columns||X.prototype.columns;if(h&&Object(a.isFunction)(h)&&(r=G.countSourceCols(),c=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(F.cellSettings.length=0),r>0)for(t=0,n=0;t-1||v.indexOf("overflow")>-1)?G.rootElement.setAttribute("style",v):(G.rootElement.style.height="",G.rootElement.style.overflow="")}else void 0!==m&&(G.rootElement.style.height=isNaN(m)?"".concat(m):"".concat(m,"px"),G.rootElement.style.overflow="hidden");if("undefined"!==typeof e.width){var g=e.width;Object(a.isFunction)(g)&&(g=g()),G.rootElement.style.width=isNaN(g)?"".concat(g):"".concat(g,"px")}s||(H.clearLengthCache(),G.view&&G.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),G.runHooks("afterUpdateSettings",e)),z.adjustRowsAndCols(),G.view&&!F.firstRun&&(G.forceFullRender=!0,W.lockEditor(),G._refreshBorders(null),W.unlockEditor()),s||!G.view||""!==p&&""!==m&&void 0!==m||p===m||G.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=G.getSelectedLast();if(X.prototype.getValue){if(Object(a.isFunction)(X.prototype.getValue))return X.prototype.getValue.call(G);if(e)return G.getData()[e[0][0]][X.prototype.getValue]}else if(e)return G.getDataAtCell(e[0],e[1])},this.getSettings=function(){return F.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,i){z.alter(e,t,n,r,i)},this.getCell=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return G.view.getCellAtCoords(new k.a(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return H.colToProp(e)},this.propToCol=function(e){return H.propToCol(e)},this.toVisualRow=function(e){return Z.toVisualRow(e)},this.toVisualColumn=function(e){return Z.toVisualColumn(e)},this.toPhysicalRow=function(e){return Z.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return Z.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return H.get(e,H.colToProp(t))},this.getDataAtRowProp=function(e,t){return H.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,L(H.getRange(new k.a(0,e),new k.a(F.settings.data.length-1,e),H.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,n=H.getRange(new k.a(0,H.propToCol(e)),new k.a(F.settings.data.length-1,H.propToCol(e)),H.DESTINATION_RENDERER);return(t=[]).concat.apply(t,L(n))},this.getSourceData=function(e,t,n,r){return void 0===e?U.getData():U.getByRange(new k.a(e,t),new k.a(n,r))},this.getSourceDataArray=function(e,t,n,r){return void 0===e?U.getData(!0):U.getByRange(new k.a(e,t),new k.a(n,r),!0)},this.getSourceDataAtCol=function(e){return U.getAtColumn(e)},this.getSourceDataAtRow=function(e){return U.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return U.getAtCell(e,t)},this.getDataAtRow=function(e){return H.getRange(new k.a(e,0),new k.a(e,this.countCols()-1),H.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,r){var i=this,o=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],a=o[0],s=o[1],l=o[2],c=o[3],u=null,f=null;void 0===l&&(l=a),void 0===c&&(c=s);var h="mixed";return Object(w.rangeEach)(Math.min(a,l),Math.max(a,l),function(e){var t=!0;return Object(w.rangeEach)(Math.min(s,c),Math.max(s,c),function(n){var r=i.getCellMeta(e,n);return f=r.type,u?t=u===f:u=f,t}),h=t?f:"mixed",t}),h},this.removeCellMeta=function(e,t,n){var r=j(Z.toPhysical(e,t),2),i=r[0],o=r[1],a=F.cellSettings[i][o][n];!1!==G.runHooks("beforeRemoveCellMeta",e,t,n,a)&&(delete F.cellSettings[i][o][n],G.runHooks("afterRemoveCellMeta",e,t,n,a)),a=null},this.spliceCellsMeta=function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o=0;)if(void 0===t||-1!==t.indexOf(i)){for(var o=G.countCols()-1;o>=0;)void 0===n||-1!==n.indexOf(o)?(r.addValidatorToQueue(),G.validateCell(G.getDataAtCell(i,o),G.getCellMeta(i,o),function(e){if("boolean"!==typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells"),o-=1):o-=1;i-=1}else i-=1;r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=F.settings.rowHeaders,n=e;return void 0!==n&&(n=G.runHooks("modifyRowHeader",n)),void 0===n?(t=[],Object(w.rangeEach)(G.countRows()-1,function(e){t.push(G.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[n]?t=t[n]:Object(a.isFunction)(t)?t=t(n):t&&"string"!==typeof t&&"number"!==typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!F.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==F.settings.colHeaders&&null!==F.settings.colHeaders)return!!F.settings.colHeaders;for(var e=0,t=G.countCols();e0&&void 0!==arguments[0]&&arguments[0],t=0;return Object(w.rangeEachReverse)(G.countRows()-1,function(n){if(G.isEmptyRow(n))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(G.countRows()<1)return 0;var t=0;return Object(w.rangeEachReverse)(G.countCols()-1,function(n){if(G.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return F.settings.isEmptyRow.call(G,e)},this.isEmptyCol=function(e){return F.settings.isEmptyCol.call(G,e)},this.selectCell=function(e,t,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!Object(l.isUndefined)(e)&&!Object(l.isUndefined)(t)&&this.selectCells([[e,t,n,r]],i,o)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&(q=!0);var r=$.selectCells(e);return r&&n&&G.listen(),q=!1,r},this.selectColumns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return $.selectColumns(e,t)},this.selectRows=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return $.selectRows(e,t)},this.deselectCell=function(){$.deselect()},this.selectAll=function(){q=!0,$.selectAll(),q=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=!n,o=!r,a=!1;return void 0!==e&&void 0!==t&&(a=G.view.scrollViewport(new k.a(e,t),i,r,n,o)),"number"===typeof e&&"number"!==typeof t&&(a=G.view.scrollViewportVertically(e,i,n)),"number"===typeof t&&"number"!==typeof e&&(a=G.view.scrollViewportHorizontally(t,r,o)),a},this.destroy=function(){if(G._clearTimeouts(),G._clearImmediates(),G.view&&G.view.destroy(),U&&U.destroy(),U=null,Object(I.c)(),Object(x.b)(G)){var e=this.rootDocument.querySelector("#hot-display-license-info");e&&e.parentNode.removeChild(e)}Object(i.empty)(G.rootElement),K.destroy(),W&&W.destroy(),G.runHooks("afterDestroy"),O.a.getSingleton().destroy(G),Object(d.objectEach)(G,function(e,t,n){var r;Object(a.isFunction)(e)?n[t]=(r=t,function(){throw new Error('The "'.concat(r,'" method cannot be called because this Handsontable instance has been destroyed'))}):"guid"!==t&&(n[t]=null)}),G.isDestroyed=!0,H&&H.destroy(),H=null,F=null,z=null,$=null,W=null,G=null,X=null},this.getActiveEditor=function(){return W.getActiveEditor()},this.getPlugin=function(e){return Object(v.a)(this,e)},this.getInstance=function(){return G},this.addHook=function(e,t){O.a.getSingleton().add(e,t,G)},this.hasHook=function(e){return O.a.getSingleton().has(e,G)},this.addHookOnce=function(e,t){O.a.getSingleton().once(e,t,G)},this.removeHook=function(e,t){O.a.getSingleton().remove(e,t,G)},this.runHooks=function(e,t,n,r,i,o,a){return O.a.getSingleton().run(G,e,t,n,r,i,o,a)},this.getTranslatedPhrase=function(e,t){return Object(R.a)(F.settings.language,e,t)},this.toHTML=function(){return Object(m.instanceToHTML)(V)},this.toTableElement=function(){var e=V.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",Object(m.instanceToHTML)(V)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"===typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){Object(p.arrayEach)(this.timeouts,function(e){clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(t){this.immediates.push(e(t))},this._clearImmediates=function(){Object(p.arrayEach)(this.immediates,function(e){r(e)})},this._refreshBorders=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W.destroyEditor(e),G.view.render(),t&&$.isSelected()&&W.prepareEditor()},O.a.getSingleton().run(G,"construct")}}).call(this,n(227).setImmediate,n(227).clearImmediate)},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return s});n(10),n(11),n(7),n(6),n(8),n(34),n(9);var r=new WeakMap,i=Symbol("rootInstance");function o(e){r.set(e,!0)}function a(e){return e===i}function s(e){return r.has(e)}},function(e,t,n){"use strict";n(10),n(11),n(12),n(25),n(472),n(62),n(32),n(44),n(7),n(94),n(23),n(89),n(6),n(26),n(50),n(8),n(171),n(9);var r=n(60),i=n(5);var o=function(e){var t=e.activeHeaderClassName;return new i.c({highlightHeaderClassName:t})};var a=function(e){var t=e.layerLevel,n=e.areaCornerVisible;return new i.c({className:"area",markIntersections:!0,layerLevel:Math.min(t,7),border:{width:1,color:"#4b89ff",cornerVisible:n}})};var s=function(e){var t=e.cellCornerVisible;return new i.c({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t}})};var l=function(e){var t=e.border,n=e.cellRange;return new i.c(t,n)};var c=function(){return new i.c({className:"fill",border:{width:1,color:"#ff0000"}})};var u=function(e){var t=e.headerClassName,n=e.rowClassName,r=e.columnClassName;return new i.c({className:"highlight",highlightHeaderClassName:t,highlightRowClassName:n,highlightColumnClassName:r})},f=Object(r.a)("highlight/types"),h=f.register,d=f.getItem;function p(e,t){return d(e)(t)}h("active-header",o),h("area",a),h("cell",s),h("custom-selection",l),h("fill",c),h("header",u);var m=n(1);function v(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var e,t=this.layerLevel;return this.areas.has(t)?e=this.areas.get(t):(e=p("area",g({layerLevel:t},this.options)),this.areas.set(t,e)),e}},{key:"getAreas",value:function(){return v(this.areas.values())}},{key:"createOrGetHeader",value:function(){var e,t=this.layerLevel;return this.headers.has(t)?e=this.headers.get(t):(e=p("header",g({},this.options)),this.headers.set(t,e)),e}},{key:"getHeaders",value:function(){return v(this.headers.values())}},{key:"createOrGetActiveHeader",value:function(){var e,t=this.layerLevel;return this.activeHeaders.has(t)?e=this.activeHeaders.get(t):(e=p("active-header",g({},this.options)),this.activeHeaders.set(t,e)),e}},{key:"getActiveHeaders",value:function(){return v(this.activeHeaders.values())}},{key:"getCustomSelections",value:function(){return v(this.customSelections.values())}},{key:"addCustomSelection",value:function(e){this.customSelections.push(p("custom-selection",g({},e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),Object(m.arrayEach)(this.areas.values(),function(e){e.clear()}),Object(m.arrayEach)(this.headers.values(),function(e){e.clear()}),Object(m.arrayEach)(this.activeHeaders.values(),function(e){e.clear()})}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat(v(this.areas.values()),v(this.headers.values()),v(this.activeHeaders.values()),v(this.customSelections))[Symbol.iterator]()}}])&&b(t.prototype,n),r&&b(t,r),e}();n(39),n(100),n(101),n(88),n(102);function E(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=this.size()+t-1;return n>=0&&(e=this.ranges[n]),e}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}])&&E(t.prototype,n),r&&E(t,r),e}(),x=n(92),k=n(2),O=n(14),T=n(43);function A(e,t){for(var n=0;no-1?n&&l>0&&!(s&&h.row>=o-s-1)?(this.runLocalHooks("insertRowRequire",o),o=this.options.countRows()):f&&(r.row=1-o,r.col=h.col+r.col===a-1?1-a:1):f&&h.row+r.row<0&&h.col+r.col>=0&&(r.row=o-1,r.col=h.col+r.col===0?a-1:-1),h.col+r.col>a-1?n&&c>0?(this.runLocalHooks("insertColRequire",a),a=this.options.countCols()):u&&(r.row=h.row+r.row===o-1?1-o:1,r.col=1-a):u&&h.col+r.col<0&&h.row+r.row>=0&&(r.row=h.row+r.row===0?o-1:-1,r.col=a-1);var d=new i.a(h.row+r.row,h.col+r.col),p=0,m=0;return d.row<0?(p=-1,d.row=0):d.row>0&&d.row>=o&&(p=1,d.row=o-1),d.col<0?(m=-1,d.col=0):d.col>0&&d.col>=a&&(m=1,d.col=a-1),this.runLocalHooks("afterTransformStart",d,p,m),d}},{key:"transformEnd",value:function(e,t){var n=new i.a(e,t);this.runLocalHooks("beforeTransformEnd",n);var r=this.options.countRows(),o=this.options.countCols(),a=this.range.current(),s=new i.a(a.to.row+n.row,a.to.col+n.col),l=0,c=0;return s.row<0?(l=-1,s.row=0):s.row>0&&s.row>=r&&(l=1,s.row=r-1),s.col<0?(c=-1,s.col=0):s.col>0&&s.col>=o&&(c=1,s.col=o-1),this.runLocalHooks("afterTransformEnd",s,l,c),s}}])&&A(t.prototype,n),r&&A(t,r),e}();Object(k.mixin)(R,T.a);var M=R,P=n(52),I=n(36);function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function D(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["Unsupported format of the selection ranges was passed. To select cells pass \n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, columnEnd/columnPropEnd]]) \n or as an array of CellRange objects."]);return D=function(){return e},e}function j(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r="multiple"===this.settings.selectionMode,i=Object(O.isUndefined)(t)?Object(x.a)():t,o=e.row<0,a=e.col<0,s=o&&a;o&&(e.row=0),a&&(e.col=0),this.selectedByCorner=s,this.runLocalHooks("beforeSetRangeStart".concat(n?"Only":""),e),(!r||r&&!i&&Object(O.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!s&&a&&this.selectedByRowHeader.add(this.getLayerLevel()),!s&&o&&this.selectedByColumnHeader.add(this.getLayerLevel()),n||this.setRangeEnd(e)}},{key:"setRangeStartOnly",value:function(e,t){this.setRangeStart(e,t,!0)}},{key:"setRangeEnd",value:function(e){if(!this.selectedRange.isEmpty()){this.runLocalHooks("beforeSetRangeEnd",e),this.begin();var t=this.selectedRange.current();"single"!==this.settings.selectionMode&&t.setTo(new i.a(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(w)&&this.highlight.getCell().add(this.selectedRange.current().highlight);var n=this.getLayerLevel();n=1)&&(r.add(t.from).add(t.to),1===n&&(this.highlight.useLayerLevel(n-1).createOrGetArea().add(this.selectedRange.previous().from),this.highlight.useLayerLevel(n))),this.highlight.isEnabledFor("header")&&("single"===this.settings.selectionMode?o.add(t.highlight):o.add(t.from).add(t.to)),this.isSelectedByRowHeader())this.tableProps.countCols()===t.getWidth()&&a.add(new i.a(t.from.row,-1)).add(new i.a(t.to.row,-1));if(this.isSelectedByColumnHeader())this.tableProps.countRows()===t.getHeight()&&a.add(new i.a(-1,t.from.col)).add(new i.a(-1,t.to.col));this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=Object(k.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}},{key:"transformStart",value:function(e,t,n){this.setRangeStart(this.transformation.transformStart(e,t,n))}},{key:"transformEnd",value:function(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}},{key:"getLayerLevel",value:function(){return this.selectedRange.size()-1}},{key:"isSelected",value:function(){return!this.selectedRange.isEmpty()}},{key:"isSelectedByRowHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e)}},{key:"isSelectedByColumnHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)}},{key:"isSelectedByCorner",value:function(){return this.selectedByCorner}},{key:"inInSelection",value:function(e){return this.selectedRange.includes(e)}},{key:"isCellCornerVisible",value:function(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}},{key:"isAreaCornerVisible",value:function(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}},{key:"clear",value:function(){this.selectedRange.clear(),this.highlight.clear()}},{key:"deselect",value:function(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}},{key:"selectAll",value:function(){this.clear(),this.setRangeStart(new i.a(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new i.a(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var t=this,n=Object(P.c)(e);if(n===P.a)return!1;if(n===P.b)throw new Error(Object(I.a)(D()));var r=Object(P.e)(n,{propToCol:function(e){return t.tableProps.propToCol(e)},keepDirection:!0}),o=this.tableProps.countRows(),a=this.tableProps.countCols(),s=!e.some(function(e){var t=N(r(e),4),n=t[0],i=t[1],s=t[2],l=t[3];return!(Object(P.d)(n,o)&&Object(P.d)(i,a)&&Object(P.d)(s,o)&&Object(P.d)(l,a))});return s&&(this.clear(),Object(m.arrayEach)(e,function(e){var n=N(r(e),4),o=n[0],a=n[1],s=n[2],l=n[3];t.setRangeStartOnly(new i.a(o,a),!1),t.setRangeEnd(new i.a(s,l)),t.finish()})),s}},{key:"selectColumns",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n="string"===typeof e?this.tableProps.propToCol(e):e,r="string"===typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countCols(),a=Object(P.d)(n,o)&&Object(P.d)(r,o);return a&&(this.setRangeStartOnly(new i.a(-1,n)),this.setRangeEnd(new i.a(this.tableProps.countRows()-1,r)),this.finish()),a}},{key:"selectRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.tableProps.countRows(),r=Object(P.d)(e,n)&&Object(P.d)(t,n);return r&&(this.setRangeStartOnly(new i.a(e,-1)),this.setRangeEnd(new i.a(t,this.tableProps.countCols()-1)),this.finish()),r}}])&&j(t.prototype,n),r&&j(t,r),e}();Object(k.mixin)(L,T.a);var B=L;n(151);n.d(t,"a",function(){return B}),n.d(t,"b",function(){return P.c}),n.d(t,"c",function(){return P.e})},function(e,t){},function(e,t,n){var r=n(64),i=n(152),o=n(130),a=n(86),s=n(131),l=n(65),c=n(283),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t,!0),c)try{return u(e,t)}catch(n){}if(l(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t,n){var r=n(234)("wks"),i=n(233),o=n(113).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";(function(t,r){var i=65536,o=4294967295;var a=n(29).Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var l=0;l=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._errors=n,r}return a(t,s),r(t,[{key:"multiple",get:function(){return!!this._errors.length}},{key:"errors",get:function(){return this._errors}}]),t}(),c=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,l),t}();e.exports={DataPackageError:l,TableSchemaError:c}},function(e,t,n){"use strict";(function(t){var r,i=n(41),o=i.Buffer,a={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=i[r]);var s=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(s[r]=o[r]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(e,t,n){if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&"undefined"===typeof e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,n)}),s.alloc||(s.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(l){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a}).call(this,n(55))},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return f}),n.d(t,"d",function(){return h});n(25),n(39),n(88);var r=n(14),i=n(2),o=n(33),a=n(36),s=n(85);function l(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.']);return l=function(){return e},e}function c(e,t){return Object(i.objectEach)(t,function(t,n){Object(r.isUndefined)(e[n])&&(e[n]=t)}),e}function u(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);return t?"".concat(t[1].toLowerCase(),"-").concat(t[2].toUpperCase()):e}function f(e,t){var n=u(t);Object(s.d)(n)?e.language=n:(e.language=s.a,h(t))}function h(e){Object(r.isDefined)(e)&&Object(o.a)(Object(a.a)(l(),e))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(54);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(49),i=n(207),o=n(154),a=r["__core-js_shared__"]||i("__core-js_shared__",{});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.2.1",mode:o?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,n){var r=n(288),i=n(209).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(47),i=n(136),o=n(84),a=r("unscopables"),s=Array.prototype;void 0==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},function(e,t,n){var r=n(59),i=n(454),o=n(209),a=n(133),s=n(291),l=n(206),c=n(155)("IE_PROTO"),u=function(){},f=function(){var e,t=l("iframe"),n=o.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(" - - + + {% endblock %}