Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

helper-js

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-js - npm Package Compare versions

Comparing version 1.4.25 to 1.4.26

44

dist/helper-js.cjs.js
/*!
* helper-js v1.4.25
* helper-js v1.4.26
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -709,3 +709,3 @@ * Released under the MIT License.

var StopException = () => {};
class StopException {}

@@ -737,3 +737,3 @@ var func = (children, parent, parentPath) => {

if (item[childrenKey] != null) {
func(item[childrenKey], item);
func(item[childrenKey], item, path);
}

@@ -761,3 +761,10 @@ }

var {
childrenKey,
childrenKey
} = this;
if (!this.data) {
this.data = [];
}
var {
data

@@ -838,12 +845,16 @@ } = this;

setPathNode(path, node) {
var {
childrenKey,
rootChildren
} = this;
var {
parent,
index
} = this.getNodeIndexAndParent(path);
var parentChildren = path.length === 1 ? rootChildren : parent[childrenKey];
parentChildren[index] = node;
if (path == null || path.length === 0) {
this.data = node;
} else {
var {
childrenKey,
rootChildren
} = this;
var {
parent,
index
} = this.getNodeIndexAndParent(path);
var parentChildren = path.length === 1 ? rootChildren : parent[childrenKey];
parentChildren[index] = node;
}
}

@@ -883,4 +894,3 @@

} = this;
var newData = [];
var td = new TreeData(newData);
var td = new TreeData();
this.walk((node, index, parent, path) => {

@@ -904,3 +914,3 @@ var newNode = Object.assign({}, node);

});
return newData;
return td.data;
}

@@ -907,0 +917,0 @@

/*!
* helper-js v1.4.25
* helper-js v1.4.26
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -703,3 +703,3 @@ * Released under the MIT License.

var StopException = () => {};
class StopException {}

@@ -731,3 +731,3 @@ var func = (children, parent, parentPath) => {

if (item[childrenKey] != null) {
func(item[childrenKey], item);
func(item[childrenKey], item, path);
}

@@ -755,3 +755,10 @@ }

var {
childrenKey,
childrenKey
} = this;
if (!this.data) {
this.data = [];
}
var {
data

@@ -832,12 +839,16 @@ } = this;

setPathNode(path, node) {
var {
childrenKey,
rootChildren
} = this;
var {
parent,
index
} = this.getNodeIndexAndParent(path);
var parentChildren = path.length === 1 ? rootChildren : parent[childrenKey];
parentChildren[index] = node;
if (path == null || path.length === 0) {
this.data = node;
} else {
var {
childrenKey,
rootChildren
} = this;
var {
parent,
index
} = this.getNodeIndexAndParent(path);
var parentChildren = path.length === 1 ? rootChildren : parent[childrenKey];
parentChildren[index] = node;
}
}

@@ -877,4 +888,3 @@

} = this;
var newData = [];
var td = new TreeData(newData);
var td = new TreeData();
this.walk((node, index, parent, path) => {

@@ -898,3 +908,3 @@ var newNode = Object.assign({}, node);

});
return newData;
return td.data;
}

@@ -901,0 +911,0 @@

/*!
* helper-js v1.4.25
* helper-js v1.4.26
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).helperJs={})}(this,(function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}));var r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var o=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?r(e):t},i=t((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e},c=t((function(e){function t(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var r=a(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},t(n,r,o||n)}e.exports=t})),u=t((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var l=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&&u(e,t)};var s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};var f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e},v=t((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof s?t:s,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function s(){}function f(){}function h(){}var d={};d[o]=function(){return this};var v=Object.getPrototypeOf,p=v&&v(v(O([])));p&&p!==t&&n.call(p,o)&&(d=p);var y=h.prototype=s.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,a){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?Promise.resolve(s.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return t("throw",e,i,a)}))}a(c.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return f.prototype=y.constructor=h,h.constructor=f,h[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(m.prototype),m.prototype[i]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,o){var i=new m(c(t,n,r,o));return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=O,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var p=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var y=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var g=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var m=function(e){return p(e)||y(e)||g()};function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=v.mark(W),k={};function O(){if(k.glb)return k.glb;var e;try{e=global}catch(t){e=window}return k.glb=e,e}function j(e){return void 0!==e}function S(e){return"[object Array]"===Object.prototype.toString.call(e)}function E(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function P(e){return"[object Number]"===Object.prototype.toString.call(e)}function L(e){return isFinite(e)&&!isNaN(parseFloat(e))}function N(e){return"[object String]"===Object.prototype.toString.call(e)}function A(e){return"[object Object]"===Object.prototype.toString.call(e)}function T(e){return"function"==typeof e}function _(e,t){return 1===arguments.length&&(t=e,e=0),Math.floor(Math.random()*(t-e+1)+e)}function C(e,t){return e<t?e:t}function I(e){return e&&e[0].toUpperCase()+e.substr(1)}function F(e){return e.replace(/ /g,"-").replace(/_/g,"-").replace(/([A-Z])/g,"-$1").replace(/--+/g,"-").replace(/^-|-$|/g,"").toLowerCase()}function R(e){for(var t=e.toString().split(/[-_]/),n=1;n<t.length;n++)t[n]=I(t[n]);return t.join("")}function B(e){return e.toString().trim().split(/(?=[A-Z])/)}function M(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=0;o<e;o++)n+=r[_(r.length-1)];return t+n}function D(e,t){for(var n,r=0;(n=e.indexOf(t))>-1;)e.splice(n,1),r++;return r}function G(e){return e[e.length-1]}function H(e){return S(e)?e:[e]}function U(e,t){var n=[];if(T(t))for(var r=t,o=1,i=0;i<e.length;){var a=i+r(o);n.push(e.slice(i,a)),i=a,o++}else for(var c=0;c<e.length;){var u=c+t;n.push(e.slice(c,u)),c=u}return n}function W(e){var t,n,r,o,i,a,c,u,l,s,f,h,d,p,y=arguments;return v.wrap((function(v){for(;;)switch(v.prev=v.next){case 0:if((t=y.length>1&&void 0!==y[1]?y[1]:{}).reverse){v.next=30;break}if(null==e.length){v.next=14;break}n=0;case 4:if(!(n<e.length)){v.next=12;break}if(r={value:e[n],index:n},t.exclude&&t.exclude(r)){v.next=9;break}return v.next=9,r;case 9:n++,v.next=4;break;case 12:v.next=28;break;case 14:if(!A(e)){v.next=27;break}o=0,i=Object.keys(e);case 16:if(!(o<i.length)){v.next=25;break}if(a=i[o],c={value:e[a],key:a},t.exclude&&t.exclude(c)){v.next=22;break}return v.next=22,c;case 22:o++,v.next=16;break;case 25:v.next=28;break;case 27:throw"Unsupported type";case 28:v.next=58;break;case 30:if(null==e.length){v.next=42;break}u=e.length-1;case 32:if(!(u>=0)){v.next=40;break}if(l={value:e[u],index:u},t.exclude&&t.exclude(l)){v.next=37;break}return v.next=37,l;case 37:u--,v.next=32;break;case 40:v.next=58;break;case 42:if(!A(e)){v.next=57;break}(s=Object.keys(e)).reverse(),f=0,h=s;case 46:if(!(f<h.length)){v.next=55;break}if(d=h[f],p={value:e[d],key:d},t.exclude&&t.exclude(p)){v.next=52;break}return v.next=52,p;case 52:f++,v.next=46;break;case 55:v.next=58;break;case 57:throw"Unsupported type";case 58:case"end":return v.stop()}}),x)}var K=W;function z(e,t,n){var r=S(t)?t:t.split("."),o=e;try{var i=!0,a=!1,c=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){o=o[u.value]}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}catch(e){if(n)throw"Path does not exist"}return o}function q(e,t){for(var n={},r=e.length,o=0;o<r;o++){var i=e[o];n[T(t)?t(i,o):i[t]]=i}return n}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children",r=arguments.length>3?arguments[3]:void 0,o=S(e)?e:[e],i=function(){},a=function e(o,a,c){r&&(o=o.slice()).reverse();for(var u=o.length,l=0;l<u;l++){var s=o[l],f=r?u-l-1:l,h=c?[].concat(m(c),[f]):[],d=t(s,f,a,h);if(!1===d)throw new i;if("skip children"!==d){if("skip siblings"===d)break;null!=s[n]&&e(s[n],s)}}};try{a(o,null,S(e)?[]:null)}catch(e){if(!(e instanceof i))throw e}}var V=J,Y=function(){function e(t){f(this,e),this.childrenKey="children",this.data=t}return d(e,[{key:"iteratePath",value:v.mark((function e(t){var n,r,o,i,a,c,u,l,s,f,h,d,p,y,g,b,x,k,O,j,S,E,P=arguments;return v.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=P.length>1&&void 0!==P[1]?P[1]:{},r=this.childrenKey,o=this.rootChildren,n.reverse){e.next=38;break}i=[],a=o,c=!0,u=!1,l=void 0,e.prev=8,s=t[Symbol.iterator]();case 10:if(c=(f=s.next()).done){e.next=22;break}return h=f.value,d=[].concat(m(i),[h]),p=a[h],e.next=16,{path:d,node:p};case 16:i=d,a=p[r];case 19:c=!0,e.next=10;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(8),u=!0,l=e.t0;case 28:e.prev=28,e.prev=29,c||null==s.return||s.return();case 31:if(e.prev=31,!u){e.next=34;break}throw l;case 34:return e.finish(31);case 35:return e.finish(28);case 36:e.next=66;break;case 38:(y=m(this.iteratePath(t,w({},n,{reverse:!1})))).reverse(),g=!0,b=!1,x=void 0,e.prev=43,k=y[Symbol.iterator]();case 45:if(g=(O=k.next()).done){e.next=52;break}return j=O.value,S=j.path,E=j.node,e.next=49,{path:S,node:E};case 49:g=!0,e.next=45;break;case 52:e.next=58;break;case 54:e.prev=54,e.t1=e.catch(43),b=!0,x=e.t1;case 58:e.prev=58,e.prev=59,g||null==k.return||k.return();case 61:if(e.prev=61,!b){e.next=64;break}throw x;case 64:return e.finish(61);case 65:return e.finish(58);case 66:case"end":return e.stop()}}),e,this,[[8,24,28,36],[29,,31,35],[43,54,58,66],[59,,61,65]])}))},{key:"getAllNodes",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.iteratePath(e)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value.node;t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t}},{key:"getNode",value:function(e){return G(this.getAllNodes(e))}},{key:"getNodeIndexAndParent",value:function(e){var t=e.slice(),n=t.pop();return{parent:this.getNode(t),index:n,parentPath:t}}},{key:"getNodeParent",value:function(e){return this.getNodeIndexAndParent(e).parent}},{key:"setPathNode",value:function(e,t){var n=this.childrenKey,r=this.rootChildren,o=this.getNodeIndexAndParent(e),i=o.parent,a=o.index;(1===e.length?r:i[n])[a]=t}},{key:"removeNode",value:function(e){var t=this.childrenKey,n=this.rootChildren,r=this.getNodeIndexAndParent(e),o=r.parent,i=r.index,a=1===e.length?n:o[t],c=a[i];return a.splice(i,1),c}},{key:"walk",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.childrenKey,r=this.data;return V(r,e,n,t.reverse)}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.childrenKey,r=[],o=new e(r);return this.walk((function(e,r,i,a){var c=Object.assign({},e);c[n]&&(c[n]=[]),t.afterNodeCreated&&t.afterNodeCreated(c,{oldNode:e,index:r,parent:i,path:a}),o.setPathNode(a,c)})),r}},{key:"rootChildren",get:function(){var e=this.childrenKey,t=this.data;return S(t)?t:t[e]}}]),e}();function $(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[],a=[],c=function(){for(var c=this,u=arguments.length,l=new Array(u),s=0;s<u;s++)l[s]=arguments[s];return new Promise((function(u,s){i.push(u),a.push(s),r=l,n||(n=!0,t=setTimeout((function(){var o=e.call.apply(e,[c].concat(m(r)));t=null,n=!1,i.forEach((function(e){return e(o)})),i=[],a=[]}),o))}))};return c.stop=function(){t&&(clearTimeout(t),t=null),n=!1,i=[],a.forEach((function(e){return e()})),a=[]},c}function Q(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=function(){var i=this;return new Promise((function(a,c){n?a(r):(n=!0,a(r=e.call.apply(e,[i].concat(m(lastArgs)))),t=setTimeout((function(){t=null,n=!1,r=null}),o))}))};return i.stop=function(){t&&(clearTimeout(t),t=null),n=!1},i}function Z(){if("undefined"!=typeof pageYOffset)return{top:pageYOffset,left:pageXOffset};var e=document.body,t=document.documentElement;return{top:(t=t.clientHeight?t:e).scrollTop,left:t.scrollLeft}}function X(e){var t=te(e),n=Z();return{x:t.left+n.left,y:t.top+n.top}}function ee(e){var t=e.offsetParent;return(!t||t===document.body&&"static"===getComputedStyle(document.body).position)&&(t=document.body.parentElement),t}function te(e){var t=e.getBoundingClientRect(),n=t.top-document.documentElement.clientTop,r=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:n,right:i,bottom:r,left:o,width:t.width||i-o,height:t.height||r-n,x:o,y:n}}var ne=te;function re(e,t,n){for(var r=n&&n.withSelf?e:e.parentElement;r;){var o=t(r);if("break"===o)return;if(o)return r;r=r.parentElement}}function oe(e,t){e["original_".concat(t)]=e.getAttribute(t)}function ie(e,t){var n="original_".concat(t);e.setAttribute(t,e[n])}function ae(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function ce(e){oe(e,"style"),e.style.display="block";var t=te(e),n={width:t.width,height:t.height};return ie(e,"style"),n}var ue=ce;function le(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(o))}function se(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(o))}function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=W(e,{reverse:n.reverse}),o=!0,i=!1,a=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,s=l.value,f=l.index;if(t(s,f))return s}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}function he(e,t,n,r,o){var i,a,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1e3;null==n&&(n=0,r=e.length-1);for(var u,l=0;n>=0&&n<=r;){if(l>=c)throw Error("binarySearch: loop times is over ".concat(c,", you can increase the limit."));if((u=t(a=e[i=Math.floor((r-n)/2+n)],l))>0)r=i-1;else{if(!(u<0))return{index:i,value:a,count:l+1,hit:!0};n=i+1}l++}return o?{index:i,value:a,count:l+1,hit:!1,bigger:u>0}:null}function de(e,t){return new Promise((function(n,r){setTimeout((function(){t&&t(),n()}),e)}))}function ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};O().open(e,t,Object.keys(n).map((function(e){return"".concat(e,"=").concat(n[e])})).join(","))}var pe=function(){function e(t){var n=this;f(this,e),this.baseUrl="",this.search={};var r=decodeURI(t).split("?");this.baseUrl=r[0],r[1]&&r[1].split("&").forEach((function(e){var t=e.split("=");n.search[t[0]]=null==t[1]?"":decodeURIComponent(t[1])}))}return d(e,[{key:"getHref",value:function(){var e=this,t=[this.baseUrl],n=Object.keys(this.search).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e.search[t]))})).join("&");return n&&t.push(n),t.join("?")}}]),e}();function ye(e){return{storage:e,set:function(e,t,n){null==t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify({value:t,expired_at:n?(new Date).getTime()+60*n*1e3:null}))},get:function(e){var t=this.storage.getItem(e);if(t){if(!(t=JSON.parse(t)).expired_at||t.expired_at>(new Date).getTime())return t.value;this.storage.removeItem(e)}return null},clear:function(){this.storage.clear()}}}var ge=function(){function e(){f(this,e),this.eventStore=[]}return d(e,[{key:"on",value:function(e,t){this.eventStore.push({name:e,handler:t})}},{key:"once",value:function(e,t){var n=this,r=function(){n.off(e,o)},o=function(){t.apply(void 0,arguments),r()};return this.on(e,o),r}},{key:"onceTimeout",value:function(e,t,n){var r,o=this;return{off:function(){r&&r()},promise:new Promise((function(i,a){r=o.once(e,(function(){t.apply(void 0,arguments),i()})),de(n).then((function(){r(),a()}))}))}}},{key:"off",value:function(e,t){for(var n=[],r=this.eventStore.length,o=0;o<r;o++){var i=this.eventStore[o];i.name===e&&i.handler===t&&n.unshift(o)}for(var a=0,c=n;a<c.length;a++){var u=c[a];this.eventStore.splice(u,1)}}},{key:"emit",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.eventStore[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value;c.name===e&&t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}for(var u=arguments.length,l=new Array(u>1?u-1:0),s=1;s<u;s++)l[s-1]=arguments[s];for(var f=0,h=t;f<h.length;f++){var d=h[f];d.handler.apply(d,l)}}}]),e}(),me=function(e){function t(e){var n;return f(this,t),(n=o(this,i(t).call(this))).storageName="_crossWindow",n.windows=[],n.timeout=200,n.BROADCAST="__BROADCAST__",e&&Object.assign(r(n),e),le(window,"storage",(function(e){if(e.key===n.storageName){var t,r=JSON.parse(e.newValue);if(!r.targets||r.targets.includes(n.id))(t=n).emitLocal.apply(t,[r.name].concat(m(r.args)))}})),n.id=M(),n.windows=[n.id],n.ready=new Promise((function(e,t){n.onceTimeout("_windows_updated",(function(e){var t=e.windows;n.windows=t}),n.timeout).promise.then((function(){e()}),(function(){e()})),n.broadcast("_join",n.id)})),n.ready.then((function(){n.on("_join",(function(e){n.windows.push(e),n.isMain()&&n.broadcast("_windows_updated",{windows:n.windows,type:"join",id:e})})),n.on("_windows_updated",(function(e){var t=e.windows;n.windows=t})),n.on("_exit",(function(e){var t=n.windows[0];D(n.windows,e),n.isMain()&&(n.emit("_windows_updated",{windows:n.windows,type:"exit",id:e}),t!=n.id&&n.emit("_main_updated",{windows:n.windows,old:t,new:n.id}))})),le(window,"beforeunload",(function(){n.exitGroup()}))})),n}return l(t,e),d(t,[{key:"isMain",value:function(){return this.id===this.windows[0]}},{key:"emitTo",value:function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];var u;n===this.BROADCAST?n=null:(n&&!S(n)&&(n=[n]),n.includes(this.id)&&(u=c(i(t.prototype),"emit",this)).call.apply(u,[this,e].concat(o)));O().localStorage.setItem(this.storageName,JSON.stringify({name:e,targets:n,args:o,random:Math.random()}))}},{key:"emitLocal",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.id].concat(n))}},{key:"broadcast",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.BROADCAST].concat(n))}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.windows].concat(n))}},{key:"exitGroup",value:function(){this.broadcast("_exit",this.id)}}]),t}(ge),be=me;var we=function(){function e(){f(this,e),this.store={}}return d(e,[{key:"has",value:function(e){return this.store.hasOwnProperty(e)}},{key:"remember",value:function(e,t){return this.has(e)||(this.store[e]={value:t()}),this.store[e].value}},{key:"forget",value:function(e){e?this.has(e)&&delete this.store[e]:this.store={}}}]),e}();e.Cache=we,e.CrossWindow=be,e.CrossWindowEventProcessor=me,e.EventProcessor=ge,e.TreeData=Y,e.URLHelper=pe,e.addClass=function(e,t){ae(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)},e.appendTo=function(e,t){t.appendChild(e)},e.arrayAt=function(e,t){return e[t>=0?t:e.length+t]},e.arrayDiff=function(e,t){for(var n=e.length,r=[];n--;)t.indexOf(e[n])<0&&r.push(e[n]);return r},e.arrayDistinct=function(e){return O().Set?m(new Set(e)):e.filter((function(e,t,n){return n.indexOf(e)===t}))},e.arrayFirst=function(e){return e[0]},e.arrayGet=function(e,t,n){return t<0&&(t+=e.length),null==n?e[t]:(n<0&&(n+=e.length),e.slice(t,n-t+1))},e.arrayLast=G,e.arrayRemove=D,e.arrayRemoveBySortedIndexes=function(e,t){for(var n=t.length-1;n>=0;n--){var r=t[n];e.splice(r,1)}},e.arraySibling=function(e,t,n){var r=e.indexOf(t);if(-1===r)throw"item is not in array";return S(n)?n.map((function(t){return e[r+t]})):e[r+n]},e.arrayWithoutEnd=function(e,t){return e.slice(0,e.length-t)},e.assignIfDifferent=function(e,t,n){e[t]!==n&&(e[t]=n)},e.attachCache=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new we,r=function(r){var o=t[r];Object.defineProperty(e,r,{get:function(){var e=this;return n.remember(r,(function(){return o.call(e)}))}})};for(var o in t)r(o)},e.backupAttr=oe,e.binarySearch=he,e.camelCase=R,e.camelToWords=B,e.cloneObj=function e(t,r){switch(n(t)){case"undefined":case"boolean":case"nuber":case"string":case"function":return t;case"object":if(null===t)return t;var o;if(S(t)){o=[];var i=!0,a=!1,c=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var s=u.value;o.push(e(s,r))}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}else{o={};for(var f=0,h=Object.keys(t);f<h.length;f++){var d=h[f];r&&(!S(r)||r.includes(d))&&r(d,t[d],t)||(o[d]=e(t[d],r))}}return o;default:return t}},e.copyTextToClipboard=function(e){try{return void navigator.clipboard.writeText(e)}catch(e){}var t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="2em",t.style.height="2em",t.style.padding=0,t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Copying text command was "+n)}catch(e){console.log("Oops, unable to copy")}document.body.removeChild(t)},e.createElementFromHTML=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.childNodes.length>1?t.childNodes:t.childNodes[0]},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.immediate?Q(e,t):$(e,t)},e.debounceImmediate=Q,e.debounceTrailing=$,e.depthFirstSearch=J,e.elementsFromPoint=function(){for(var e=document.elementsFromPoint||document.msElementsFromPoint||o,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(document,n);function o(e,t){var n=[],r=void 0;do{r!==document.elementFromPoint(e,t)?(r=document.elementFromPoint(e,t),n.push(r),r.style.pointerEvents="none"):r=!1}while(r);return n.forEach((function(e){return e.style.pointerEvents="all"})),n}},e.empty=function(e){return null==e||(null!=e.length?0===e.length:!E(e)&&(P(e)?isNaN(e):A(e)?0===Object.keys(e).length:void 0))},e.executeOnceInScopeByName=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:scope_executeOnceInScopeByName,r=arguments.length>3?arguments[3]:void 0;if(e="executeOnceInScopeByName_".concat(e),!n[e]){var o=t(),i=function(){delete n[e]};n[e]={destroy:i},r&&(n[e].value=o)}return n[e]},e.executePromiseGetters=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=new Promise((function(r,o){var i=[],a=U(e,n),c=Promise.resolve();a.forEach((function(e){c=c.then((function(n){if(n&&i.push.apply(i,m(n)),!t)return Promise.all(e.map((function(e){return e()})));o("stopped")}))})),c.then((function(e){i.push.apply(i,m(e)),r(i)}))}));return{promise:r,destroy:function(){t=!0}}},e.executeWithCount=function(e){var t=0;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.call.apply(e,[this,t++].concat(r))}},e.findNodeList=fe,e.findNodeListReverse=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.reverse=!0,fe(e,t,n)},e.findParent=re,e.forAll=function(e,t,n){if(n){if(S(e)||N(e)||e.hasOwnProperty("length"))for(var r=e.length-1;r>=0&&!1!==t(e[r],r);r--);else if(A(e)){var o=Object.keys(e);o.reverse();for(var i=0,a=o;i<a.length;i++){var c=a[i];if(!1===t(e[c],c))break}}else if(Number.isInteger(e))for(var u=e-1;u>=0&&!1!==t(u,u);u--);}else if(S(e)||N(e)||e.hasOwnProperty("length"))for(var l=0;l<e.length&&!1!==t(e[l],l);l++);else if(A(e))for(var s=0,f=Object.keys(e);s<f.length;s++){var h=f[s];if(!1===t(e[h],h))break}else if(Number.isInteger(e))for(var d=0;d<e&&!1!==t(d,d);d++);},e.getBorder=function(e){var t=document.body,n=re(e,(function(e){return ae(e,"work-area")})),r=X(n);return{left:r.x,right:r.x+n.offsetWidth,top:r.y+50,bottom:t.offsetHeight<O().innerHeight?O().innerHeight:t.offsetHeight}},e.getBoundingClientRect=te,e.getCss3Prefix=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.noCache||null==k.css3Prefix)&&(k.css3Prefix=t()),k.css3Prefix;function t(){var e=document.createElement("div");e.style.cssText="-webkit-transition:all .1s; -moz-transition:all .1s; -o-transition:all .1s; -ms-transition:all .1s; transition:all .1s;";var t=e.style;return t.webkitTransition?"-webkit-":t.MozTransition?"-moz-":t.oTransition?"-o-":t.msTransition?"-ms-":""}},e.getElSize=ce,e.getElSizeEvenInvisible=ue,e.getImageSizeByUrl=function(e){var t=document.createElement("img");return new Promise((function(n,r){le(t,"load",(function(){n({width:t.width,height:t.height})})),le(t,"error",(function(e){r(e)})),t.src=e}))},e.getLocalStorage2=function(){return k.localStorage2||(k.localStorage2=ye(O().localStorage)),k.localStorage2},e.getOffset=X,e.getOffsetParent=ee,e.getOuterAttachedHeight=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=w({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-top","margin-bottom"),t.border&&o.push("border-top-width","border-bottom-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getOuterAttachedWidth=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=w({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-left","margin-right"),t.border&&o.push("border-left-width","border-right-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getPosition=function(e){for(var t=ee(e),n={x:e.offsetLeft,y:e.offsetTop},r=e;(r=r.parentElement)!==t&&r;)n.x-=r.scrollLeft,n.y-=r.scrollTop;return n},e.getPositionFromOffset=function(e,t){var n=X(ee(e));return{x:t.x-n.x,y:t.y-n.y}},e.getScroll=Z,e.getSessionStorage2=function(){return k.sessionStorage2||(k.sessionStorage2=ye(O().sessionStorage)),k.sessionStorage2},e.getUrlParam=function(e){var t=document.location.href,n=t.indexOf(e+"=");if(-1==n)return!1;var r=t.slice(e.length+n+1),o=r.indexOf("&");return-1!=o&&(r=r.slice(0,o)),r},e.getUserLanguage=function(){return navigator.language||navigator.userLanguage},e.getViewportPosition=ne,e.glb=O,e.groupArray=function(e,t){var n=new Map;e.forEach((function(e){var r=t(e);n.has(r)||n.set(r,[]),n.get(r).push(e)}));var r=[];return n.forEach((function(e,t){r.push([t,e])})),r},e.hasClass=ae,e.insertAfter=function(e,t){t.parentElement.insertBefore(e,t.nextSibling)},e.insertBefore=function(e,t){t.parentElement.insertBefore(e,t)},e.isArray=S,e.isBool=E,e.isDescendantOf=function(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}},e.isFunction=T,e.isNumber=P,e.isNumeric=L,e.isObject=A,e.isOffsetInEl=function(e,t,n){var r=X(n);return r.x<=e&&r.x+n.offsetWidth>=e&&r.y<=t&&r.y+n.offsetHeight>=t},e.isPromise=function(e){return"[object Promise]"===Object.prototype.toString.call(e)},e.isString=N,e.isset=j,e.iterateALL=K,e.iterateAll=W,e.joinFunctionsByNext=function(e){var t=function(){},n=!0,r=!1,o=void 0;try{for(var i,a=W(e,{reverse:!0})[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){t=c(i.value.value,t)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t;function c(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.apply(void 0,[t].concat(r))}}},e.joinFunctionsByResult=function(e){for(var t=e[0],n=1;n<e.length;n++)t=r(t,e[n]);return t;function r(e,t){return function(n){args;var r=e(n);return t(r)}}},e.joinMethods=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=!0,o=!1,i=void 0;try{for(var a,c=function(){var e=a.value,r=t;t=r?function(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return e.call.apply(e,[this,"value"===n?r.call.apply(r,[this].concat(o)):r].concat(o))}:e},u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)c()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return t},e.jqFixedSize=function(e){var t=O().jQuery;t(e).each((function(){var e=t(this);e.css({width:e.width()+"px",height:e.height()+"px"})}))},e.jqMakeCarousel=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:16,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"left",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;o.toString().match(/^\d+$/)&&(o+="px");var c=parseFloat(o),u=O().jQuery,l=u(e),s=l.find(t);l.css({position:"relative",height:l.height()+"px"});var f=s.find(n);f.css({margin:"0",marginRight:o});var h=(Math.ceil(f.width())+c)*f.length;s.css({position:"absolute",margin:"0",width:h+"px"});var d=s.height(),v=s.clone(),p=s.clone();s.css({left:0}),v.css({left:h+"px"}),p.css({left:2*h+"px"});var y=u("<div></div>");y.css({position:"absolute",width:3*h+"px",height:d+"px",left:0,top:a}),y.append(s).append(v).append(p),l.append(y);var g=0;function m(){"left"===i?g-=100:g+=100,y.animate({left:"".concat(g,"px")},r,"linear",(function(){Math.abs(g)>h&&("left"===i?g+=h:g-=h,y.css({left:g+"px"})),m()}))}m()},e.kebabCase=F,e.makeStorageHelper=ye,e.mapObjectTree=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,o=0,i=[{value:e}],a=function(){if(o>=r)throw"mapObjectTree: limit(".concat(r,") reached, object may has circular reference");o++;var e=i.shift(),a=e.value,c=e.key,u=e.parent,l=e.newParent,s=t(a,c,u,l),f=function(e,t,r){return S(e)?e=[]:A(e)&&(e={}),u?S(l)&&r?l.push(e):l[t]=e:n=e,e},h=void 0,d=void 0,v=void 0,p=void 0,y=void 0;if(s){var g=s.key,m=s.value;d=m,s.delete||!1===g?v=!0:null==g?h=f(m,c,!0):s.hasOwnProperty("value")&&(h=f(m,g)),p=s.stop,y=s.skip}else d=a,h=f(a,c);if(v)return"continue";if(y)return"continue";if(p)return"break";if(S(d))for(var b=d.length,w=0;w<b;w++)i.push({value:d[w],key:w,parent:d,newParent:h});else A(d)&&Object.keys(d).forEach((function(e){i.push({value:d[e],key:e,parent:d,newParent:h})}))};e:for(;i.length>0;){var c=a();switch(c){case"continue":continue;case"break":break e}}return n},e.mapObjects=q,e.max=C,e.min=function(e,t){return e<t?t:e},e.newArrayRemoveAt=function(e,t){t=H(t);var n={},r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){n[a.value]=!0}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}for(var u=[],l=e.length,s=0;s<l;s++)n[s]||u.push(e[s]);return u},e.numPad=function(e,t){for(var n=e.toString().length;n<t;)e="0"+e,n++;return e},e.numRand=_,e.objectExcept=function(e,t){var n={};for(var r in e)-1===t.indexOf(r)&&(n[r]=e[r]);return n},e.objectGet=z,e.objectMap=function(e,t){var n={};for(var r in e)n[r]=t(e[r],r,e);return n},e.objectMerge=function(e,t){for(var n in t)e.hasOwnProperty(n)&&A(e[n])&&A(t[n])?Object.assign(e[n],t[n]):e[n]=t[n];return e},e.objectOnly=function(e,t){var n={};for(var r in e)t.indexOf(r)>-1&&(n[r]=e[r]);return n},e.objectSet=function(e,t,n){var r=S(t)?t:t.split("."),o=G(r),i=z(e,r.slice(0,r.length-1));if(!i)throw"Path does not exist";i[o]=n},e.offDOM=se,e.offsetToViewportPosition=function(e){var t=document.body,n=X(t),r=ne(t);return{x:e.x+r.x-n.x,y:e.y+r.y-n.y}},e.onDOM=le,e.onDOMMany=function(e,t,n){e=H(e),t=H(t);for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];var a=!0,c=!1,u=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done);a=!0){var f=l.value,h=!0,d=!1,v=void 0;try{for(var p,y=t[Symbol.iterator]();!(h=(p=y.next()).done);h=!0){var g=p.value;le.apply(void 0,[f,g,n].concat(o))}}catch(e){d=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(d)throw v}}}}catch(e){c=!0,u=e}finally{try{a||null==s.return||s.return()}finally{if(c)throw u}}var m=function(){var r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var u=a.value,l=!0,s=!1,f=void 0;try{for(var h,d=t[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){se(u,h.value,n)}}catch(e){s=!0,f=e}finally{try{l||null==d.return||d.return()}finally{if(s)throw f}}}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}};return m},e.onQuickKeydown=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=w({timeout:1e3},t);var n,r="",o=function(o){o.key&&1===o.key.length&&(r="".concat(r).concat(o.key),e(r),n&&(clearTimeout(n),n=null),setTimeout((function(){r=""}),t.timeout))};return le(document,"keydown",o),function(){se(document,"keydown",o)}},e.openCenterWindow=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i={width:n,height:r,top:(O().screen.availHeight-30-r)/2,left:(O().screen.availWidth-30-n)/2};Object.assign(i,o),ve(e,t,i)},e.openWindow=ve,e.pairRows=function(e,t,n,r){r||(r=n);var o=q(t,r);return e.map((function(e){return[e,o[e[n]]]}))},e.prependTo=function(e,t){t.insertBefore(e,t.firstChild)},e.promiseTimeout=function(e,t){return new Promise((function(n,r){var o,i;e.then((function(){clearTimeout(o),n.apply(void 0,arguments)}),(function(){i||(clearTimeout(o),r.apply(void 0,arguments))})),o=setTimeout((function(){i=!0;var e=new Error("Promise timeout!");e.name="timeout",r(e)}),t)}))},e.removeClass=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},e.removeEl=function(e){if(null!==e.parentNode)return e.parentNode.removeChild(e)},e.replaceMultiple=function(e,t){var n=new RegExp(Object.keys(e).join("|"),"g");return t.replace(n,(function(t){return e[t]}))},e.resolveArgsByType=function(e,t){var n=0;return t.map((function(t){var r,o;if(S(t)?(r=t[0],o=t[1]):(r=t,o=void 0),!T(r))if(null==r)r=function(){return!0};else{var i=r;r=function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}}var a=e[n];return r(a)?(n++,a):o}))},e.resolveValueOrGettter=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return T(e)?e.apply(void 0,m(t)):e},e.restoreAttr=ie,e.retry=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;k.retry||(k.retry={});var r=e,o=a();return r[o]=0,i;function i(e,a,c){return t(e,a,c).then((function(e){return delete r[o],e})).catch((function(t){return r[o]++,r[o]>=n?(delete r[o],Promise.reject(t)):i(e,a,c)}))}function a(){var e=Math.random()+"";return r[e]?a():e}},e.setElChildByIndex=function(e,t,n){n.childComponentIndex=t;var r=e.childNodes.length;if(0===r)e.appendChild(n);else if(0===t)e.insertBefore(n,e.childNodes[0]);else{var o=he(e.childNodes,(function(e){return e.childComponentIndex-t}),0,C(t,r-1),!0),i=o.index,a=o.value;if(o.bigger)e.insertBefore(n,a);else{var c=e.childNodes[i+1];c?e.insertBefore(n,c):e.appendChild(n)}}},e.snakeCase=function(e){return F(e).replace(/-/g,"_")},e.splitArray=U,e.store=k,e.store_executeOnceInScopeByName={},e.strRand=M,e.studlyCase=I,e.titleCase=function(e){return B(I(R(e))).join(" ").replace(/\bid\b/gi,"ID")},e.toArrayIfNot=H,e.uniqueId=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id_",n=t+M();k.uniqueId||(k.uniqueId={});var r=k.uniqueId;return document.getElementById(n)||r[n]?e(t):(r[n]=!0,n)},e.unset=function(e,t){e[t]=void 0;try{delete e[t]}catch(e){}},e.viewportPositionToOffset=function(e){var t=document.body,n=X(t),r=ne(t);return{x:e.x+n.x-r.x,y:e.y+n.y-r.y}},e.waitFor=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;T(e)&&(r=n,n=L(t)?t:100,t=e,e=null),k.waitFor||(k.waitFor={});var o=k.waitFor;return e&&j(o[e])&&(O().clearInterval(o[e]),delete o[e]),new Promise((function(i,a){var c=0;function u(n){c<=r?t()&&(l(n,e),i()):(l(n,e),a(new Error("waitFor: Limit is reached"))),c++}function l(e,t){e&&(t&&j(o[t])?(O().clearInterval(o[t]),delete o[t]):O().clearInterval(e))}var s=O().setInterval((function(){u(s)}),n);e&&(o[e]=s),u()}))},e.waitTime=de,e.walkTreeData=V,e.watchChange=function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=e.apply(void 0,o);n!==a&&t.apply(void 0,[a].concat(o)),n=a}},e.windowLoaded=function(){return new Promise((function(e,t){document&&"complete"===document.readyState?e():O().addEventListener("load",(function t(){e(),O().removeEventListener("load",t)}))}))},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).helperJs={})}(this,(function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}));var r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var o=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?r(e):t},i=t((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e},c=t((function(e){function t(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var r=a(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},t(n,r,o||n)}e.exports=t})),u=t((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var l=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&&u(e,t)};var s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e};var d=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},v=t((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof s?t:s,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function s(){}function f(){}function h(){}var d={};d[o]=function(){return this};var v=Object.getPrototypeOf,p=v&&v(v(O([])));p&&p!==t&&n.call(p,o)&&(d=p);var y=h.prototype=s.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,a){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?Promise.resolve(s.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return t("throw",e,i,a)}))}a(c.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return f.prototype=y.constructor=h,h.constructor=f,h[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(m.prototype),m.prototype[i]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,o){var i=new m(c(t,n,r,o));return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=O,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var p=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var y=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var g=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var m=function(e){return p(e)||y(e)||g()};function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=v.mark(W),k={};function O(){if(k.glb)return k.glb;var e;try{e=global}catch(t){e=window}return k.glb=e,e}function j(e){return void 0!==e}function S(e){return"[object Array]"===Object.prototype.toString.call(e)}function E(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function P(e){return"[object Number]"===Object.prototype.toString.call(e)}function L(e){return isFinite(e)&&!isNaN(parseFloat(e))}function N(e){return"[object String]"===Object.prototype.toString.call(e)}function A(e){return"[object Object]"===Object.prototype.toString.call(e)}function T(e){return"function"==typeof e}function _(e,t){return 1===arguments.length&&(t=e,e=0),Math.floor(Math.random()*(t-e+1)+e)}function C(e,t){return e<t?e:t}function I(e){return e&&e[0].toUpperCase()+e.substr(1)}function F(e){return e.replace(/ /g,"-").replace(/_/g,"-").replace(/([A-Z])/g,"-$1").replace(/--+/g,"-").replace(/^-|-$|/g,"").toLowerCase()}function R(e){for(var t=e.toString().split(/[-_]/),n=1;n<t.length;n++)t[n]=I(t[n]);return t.join("")}function B(e){return e.toString().trim().split(/(?=[A-Z])/)}function M(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=0;o<e;o++)n+=r[_(r.length-1)];return t+n}function D(e,t){for(var n,r=0;(n=e.indexOf(t))>-1;)e.splice(n,1),r++;return r}function G(e){return e[e.length-1]}function H(e){return S(e)?e:[e]}function U(e,t){var n=[];if(T(t))for(var r=t,o=1,i=0;i<e.length;){var a=i+r(o);n.push(e.slice(i,a)),i=a,o++}else for(var c=0;c<e.length;){var u=c+t;n.push(e.slice(c,u)),c=u}return n}function W(e){var t,n,r,o,i,a,c,u,l,s,f,h,d,p,y=arguments;return v.wrap((function(v){for(;;)switch(v.prev=v.next){case 0:if((t=y.length>1&&void 0!==y[1]?y[1]:{}).reverse){v.next=30;break}if(null==e.length){v.next=14;break}n=0;case 4:if(!(n<e.length)){v.next=12;break}if(r={value:e[n],index:n},t.exclude&&t.exclude(r)){v.next=9;break}return v.next=9,r;case 9:n++,v.next=4;break;case 12:v.next=28;break;case 14:if(!A(e)){v.next=27;break}o=0,i=Object.keys(e);case 16:if(!(o<i.length)){v.next=25;break}if(a=i[o],c={value:e[a],key:a},t.exclude&&t.exclude(c)){v.next=22;break}return v.next=22,c;case 22:o++,v.next=16;break;case 25:v.next=28;break;case 27:throw"Unsupported type";case 28:v.next=58;break;case 30:if(null==e.length){v.next=42;break}u=e.length-1;case 32:if(!(u>=0)){v.next=40;break}if(l={value:e[u],index:u},t.exclude&&t.exclude(l)){v.next=37;break}return v.next=37,l;case 37:u--,v.next=32;break;case 40:v.next=58;break;case 42:if(!A(e)){v.next=57;break}(s=Object.keys(e)).reverse(),f=0,h=s;case 46:if(!(f<h.length)){v.next=55;break}if(d=h[f],p={value:e[d],key:d},t.exclude&&t.exclude(p)){v.next=52;break}return v.next=52,p;case 52:f++,v.next=46;break;case 55:v.next=58;break;case 57:throw"Unsupported type";case 58:case"end":return v.stop()}}),x)}var K=W;function z(e,t,n){var r=S(t)?t:t.split("."),o=e;try{var i=!0,a=!1,c=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){o=o[u.value]}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}catch(e){if(n)throw"Path does not exist"}return o}function q(e,t){for(var n={},r=e.length,o=0;o<r;o++){var i=e[o];n[T(t)?t(i,o):i[t]]=i}return n}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children",r=arguments.length>3?arguments[3]:void 0,o=S(e)?e:[e],i=function e(){d(this,e)},a=function e(o,a,c){r&&(o=o.slice()).reverse();for(var u=o.length,l=0;l<u;l++){var s=o[l],f=r?u-l-1:l,h=c?[].concat(m(c),[f]):[],d=t(s,f,a,h);if(!1===d)throw new i;if("skip children"!==d){if("skip siblings"===d)break;null!=s[n]&&e(s[n],s,h)}}};try{a(o,null,S(e)?[]:null)}catch(e){if(!(e instanceof i))throw e}}var V=J,Y=function(){function e(t){d(this,e),this.childrenKey="children",this.data=t}return h(e,[{key:"iteratePath",value:v.mark((function e(t){var n,r,o,i,a,c,u,l,s,f,h,d,p,y,g,b,x,k,O,j,S,E,P=arguments;return v.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=P.length>1&&void 0!==P[1]?P[1]:{},r=this.childrenKey,o=this.rootChildren,n.reverse){e.next=38;break}i=[],a=o,c=!0,u=!1,l=void 0,e.prev=8,s=t[Symbol.iterator]();case 10:if(c=(f=s.next()).done){e.next=22;break}return h=f.value,d=[].concat(m(i),[h]),p=a[h],e.next=16,{path:d,node:p};case 16:i=d,a=p[r];case 19:c=!0,e.next=10;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(8),u=!0,l=e.t0;case 28:e.prev=28,e.prev=29,c||null==s.return||s.return();case 31:if(e.prev=31,!u){e.next=34;break}throw l;case 34:return e.finish(31);case 35:return e.finish(28);case 36:e.next=66;break;case 38:(y=m(this.iteratePath(t,w({},n,{reverse:!1})))).reverse(),g=!0,b=!1,x=void 0,e.prev=43,k=y[Symbol.iterator]();case 45:if(g=(O=k.next()).done){e.next=52;break}return j=O.value,S=j.path,E=j.node,e.next=49,{path:S,node:E};case 49:g=!0,e.next=45;break;case 52:e.next=58;break;case 54:e.prev=54,e.t1=e.catch(43),b=!0,x=e.t1;case 58:e.prev=58,e.prev=59,g||null==k.return||k.return();case 61:if(e.prev=61,!b){e.next=64;break}throw x;case 64:return e.finish(61);case 65:return e.finish(58);case 66:case"end":return e.stop()}}),e,this,[[8,24,28,36],[29,,31,35],[43,54,58,66],[59,,61,65]])}))},{key:"getAllNodes",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.iteratePath(e)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value.node;t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t}},{key:"getNode",value:function(e){return G(this.getAllNodes(e))}},{key:"getNodeIndexAndParent",value:function(e){var t=e.slice(),n=t.pop();return{parent:this.getNode(t),index:n,parentPath:t}}},{key:"getNodeParent",value:function(e){return this.getNodeIndexAndParent(e).parent}},{key:"setPathNode",value:function(e,t){if(null==e||0===e.length)this.data=t;else{var n=this.childrenKey,r=this.rootChildren,o=this.getNodeIndexAndParent(e),i=o.parent,a=o.index;(1===e.length?r:i[n])[a]=t}}},{key:"removeNode",value:function(e){var t=this.childrenKey,n=this.rootChildren,r=this.getNodeIndexAndParent(e),o=r.parent,i=r.index,a=1===e.length?n:o[t],c=a[i];return a.splice(i,1),c}},{key:"walk",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.childrenKey,r=this.data;return V(r,e,n,t.reverse)}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.childrenKey,r=new e;return this.walk((function(e,o,i,a){var c=Object.assign({},e);c[n]&&(c[n]=[]),t.afterNodeCreated&&t.afterNodeCreated(c,{oldNode:e,index:o,parent:i,path:a}),r.setPathNode(a,c)})),r.data}},{key:"rootChildren",get:function(){var e=this.childrenKey;this.data||(this.data=[]);var t=this.data;return S(t)?t:t[e]}}]),e}();function $(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[],a=[],c=function(){for(var c=this,u=arguments.length,l=new Array(u),s=0;s<u;s++)l[s]=arguments[s];return new Promise((function(u,s){i.push(u),a.push(s),r=l,n||(n=!0,t=setTimeout((function(){var o=e.call.apply(e,[c].concat(m(r)));t=null,n=!1,i.forEach((function(e){return e(o)})),i=[],a=[]}),o))}))};return c.stop=function(){t&&(clearTimeout(t),t=null),n=!1,i=[],a.forEach((function(e){return e()})),a=[]},c}function Q(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=function(){var i=this;return new Promise((function(a,c){n?a(r):(n=!0,a(r=e.call.apply(e,[i].concat(m(lastArgs)))),t=setTimeout((function(){t=null,n=!1,r=null}),o))}))};return i.stop=function(){t&&(clearTimeout(t),t=null),n=!1},i}function Z(){if("undefined"!=typeof pageYOffset)return{top:pageYOffset,left:pageXOffset};var e=document.body,t=document.documentElement;return{top:(t=t.clientHeight?t:e).scrollTop,left:t.scrollLeft}}function X(e){var t=te(e),n=Z();return{x:t.left+n.left,y:t.top+n.top}}function ee(e){var t=e.offsetParent;return(!t||t===document.body&&"static"===getComputedStyle(document.body).position)&&(t=document.body.parentElement),t}function te(e){var t=e.getBoundingClientRect(),n=t.top-document.documentElement.clientTop,r=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:n,right:i,bottom:r,left:o,width:t.width||i-o,height:t.height||r-n,x:o,y:n}}var ne=te;function re(e,t,n){for(var r=n&&n.withSelf?e:e.parentElement;r;){var o=t(r);if("break"===o)return;if(o)return r;r=r.parentElement}}function oe(e,t){e["original_".concat(t)]=e.getAttribute(t)}function ie(e,t){var n="original_".concat(t);e.setAttribute(t,e[n])}function ae(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function ce(e){oe(e,"style"),e.style.display="block";var t=te(e),n={width:t.width,height:t.height};return ie(e,"style"),n}var ue=ce;function le(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(o))}function se(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(o))}function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=W(e,{reverse:n.reverse}),o=!0,i=!1,a=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,s=l.value,f=l.index;if(t(s,f))return s}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}function he(e,t,n,r,o){var i,a,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1e3;null==n&&(n=0,r=e.length-1);for(var u,l=0;n>=0&&n<=r;){if(l>=c)throw Error("binarySearch: loop times is over ".concat(c,", you can increase the limit."));if((u=t(a=e[i=Math.floor((r-n)/2+n)],l))>0)r=i-1;else{if(!(u<0))return{index:i,value:a,count:l+1,hit:!0};n=i+1}l++}return o?{index:i,value:a,count:l+1,hit:!1,bigger:u>0}:null}function de(e,t){return new Promise((function(n,r){setTimeout((function(){t&&t(),n()}),e)}))}function ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};O().open(e,t,Object.keys(n).map((function(e){return"".concat(e,"=").concat(n[e])})).join(","))}var pe=function(){function e(t){var n=this;d(this,e),this.baseUrl="",this.search={};var r=decodeURI(t).split("?");this.baseUrl=r[0],r[1]&&r[1].split("&").forEach((function(e){var t=e.split("=");n.search[t[0]]=null==t[1]?"":decodeURIComponent(t[1])}))}return h(e,[{key:"getHref",value:function(){var e=this,t=[this.baseUrl],n=Object.keys(this.search).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e.search[t]))})).join("&");return n&&t.push(n),t.join("?")}}]),e}();function ye(e){return{storage:e,set:function(e,t,n){null==t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify({value:t,expired_at:n?(new Date).getTime()+60*n*1e3:null}))},get:function(e){var t=this.storage.getItem(e);if(t){if(!(t=JSON.parse(t)).expired_at||t.expired_at>(new Date).getTime())return t.value;this.storage.removeItem(e)}return null},clear:function(){this.storage.clear()}}}var ge=function(){function e(){d(this,e),this.eventStore=[]}return h(e,[{key:"on",value:function(e,t){this.eventStore.push({name:e,handler:t})}},{key:"once",value:function(e,t){var n=this,r=function(){n.off(e,o)},o=function(){t.apply(void 0,arguments),r()};return this.on(e,o),r}},{key:"onceTimeout",value:function(e,t,n){var r,o=this;return{off:function(){r&&r()},promise:new Promise((function(i,a){r=o.once(e,(function(){t.apply(void 0,arguments),i()})),de(n).then((function(){r(),a()}))}))}}},{key:"off",value:function(e,t){for(var n=[],r=this.eventStore.length,o=0;o<r;o++){var i=this.eventStore[o];i.name===e&&i.handler===t&&n.unshift(o)}for(var a=0,c=n;a<c.length;a++){var u=c[a];this.eventStore.splice(u,1)}}},{key:"emit",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=this.eventStore[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value;c.name===e&&t.push(c)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}for(var u=arguments.length,l=new Array(u>1?u-1:0),s=1;s<u;s++)l[s-1]=arguments[s];for(var f=0,h=t;f<h.length;f++){var d=h[f];d.handler.apply(d,l)}}}]),e}(),me=function(e){function t(e){var n;return d(this,t),(n=o(this,i(t).call(this))).storageName="_crossWindow",n.windows=[],n.timeout=200,n.BROADCAST="__BROADCAST__",e&&Object.assign(r(n),e),le(window,"storage",(function(e){if(e.key===n.storageName){var t,r=JSON.parse(e.newValue);if(!r.targets||r.targets.includes(n.id))(t=n).emitLocal.apply(t,[r.name].concat(m(r.args)))}})),n.id=M(),n.windows=[n.id],n.ready=new Promise((function(e,t){n.onceTimeout("_windows_updated",(function(e){var t=e.windows;n.windows=t}),n.timeout).promise.then((function(){e()}),(function(){e()})),n.broadcast("_join",n.id)})),n.ready.then((function(){n.on("_join",(function(e){n.windows.push(e),n.isMain()&&n.broadcast("_windows_updated",{windows:n.windows,type:"join",id:e})})),n.on("_windows_updated",(function(e){var t=e.windows;n.windows=t})),n.on("_exit",(function(e){var t=n.windows[0];D(n.windows,e),n.isMain()&&(n.emit("_windows_updated",{windows:n.windows,type:"exit",id:e}),t!=n.id&&n.emit("_main_updated",{windows:n.windows,old:t,new:n.id}))})),le(window,"beforeunload",(function(){n.exitGroup()}))})),n}return l(t,e),h(t,[{key:"isMain",value:function(){return this.id===this.windows[0]}},{key:"emitTo",value:function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];var u;n===this.BROADCAST?n=null:(n&&!S(n)&&(n=[n]),n.includes(this.id)&&(u=c(i(t.prototype),"emit",this)).call.apply(u,[this,e].concat(o)));O().localStorage.setItem(this.storageName,JSON.stringify({name:e,targets:n,args:o,random:Math.random()}))}},{key:"emitLocal",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.id].concat(n))}},{key:"broadcast",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.BROADCAST].concat(n))}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emitTo.apply(this,[e,this.windows].concat(n))}},{key:"exitGroup",value:function(){this.broadcast("_exit",this.id)}}]),t}(ge),be=me;var we=function(){function e(){d(this,e),this.store={}}return h(e,[{key:"has",value:function(e){return this.store.hasOwnProperty(e)}},{key:"remember",value:function(e,t){return this.has(e)||(this.store[e]={value:t()}),this.store[e].value}},{key:"forget",value:function(e){e?this.has(e)&&delete this.store[e]:this.store={}}}]),e}();e.Cache=we,e.CrossWindow=be,e.CrossWindowEventProcessor=me,e.EventProcessor=ge,e.TreeData=Y,e.URLHelper=pe,e.addClass=function(e,t){ae(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)},e.appendTo=function(e,t){t.appendChild(e)},e.arrayAt=function(e,t){return e[t>=0?t:e.length+t]},e.arrayDiff=function(e,t){for(var n=e.length,r=[];n--;)t.indexOf(e[n])<0&&r.push(e[n]);return r},e.arrayDistinct=function(e){return O().Set?m(new Set(e)):e.filter((function(e,t,n){return n.indexOf(e)===t}))},e.arrayFirst=function(e){return e[0]},e.arrayGet=function(e,t,n){return t<0&&(t+=e.length),null==n?e[t]:(n<0&&(n+=e.length),e.slice(t,n-t+1))},e.arrayLast=G,e.arrayRemove=D,e.arrayRemoveBySortedIndexes=function(e,t){for(var n=t.length-1;n>=0;n--){var r=t[n];e.splice(r,1)}},e.arraySibling=function(e,t,n){var r=e.indexOf(t);if(-1===r)throw"item is not in array";return S(n)?n.map((function(t){return e[r+t]})):e[r+n]},e.arrayWithoutEnd=function(e,t){return e.slice(0,e.length-t)},e.assignIfDifferent=function(e,t,n){e[t]!==n&&(e[t]=n)},e.attachCache=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new we,r=function(r){var o=t[r];Object.defineProperty(e,r,{get:function(){var e=this;return n.remember(r,(function(){return o.call(e)}))}})};for(var o in t)r(o)},e.backupAttr=oe,e.binarySearch=he,e.camelCase=R,e.camelToWords=B,e.cloneObj=function e(t,r){switch(n(t)){case"undefined":case"boolean":case"nuber":case"string":case"function":return t;case"object":if(null===t)return t;var o;if(S(t)){o=[];var i=!0,a=!1,c=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var s=u.value;o.push(e(s,r))}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}}else{o={};for(var f=0,h=Object.keys(t);f<h.length;f++){var d=h[f];r&&(!S(r)||r.includes(d))&&r(d,t[d],t)||(o[d]=e(t[d],r))}}return o;default:return t}},e.copyTextToClipboard=function(e){try{return void navigator.clipboard.writeText(e)}catch(e){}var t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="2em",t.style.height="2em",t.style.padding=0,t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Copying text command was "+n)}catch(e){console.log("Oops, unable to copy")}document.body.removeChild(t)},e.createElementFromHTML=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.childNodes.length>1?t.childNodes:t.childNodes[0]},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.immediate?Q(e,t):$(e,t)},e.debounceImmediate=Q,e.debounceTrailing=$,e.depthFirstSearch=J,e.elementsFromPoint=function(){for(var e=document.elementsFromPoint||document.msElementsFromPoint||o,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(document,n);function o(e,t){var n=[],r=void 0;do{r!==document.elementFromPoint(e,t)?(r=document.elementFromPoint(e,t),n.push(r),r.style.pointerEvents="none"):r=!1}while(r);return n.forEach((function(e){return e.style.pointerEvents="all"})),n}},e.empty=function(e){return null==e||(null!=e.length?0===e.length:!E(e)&&(P(e)?isNaN(e):A(e)?0===Object.keys(e).length:void 0))},e.executeOnceInScopeByName=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:scope_executeOnceInScopeByName,r=arguments.length>3?arguments[3]:void 0;if(e="executeOnceInScopeByName_".concat(e),!n[e]){var o=t(),i=function(){delete n[e]};n[e]={destroy:i},r&&(n[e].value=o)}return n[e]},e.executePromiseGetters=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=new Promise((function(r,o){var i=[],a=U(e,n),c=Promise.resolve();a.forEach((function(e){c=c.then((function(n){if(n&&i.push.apply(i,m(n)),!t)return Promise.all(e.map((function(e){return e()})));o("stopped")}))})),c.then((function(e){i.push.apply(i,m(e)),r(i)}))}));return{promise:r,destroy:function(){t=!0}}},e.executeWithCount=function(e){var t=0;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.call.apply(e,[this,t++].concat(r))}},e.findNodeList=fe,e.findNodeListReverse=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.reverse=!0,fe(e,t,n)},e.findParent=re,e.forAll=function(e,t,n){if(n){if(S(e)||N(e)||e.hasOwnProperty("length"))for(var r=e.length-1;r>=0&&!1!==t(e[r],r);r--);else if(A(e)){var o=Object.keys(e);o.reverse();for(var i=0,a=o;i<a.length;i++){var c=a[i];if(!1===t(e[c],c))break}}else if(Number.isInteger(e))for(var u=e-1;u>=0&&!1!==t(u,u);u--);}else if(S(e)||N(e)||e.hasOwnProperty("length"))for(var l=0;l<e.length&&!1!==t(e[l],l);l++);else if(A(e))for(var s=0,f=Object.keys(e);s<f.length;s++){var h=f[s];if(!1===t(e[h],h))break}else if(Number.isInteger(e))for(var d=0;d<e&&!1!==t(d,d);d++);},e.getBorder=function(e){var t=document.body,n=re(e,(function(e){return ae(e,"work-area")})),r=X(n);return{left:r.x,right:r.x+n.offsetWidth,top:r.y+50,bottom:t.offsetHeight<O().innerHeight?O().innerHeight:t.offsetHeight}},e.getBoundingClientRect=te,e.getCss3Prefix=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.noCache||null==k.css3Prefix)&&(k.css3Prefix=t()),k.css3Prefix;function t(){var e=document.createElement("div");e.style.cssText="-webkit-transition:all .1s; -moz-transition:all .1s; -o-transition:all .1s; -ms-transition:all .1s; transition:all .1s;";var t=e.style;return t.webkitTransition?"-webkit-":t.MozTransition?"-moz-":t.oTransition?"-o-":t.msTransition?"-ms-":""}},e.getElSize=ce,e.getElSizeEvenInvisible=ue,e.getImageSizeByUrl=function(e){var t=document.createElement("img");return new Promise((function(n,r){le(t,"load",(function(){n({width:t.width,height:t.height})})),le(t,"error",(function(e){r(e)})),t.src=e}))},e.getLocalStorage2=function(){return k.localStorage2||(k.localStorage2=ye(O().localStorage)),k.localStorage2},e.getOffset=X,e.getOffsetParent=ee,e.getOuterAttachedHeight=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=w({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-top","margin-bottom"),t.border&&o.push("border-top-width","border-bottom-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getOuterAttachedWidth=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=w({margin:!0,border:!0},t);var n=getComputedStyle(e),r=0,o=[];return t.margin&&o.push("margin-left","margin-right"),t.border&&o.push("border-left-width","border-right-width"),o.forEach((function(e){r+=parseFloat(n[e])})),r},e.getPosition=function(e){for(var t=ee(e),n={x:e.offsetLeft,y:e.offsetTop},r=e;(r=r.parentElement)!==t&&r;)n.x-=r.scrollLeft,n.y-=r.scrollTop;return n},e.getPositionFromOffset=function(e,t){var n=X(ee(e));return{x:t.x-n.x,y:t.y-n.y}},e.getScroll=Z,e.getSessionStorage2=function(){return k.sessionStorage2||(k.sessionStorage2=ye(O().sessionStorage)),k.sessionStorage2},e.getUrlParam=function(e){var t=document.location.href,n=t.indexOf(e+"=");if(-1==n)return!1;var r=t.slice(e.length+n+1),o=r.indexOf("&");return-1!=o&&(r=r.slice(0,o)),r},e.getUserLanguage=function(){return navigator.language||navigator.userLanguage},e.getViewportPosition=ne,e.glb=O,e.groupArray=function(e,t){var n=new Map;e.forEach((function(e){var r=t(e);n.has(r)||n.set(r,[]),n.get(r).push(e)}));var r=[];return n.forEach((function(e,t){r.push([t,e])})),r},e.hasClass=ae,e.insertAfter=function(e,t){t.parentElement.insertBefore(e,t.nextSibling)},e.insertBefore=function(e,t){t.parentElement.insertBefore(e,t)},e.isArray=S,e.isBool=E,e.isDescendantOf=function(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}},e.isFunction=T,e.isNumber=P,e.isNumeric=L,e.isObject=A,e.isOffsetInEl=function(e,t,n){var r=X(n);return r.x<=e&&r.x+n.offsetWidth>=e&&r.y<=t&&r.y+n.offsetHeight>=t},e.isPromise=function(e){return"[object Promise]"===Object.prototype.toString.call(e)},e.isString=N,e.isset=j,e.iterateALL=K,e.iterateAll=W,e.joinFunctionsByNext=function(e){var t=function(){},n=!0,r=!1,o=void 0;try{for(var i,a=W(e,{reverse:!0})[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){t=c(i.value.value,t)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return t;function c(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.apply(void 0,[t].concat(r))}}},e.joinFunctionsByResult=function(e){for(var t=e[0],n=1;n<e.length;n++)t=r(t,e[n]);return t;function r(e,t){return function(n){args;var r=e(n);return t(r)}}},e.joinMethods=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=!0,o=!1,i=void 0;try{for(var a,c=function(){var e=a.value,r=t;t=r?function(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return e.call.apply(e,[this,"value"===n?r.call.apply(r,[this].concat(o)):r].concat(o))}:e},u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)c()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return t},e.jqFixedSize=function(e){var t=O().jQuery;t(e).each((function(){var e=t(this);e.css({width:e.width()+"px",height:e.height()+"px"})}))},e.jqMakeCarousel=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:16,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"left",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;o.toString().match(/^\d+$/)&&(o+="px");var c=parseFloat(o),u=O().jQuery,l=u(e),s=l.find(t);l.css({position:"relative",height:l.height()+"px"});var f=s.find(n);f.css({margin:"0",marginRight:o});var h=(Math.ceil(f.width())+c)*f.length;s.css({position:"absolute",margin:"0",width:h+"px"});var d=s.height(),v=s.clone(),p=s.clone();s.css({left:0}),v.css({left:h+"px"}),p.css({left:2*h+"px"});var y=u("<div></div>");y.css({position:"absolute",width:3*h+"px",height:d+"px",left:0,top:a}),y.append(s).append(v).append(p),l.append(y);var g=0;function m(){"left"===i?g-=100:g+=100,y.animate({left:"".concat(g,"px")},r,"linear",(function(){Math.abs(g)>h&&("left"===i?g+=h:g-=h,y.css({left:g+"px"})),m()}))}m()},e.kebabCase=F,e.makeStorageHelper=ye,e.mapObjectTree=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,o=0,i=[{value:e}],a=function(){if(o>=r)throw"mapObjectTree: limit(".concat(r,") reached, object may has circular reference");o++;var e=i.shift(),a=e.value,c=e.key,u=e.parent,l=e.newParent,s=t(a,c,u,l),f=function(e,t,r){return S(e)?e=[]:A(e)&&(e={}),u?S(l)&&r?l.push(e):l[t]=e:n=e,e},h=void 0,d=void 0,v=void 0,p=void 0,y=void 0;if(s){var g=s.key,m=s.value;d=m,s.delete||!1===g?v=!0:null==g?h=f(m,c,!0):s.hasOwnProperty("value")&&(h=f(m,g)),p=s.stop,y=s.skip}else d=a,h=f(a,c);if(v)return"continue";if(y)return"continue";if(p)return"break";if(S(d))for(var b=d.length,w=0;w<b;w++)i.push({value:d[w],key:w,parent:d,newParent:h});else A(d)&&Object.keys(d).forEach((function(e){i.push({value:d[e],key:e,parent:d,newParent:h})}))};e:for(;i.length>0;){var c=a();switch(c){case"continue":continue;case"break":break e}}return n},e.mapObjects=q,e.max=C,e.min=function(e,t){return e<t?t:e},e.newArrayRemoveAt=function(e,t){t=H(t);var n={},r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){n[a.value]=!0}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}for(var u=[],l=e.length,s=0;s<l;s++)n[s]||u.push(e[s]);return u},e.numPad=function(e,t){for(var n=e.toString().length;n<t;)e="0"+e,n++;return e},e.numRand=_,e.objectExcept=function(e,t){var n={};for(var r in e)-1===t.indexOf(r)&&(n[r]=e[r]);return n},e.objectGet=z,e.objectMap=function(e,t){var n={};for(var r in e)n[r]=t(e[r],r,e);return n},e.objectMerge=function(e,t){for(var n in t)e.hasOwnProperty(n)&&A(e[n])&&A(t[n])?Object.assign(e[n],t[n]):e[n]=t[n];return e},e.objectOnly=function(e,t){var n={};for(var r in e)t.indexOf(r)>-1&&(n[r]=e[r]);return n},e.objectSet=function(e,t,n){var r=S(t)?t:t.split("."),o=G(r),i=z(e,r.slice(0,r.length-1));if(!i)throw"Path does not exist";i[o]=n},e.offDOM=se,e.offsetToViewportPosition=function(e){var t=document.body,n=X(t),r=ne(t);return{x:e.x+r.x-n.x,y:e.y+r.y-n.y}},e.onDOM=le,e.onDOMMany=function(e,t,n){e=H(e),t=H(t);for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];var a=!0,c=!1,u=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done);a=!0){var f=l.value,h=!0,d=!1,v=void 0;try{for(var p,y=t[Symbol.iterator]();!(h=(p=y.next()).done);h=!0){var g=p.value;le.apply(void 0,[f,g,n].concat(o))}}catch(e){d=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(d)throw v}}}}catch(e){c=!0,u=e}finally{try{a||null==s.return||s.return()}finally{if(c)throw u}}var m=function(){var r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){var u=a.value,l=!0,s=!1,f=void 0;try{for(var h,d=t[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){se(u,h.value,n)}}catch(e){s=!0,f=e}finally{try{l||null==d.return||d.return()}finally{if(s)throw f}}}}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}};return m},e.onQuickKeydown=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=w({timeout:1e3},t);var n,r="",o=function(o){o.key&&1===o.key.length&&(r="".concat(r).concat(o.key),e(r),n&&(clearTimeout(n),n=null),setTimeout((function(){r=""}),t.timeout))};return le(document,"keydown",o),function(){se(document,"keydown",o)}},e.openCenterWindow=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i={width:n,height:r,top:(O().screen.availHeight-30-r)/2,left:(O().screen.availWidth-30-n)/2};Object.assign(i,o),ve(e,t,i)},e.openWindow=ve,e.pairRows=function(e,t,n,r){r||(r=n);var o=q(t,r);return e.map((function(e){return[e,o[e[n]]]}))},e.prependTo=function(e,t){t.insertBefore(e,t.firstChild)},e.promiseTimeout=function(e,t){return new Promise((function(n,r){var o,i;e.then((function(){clearTimeout(o),n.apply(void 0,arguments)}),(function(){i||(clearTimeout(o),r.apply(void 0,arguments))})),o=setTimeout((function(){i=!0;var e=new Error("Promise timeout!");e.name="timeout",r(e)}),t)}))},e.removeClass=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},e.removeEl=function(e){if(null!==e.parentNode)return e.parentNode.removeChild(e)},e.replaceMultiple=function(e,t){var n=new RegExp(Object.keys(e).join("|"),"g");return t.replace(n,(function(t){return e[t]}))},e.resolveArgsByType=function(e,t){var n=0;return t.map((function(t){var r,o;if(S(t)?(r=t[0],o=t[1]):(r=t,o=void 0),!T(r))if(null==r)r=function(){return!0};else{var i=r;r=function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}}var a=e[n];return r(a)?(n++,a):o}))},e.resolveValueOrGettter=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return T(e)?e.apply(void 0,m(t)):e},e.restoreAttr=ie,e.retry=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;k.retry||(k.retry={});var r=e,o=a();return r[o]=0,i;function i(e,a,c){return t(e,a,c).then((function(e){return delete r[o],e})).catch((function(t){return r[o]++,r[o]>=n?(delete r[o],Promise.reject(t)):i(e,a,c)}))}function a(){var e=Math.random()+"";return r[e]?a():e}},e.setElChildByIndex=function(e,t,n){n.childComponentIndex=t;var r=e.childNodes.length;if(0===r)e.appendChild(n);else if(0===t)e.insertBefore(n,e.childNodes[0]);else{var o=he(e.childNodes,(function(e){return e.childComponentIndex-t}),0,C(t,r-1),!0),i=o.index,a=o.value;if(o.bigger)e.insertBefore(n,a);else{var c=e.childNodes[i+1];c?e.insertBefore(n,c):e.appendChild(n)}}},e.snakeCase=function(e){return F(e).replace(/-/g,"_")},e.splitArray=U,e.store=k,e.store_executeOnceInScopeByName={},e.strRand=M,e.studlyCase=I,e.titleCase=function(e){return B(I(R(e))).join(" ").replace(/\bid\b/gi,"ID")},e.toArrayIfNot=H,e.uniqueId=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id_",n=t+M();k.uniqueId||(k.uniqueId={});var r=k.uniqueId;return document.getElementById(n)||r[n]?e(t):(r[n]=!0,n)},e.unset=function(e,t){e[t]=void 0;try{delete e[t]}catch(e){}},e.viewportPositionToOffset=function(e){var t=document.body,n=X(t),r=ne(t);return{x:e.x+n.x-r.x,y:e.y+n.y-r.y}},e.waitFor=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;T(e)&&(r=n,n=L(t)?t:100,t=e,e=null),k.waitFor||(k.waitFor={});var o=k.waitFor;return e&&j(o[e])&&(O().clearInterval(o[e]),delete o[e]),new Promise((function(i,a){var c=0;function u(n){c<=r?t()&&(l(n,e),i()):(l(n,e),a(new Error("waitFor: Limit is reached"))),c++}function l(e,t){e&&(t&&j(o[t])?(O().clearInterval(o[t]),delete o[t]):O().clearInterval(e))}var s=O().setInterval((function(){u(s)}),n);e&&(o[e]=s),u()}))},e.waitTime=de,e.walkTreeData=V,e.watchChange=function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=e.apply(void 0,o);n!==a&&t.apply(void 0,[a].concat(o)),n=a}},e.windowLoaded=function(){return new Promise((function(e,t){document&&"complete"===document.readyState?e():O().addEventListener("load",(function t(){e(),O().removeEventListener("load",t)}))}))},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "helper-js",
"version": "1.4.25",
"version": "1.4.26",
"description": "",

@@ -12,3 +12,3 @@ "main": "dist/helper-js.cjs.js",

"build": "node scripts/build.js",
"dev": "rollup -w -c scripts/config.js --environment TARGET:umd",
"dev": "rollup -w -c scripts/config.js --environment TARGET:cjs",
"build:esm": "rollup -c scripts/config.js --environment TARGET:esm",

@@ -15,0 +15,0 @@ "dev:esm": "rollup -w -c scripts/config.js --environment TARGET:esm"

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc