/*! For license information please see 2.39341471.chunk.js.LICENSE.txt */ (this.webpackJsonpportal=this.webpackJsonpportal||[]).push([[2],[function(t,e,n){"use strict";var i=n(2).isPlainObject;e.extend=function t(e){var n=1,o=!1;for("boolean"===typeof(e=e||{})&&(o=e,e=arguments[1]||{},n++);no?a=r.when.apply(this,p.slice(o)):n&&n.resolve()),d=i,n&&a&&a.done&&a.done(n.resolve).fail(n.reject),!d&&h.length&&("render"===f.shift()?g:_)(h.shift(),p.shift()),a||(0,r.when)()},g=function(t,e){return m("render",t,e)},_=function(t,e){return m("update",t,e)},v=function(t,e){if(Array.isArray(t)&&Array.isArray(e)){var n=!1;return(0,s.each)(t,(function(t,i){if(i!==e[t])return n=!0,!1})),!n}return t===e},y=function(t){switch(c(t)){case"string":return t.split(/\s+/,2);case"object":return[t.x||t.h,t.y||t.v];case"number":return[t];default:return t}},b=function(t,e,n){if(t.length!==e.length)return!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t=(0,a.toComparable)(t,!0),e=(0,a.toComparable)(e,!0);var o=i?t===e:t==e;return!!(o||n>=3)||((0,l.isObject)(t)&&(0,l.isObject)(e)?w(t,e,n,i):!(!Array.isArray(t)||!Array.isArray(e))&&b(t,e,n))};e.ensureDefined=function(t,e){return(0,l.isDefined)(t)?t:e},e.executeAsync=function(t,e){var n=new r.Deferred,i=e||this,o={promise:n.promise(),abort:function(){clearTimeout(s),n.rejectWith(i)}},a=function(){var e=t.call(i);e&&e.done&&(0,l.isFunction)(e.done)?e.done((function(){n.resolveWith(i)})):n.resolveWith(i)},s=(arguments[2]||setTimeout)(a,"number"===typeof e?e:0);return o},e.deferRender=g,e.deferRenderer=function(t){return function(){var e=this;return m("render",(function(){return t.call(e)}))}},e.deferUpdate=_,e.deferUpdater=function(t){return function(){var e=this;return m("update",(function(){return t.call(e)}))}},e.pairToObject=function(t,e){var n=y(t),i=e?parseFloat(n&&n[0]):parseInt(n&&n[0],10),o=e?parseFloat(n&&n[1]):parseInt(n&&n[1],10);return isFinite(i)||(i=0),isFinite(o)||(o=i),{h:i,v:o}},e.splitPair=y,e.findBestMatches=function(t,e,n){var i=[],o=0;return(0,s.each)(e,(function(e,r){var a=0,l=n?n(r):r;(0,s.each)(t,(function(t,e){var n=l[t];if(void 0!==n){if(!v(n,e))return a=-1,!1;a++}})),ao&&(i.length=0,o=a),i.push(r))})),i},e.normalizeKey=function(t){var e=(0,l.isString)(t)?t:t.toString(),n=e.match(/[^a-zA-Z0-9_]/g);return n&&(0,s.each)(n,(function(t,n){e=e.replace(n,"__"+n.charCodeAt()+"__")})),e},e.denormalizeKey=function(t){var e=t.match(/__\d+__/g);return e&&e.forEach((function(e){var n=parseInt(e.replace("__",""));t=t.replace(e,String.fromCharCode(n))})),t},e.getKeyHash=function(t){if(t instanceof o.default)return t.toString();if((0,l.isObject)(t)||Array.isArray(t))try{var e=JSON.stringify(t);return"{}"===e?t:e}catch(n){return t}return t},e.escapeRegExp=function(t){return t.replace(/[[\]{}\-()*+?.\\^$|\s]/g,"\\$&")},e.applyServerDecimalSeparator=function(t){var e=(0,i.default)().serverDecimalSeparator;return(0,l.isDefined)(t)&&(t=t.toString().replace(".",e)),t},e.noop=function(){},e.asyncNoop=function(){return(new r.Deferred).resolve().promise()},e.grep=function(t,e,n){for(var i=[],o=!n,r=0;r=0&&!1!==e.call(t[n],n,t[n]);n--);}},function(t,e,n){"use strict";var i=p(n(354)),o=n(0),r=p(n(15)),a=p(n(10)),s=p(n(89)),l=p(n(2)),u=p(n(39)),c=p(n(38)),d=p(n(253)),h=p(n(618)),f=p(n(113));function p(t){return t&&t.__esModule?t:{default:t}}function m(t){return(m="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var g=a.default.getWindow(),_=l.default.isWindow,v=l.default.isFunction,y=l.default.isString,b={mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},w={focusin:"focus",focusout:"blur"},x=["blur","focus","load"],C=["touchmove","wheel","mousewheel","touchstart"];function S(t,e){return!_(t)&&"#document"!==t.nodeName&&r.default.elementMatches(t,e)}var k,I,T=new d.default,E=0,O=function(){var t={};return i.default.add((function(e,n){t[e]=n})),{getField:function(e,n){return t[e]&&t[e][n]},callMethod:function(e,n,i,o){return t[e]&&t[e][n]&&t[e][n].apply(i,o)}}}(),M=(0,s.default)({on:D(N(F((function(t,e,n,i,o){R(t,e).addHandler(o,n,i)})))),one:D(N((function(t,e,n,i,o){M.on(t,e,n,i,(function i(){M.off(t,e,n,i),o.apply(this,arguments)}))}))),off:D((I=F((function(t,e,n,i){R(t,e).removeHandler(i,n)})),function(t,e,n,i){"function"===typeof n&&(i=n,n=void 0),I(t,e,n,i)})),trigger:D(L((function(t,e,n){var i=e.type,r=R(t,e.type);if(O.callMethod(i,"trigger",t,[e,n]),r.callHandlers(e,n),!(O.getField(i,"noBubble")||e.isPropagationStopped()||-1!==x.indexOf(i))){var a=[];!function t(e){var n=e.parentNode;n&&(a.push(n),t(n))}(t),a.push(g);for(var s=0;a[s]&&!e.isPropagationStopped();){R(a[s],e.type).callHandlers((0,o.extend)(e,{currentTarget:a[s]}),n),s++}}(t.nodeType||_(t))&&(O.callMethod(i,"_default",t,[e,n]),function(t,e){var n=w[t]||t;if(function(t,e){return"click"===t&&"a"===e.localName}(t,e))return;v(e[n])&&(k=t,e[n](),k=void 0)}(i,t))}))),triggerHandler:D(L((function(t,e,n){R(t,e.type).callHandlers(e,n)})))});function P(t,e){var n=t[0];if(n)if(r.default.isNode(n)||_(n))e.apply(M,t);else{if(y(n)||!("length"in n))throw c.default.Error("E0025");var i=Array.prototype.slice.call(t,0);Array.prototype.forEach.call(n,(function(t){i[0]=t,P(i,e)}))}}function D(t){return function(){P(arguments,t)}}var A=(0,f.default)((function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t=!0,!0}});g.addEventListener("test",null,e)}catch(n){}return t}));function R(t,e){var n=T.get(t),i=(e=e||"").split("."),o=i.slice(1),a=!!i[0];e=i[0]||"dxEmptyEventType",n||(n={},T.set(t,n)),n[e]||(n[e]={handleObjects:[],nativeHandler:null});var s=n[e];return{addHandler:function(n,i,l){var u=function(i,o){var r,a,s=[i],u=i.currentTarget,c=i.relatedTarget;e in b&&(r=c&&u&&(c===u||function t(e,n){return _(e)?t(e.document,n):e.contains?e.contains(n):!!(n.compareDocumentPosition(e)&n.DOCUMENT_POSITION_CONTAINS)}(u,c))),void 0!==o&&s.push(o),O.callMethod(e,"handle",t,[i,l]),r||(a=n.apply(u,s)),!1===a&&(i.preventDefault(),i.stopPropagation())},c={handler:n,wrappedHandler:function(e,n){if(!k||e.type!==k)if(e.data=l,e.delegateTarget=t,i)for(var o=e.target;o&&o!==t;)S(o,i)&&(e.currentTarget=o,u(e,n)),o=o.parentNode;else e.currentTarget=e.delegateTarget||e.target,u(e,n)},selector:i,type:e,data:l,namespace:o.join("."),namespaces:o,guid:++E};s.handleObjects.push(c);var d,h,f=1===s.handleObjects.length&&a;f&&(f=!O.callMethod(e,"setup",t,[l,o,n])),f&&(s.nativeHandler=(h=e,function(t,e){var n=R(this,h);t=M.Event(t),n.callHandlers(t,e)}),A()&&C.indexOf(e)>-1&&(d={passive:!1}),s.removeListener=r.default.listen(t,b[e]||e,s.nativeHandler,d)),O.callMethod(e,"add",t,[c])},removeHandler:function(i,r){var s=function(e){var a,s=n[e];s.handleObjects.length?(s.handleObjects=s.handleObjects.filter((function(n){var s=o.length&&!B(n.namespaces,o)||i&&n.handler!==i||r&&n.selector!==r;return s||(a=n.handler,O.callMethod(e,"remove",t,[n])),s})),!s.handleObjects.length&&"dxEmptyEventType"!==e&&(O.callMethod(e,"teardown",t,[o,a]),s.nativeHandler&&s.removeListener(),delete n[e])):delete n[e]};if(a)s(e);else for(var l in n)s(l);0===Object.keys(n).length&&T.delete(t)},callHandlers:function(t,e){var i=!1,r=function(n){i||o.length&&!B(n.namespaces,o)||(n.wrappedHandler(t,e),i=t.isImmediatePropagationStopped())};s.handleObjects.forEach(r),o.length&&n.dxEmptyEventType&&n.dxEmptyEventType.handleObjects.forEach(r)}}}function B(t,e){for(var n=0;n-1){var i=Array.prototype.slice.call(arguments,0);n.split(" ").forEach((function(e){i[1]=e,t.apply(this,i)}))}else t.apply(this,arguments)};return function(t,n){if("object"===m(n)){var i=Array.prototype.slice.call(arguments,0);for(var o in n)i[1]=o,i[i.length-1]=n[o],e.apply(this,i)}else e.apply(this,arguments)}}function V(t){if(function(t){return null==t.which&&0===t.type.indexOf("key")}(t))return null!=t.charCode?t.charCode:t.keyCode;if(function(t){return!t.which&&void 0!==t.button&&/^(?:mouse|pointer|contextmenu|drag|drop)|click/.test(t.type)}(t)){return{1:1,2:3,3:1,4:2}[t.button]}return t.which}function z(t){t&&(M.Event=t,M.Event.prototype=t.prototype)}function j(t,e,n){Object.defineProperty(n||M.Event.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.originalEvent&&e(this.originalEvent)},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})}z(function(t){return function(e,n){if(!(this instanceof M.Event))return new M.Event(e,n);e||(e={}),"string"===typeof e&&(e={type:e}),n||(n={}),t.call(this,e,n)}}((function(t,e){var n=this,i=!1,r=!1,s=!1;(0,o.extend)(n,t),(t instanceof M.Event||a.default.hasWindow()&&t instanceof g.Event)&&(n.originalEvent=t,n.currentTarget=void 0),t instanceof M.Event||(0,o.extend)(n,{isPropagationStopped:function(){return!!(i||n.originalEvent&&n.originalEvent.propagationStopped)},stopPropagation:function(){i=!0,n.originalEvent&&n.originalEvent.stopPropagation()},isImmediatePropagationStopped:function(){return r},stopImmediatePropagation:function(){this.stopPropagation(),r=!0,n.originalEvent&&n.originalEvent.stopImmediatePropagation()},isDefaultPrevented:function(){return!!(s||n.originalEvent&&n.originalEvent.defaultPrevented)},preventDefault:function(){s=!0,n.originalEvent&&n.originalEvent.preventDefault()}}),j("which",V,n),0===t.type.indexOf("touch")&&(delete e.pageX,delete e.pageY),(0,o.extend)(n,e),n.guid=++E}))),(0,h.default)(j);var H=(0,u.default)(),W=(0,u.default)();M.set=function(t){H.fire(),M.inject(t),z(t.Event),W.fire()},M.subscribeGlobal=function(){P(arguments,N((function(){var t=arguments;M.on.apply(this,t),H.add((function(){var e=Array.prototype.slice.call(t,0);e.splice(3,1),M.off.apply(this,e)})),W.add((function(){M.on.apply(this,t)}))})))},M.forcePassiveFalseEventNames=C,M.passiveEventHandlersSupported=A,t.exports=M},function(t,e,n){"use strict";var i=n(2),o=i.isPromise,r=i.isDeferred,a=n(0).extend,s=n(39),l=[{method:"resolve",handler:"done",state:"resolved"},{method:"reject",handler:"fail",state:"rejected"},{method:"notify",handler:"progress"}],u=function(){var t=this;this._state="pending",this._promise={},l.forEach(function(e){var n=e.method;this[n+"Callbacks"]=new s,this[n]=function(){return this[n+"With"](this._promise,arguments)}.bind(this),this._promise[e.handler]=function(e){if(!e)return this;var i=t[n+"Callbacks"];return i.fired()?e.apply(t[n+"Context"],t[n+"Args"]):i.add(function(t,n){e.apply(t,n)}.bind(this)),this}}.bind(this)),this._promise.always=function(t){return this.done(t).fail(t)},this._promise.catch=function(t){return this.then(null,t)},this._promise.then=function(t,e){var n=new u;return["done","fail"].forEach(function(a){var s="done"===a?t:e;this[a]((function(){if(s){var t=s&&s.apply(this,arguments);r(t)?t.done(n.resolve).fail(n.reject):o(t)?t.then(n.resolve,n.reject):n.resolve.apply(this,i.isDefined(t)?[t]:arguments)}else n["done"===a?"resolve":"reject"].apply(this,arguments)}))}.bind(this)),n.promise()},this._promise.state=function(){return t._state},this._promise.promise=function(e){return e?a(e,t._promise):t._promise},this._promise.promise(this)};l.forEach((function(t){var e=t.method,n=t.state;u.prototype[e+"With"]=function(t,i){var o=this[e+"Callbacks"];return"pending"===this.state()&&(this[e+"Args"]=i,this[e+"Context"]=t,n&&(this._state=n),o.fire(t,i)),this}})),e.fromPromise=function(t,e){if(r(t))return t;if(o(t)){var n=new u;return t.then((function(){n.resolveWith.apply(n,[e].concat([[].slice.call(arguments)]))}),(function(){n.rejectWith.apply(n,[e].concat([[].slice.call(arguments)]))})),n}return(new u).resolveWith(e,[t])};var c=function(){if(1===arguments.length)return e.fromPromise(arguments[0]);for(var t=[].slice.call(arguments),n=[],i=0,o=new u,a=function(e){return function(r){n[e]=this,t[e]=arguments.length>1?[].slice.call(arguments):r,++i===t.length&&o.resolveWith(n,t)}},s=0;s1:w(t)?o&&(0,u.focused)(n):void 0)},e.setEventFixMethod=function(t){return p=t},e.createEvent=function(t,e){var n=function(t){return p((0,r.Event)(t,t),t)}(t);return e&&(0,l.extend)(n,e),n});e.fireEvent=function(t){var e=t.originalEvent,n=t.delegateTarget,i=C(e,t);return a.default.trigger(n||i.target,i),i},e.normalizeKeyName=function(t){var e=t.key,n=t.which,i=!!e;if(e=i?e:n)return e=i?d[e.toLowerCase()]||e:h[e]||String.fromCharCode(e)},e.getChar=function(t){var e=t.key,n=t.which;return e||String.fromCharCode(n)},e.addNamespace=o.default},function(t,e,n){"use strict";var i=d(n(3)),o=d(n(89)),r=n(0),a=n(5),s=n(55),l=n(46),u=d(n(193)),c=d(n(641));function d(t){return t&&t.__esModule?t:{default:t}}var h=(0,r.extend)(!0,{},c.default),f={},p=(0,o.default)({engine:function(){return"base"},_dictionary:h,load:function(t){(0,r.extend)(!0,this._dictionary,t)},_localizablePrefix:"@",setup:function(t){this._localizablePrefix=t},localizeString:function(t){var e=this,n=new RegExp("(^|[^a-zA-Z_0-9"+e._localizablePrefix+"-]+)("+e._localizablePrefix+"{1,2})([a-zA-Z_0-9-]+)","g"),i=e._localizablePrefix+e._localizablePrefix;return t.replace(n,(function(t,n,o,r){var a,s=e._localizablePrefix+r;return o!==i&&(a=e.format(r)),a||(f[r]=(0,l.humanize)(r)),n+(a||s)}))},localizeNode:function(t){var e=this;(0,i.default)(t).each((function(t,n){n.nodeType&&(3===n.nodeType?n.nodeValue=e.localizeString(n.nodeValue):(0,i.default)(n).is("iframe")||((0,a.each)(n.attributes||[],(function(t,n){if("string"===typeof n.value){var i=e.localizeString(n.value);n.value!==i&&(n.value=i)}})),(0,i.default)(n).contents().each((function(t,n){e.localizeNode(n)}))))}))},getMessagesByLocales:function(){return this._dictionary},getDictionary:function(t){return t?f:(0,r.extend)({},f,this.getMessagesByLocales()[u.default.locale()])},getFormatter:function(t){return this._getFormatterBase(t)||this._getFormatterBase(t,"en")},_getFormatterBase:function(t,e){var n=this,i=u.default.getValueByClosestLocale((function(e){return function(t,e){return t[e]||{}}(n._dictionary,e)[t]}));if(i)return function(){var t=1===arguments.length&&Array.isArray(arguments[0])?arguments[0].slice(0):Array.prototype.slice.call(arguments,0);return t.unshift(i),s.format.apply(this,t)}},format:function(t){var e=this.getFormatter(t),n=Array.prototype.slice.call(arguments,1);return e&&e.apply(this,n)||""}});t.exports=p},function(t,e,n){"use strict";var i=n(4),o=n(2),r=n(0),a=n(5),s=n(37),l=n(26),u=d(n(15)),c=d(n(117));function d(t){return t&&t.__esModule?t:{default:t}}var h=Math.PI,f=Math.LN10,p=Math.abs,m=Math.log,g=Math.floor,_=Math.ceil,v=Math.pow,y=Math.sqrt,b=Math.atan2,w=Math.min,x=Math.max,C=Math.cos,S=Math.sin,k=Math.round,I=h/180,T=isNaN,E=Number,O=function(t,e){return t?m(t)/m(e):NaN},M=function(t,e){return v(e,t)},P=function(t){return(t%360+360)%360},D=function(t){return h*t/180},A=function(t){var e=D(t);return{cos:C(e),sin:S(e)}},R=function(t,e,n,i){var o=n-t,r=i-e;return y(r*r+o*o)},B=function(t){var e,n=p(t);return T(n)?NaN:n>0?(n=m(n)/f,(e=_(n))-n<1e-14?e:g(n)):0};function N(t,e){for(var n,i=0,o=t.length,r=[];i2&&void 0!==arguments[2]?arguments[2]:1;return new Date(t.getTime()+n*e)}:"logarithmic"===t.axisType?function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=U(e,t.base)+i*n;return G(o,t.base)}:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=t+i*n;return e&&o*t<=0?0:o}}function U(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;if(!n)return O(t,e);if(0===t)return 0;var o=O(p(t),e)-(i-1);return o<0?0:(0,s.adjust)((0,s.sign)(t)*o,Number(v(e,i-1).toFixed(p(i))))}function G(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;if(!n)return M(t,e);if(0===t)return 0;var o=M(p(t)+(i-1),e);return o<0?0:(0,s.adjust)((0,s.sign)(t)*o,Number(v(e,i).toFixed(p(i))))}function K(t){return t&&t.valueOf()}(0,r.extend)(e,{decreaseGaps:function(t,e,n){var i;do{(i=L(t,e)).push(_(n/i.length)),n=F(t,e,w.apply(null,i),n)}while(n>0&&i.length>1);return n},normalizeEnum:V,parseScalar:function(t,e){return void 0!==t?t:e},enumParser:function(t){var e,n,i={};for(e=0,n=t.length;e0?i:0;n=(0,o.isDefined)(n)?n+e-90:0;var a=A(n);return{x:k(t.x+r*a.cos),y:k(t.y+r*a.sin)}},convertXYToPolar:function(t,e,n){var i=R(t.x,t.y,e,n),o=b(n-t.y,e-t.x);return{phi:k(P(180*o/h)),r:k(i)}},processSeriesTemplate:function(t,e){var n,a,s,l=(0,o.isFunction)(t.customizeSeries)?t.customizeSeries:i.noop,u=t.nameField,c={},d=[],h=0;for(a=(e=e||[]).length;h-1||(0,o.isNumeric)(e)&&e>1)&&(i=k(i),n=1),!n&&i&&((0,o.isString)(e)&&e.indexOf("%")>-1?i/=100:i<0&&(i=i<-1?1:p(i))),t.height=i,t.unit=n}));var e=t.filter((function(t){return!t.unit})).reduce((function(t,e){return t+(e.height||0)}),0),n=t.filter((function(t){return!t.unit})).length,i=t.filter((function(t){return!t.unit&&!t.height})).length;if(e<1&&i)t.filter((function(t){return!t.unit&&!t.height})).forEach((function(t){return t.height=(1-e)/i}));else if(e>1||e<1&&!i||1===e&&i){if(i){var r=e/n,a=i*r;t.filter((function(t){return!t.unit&&t.height})).forEach((function(t){return t.height*=(e-a)/e})),t.filter((function(t){return!t.unit&&!t.height})).forEach((function(t){return t.height=r}))}t.forEach((function(t){return!t.unit&&(t.height*=1/e)}))}},updatePanesCanvases:function(t,e,n){var i=0,o=n?e.width-e.left-e.right:e.height-e.top-e.bottom,a=o-10*(t.length-1),s=n?"left":"top",l=n?"right":"bottom",u=t.reduce((function(t,e){return t+(e.unit?e.height:0)}),0);a-=u,t.forEach((function(t){var n=t.unit?t.height:k(t.height*a);t.canvas=t.canvas||{},(0,r.extend)(t.canvas,e),t.canvas[s]=e[s]+i,t.canvas[l]=e[l]+(o-n-i),i=i+n+10,z(t.canvas)}))},unique:function(t){var e={};return N(t,(function(t){var n=e[t]?null:t;return e[t]=!0,n}))},map:N,getVerticallyShiftedAngularCoords:function(t,e,n){var i=t.x+t.width/2>=n.x,o=(i?t.x:t.x+t.width)-n.x,r=t.y-n.y,a=r+e,s=k(y(o*o+r*r-a*a)),l=(i?+s:-s)||o;return{x:n.x+(i?l:l-t.width),y:t.y+e}},mergeMarginOptions:function(t,e){return{checkInterval:t.checkInterval||e.checkInterval,size:x(t.size||0,e.size||0),percentStick:t.percentStick||e.percentStick,sizePointNormalState:x(t.sizePointNormalState||0,e.sizePointNormalState||0)}}}),e.getVizRangeObject=function(t){return Array.isArray(t)?{startValue:t[0],endValue:t[1]}:t||{}},e.convertVisualRangeObject=function(t,e){return e?t:[t.startValue,t.endValue]},e.adjustVisualRange=function(t,n,i,r){var a=(0,o.isDefined)(n.startValue),s=(0,o.isDefined)(n.endValue),u="discrete"!==t.axisType;r=r||i;var c=W(t,!1),d=a?n.startValue:r.min,h=s?n.endValue:r.max,f=n.length,p=r.categories;if(u&&!(0,o.isDefined)(d)&&!(0,o.isDefined)(h))return{startValue:d,endValue:h};if((0,o.isDefined)(f))if(u)"datetime"!==t.dataType||(0,o.isNumeric)(f)||(f=(0,l.dateToMilliseconds)(f)),s&&!a||!s&&!a?((0,o.isDefined)(i.max)&&(h=h>i.max?i.max:h),d=c(h,f,-1)):a&&!s&&((0,o.isDefined)(i.min)&&(d=di.max&&(h=i.max),(0,o.isDefined)(i.min)&&d4&&(r=4)):(i="exponential",(r+=o-1)>3&&(r=3)),{type:i,precision:r})},e.getDistance=R,e.roundValue=function(t,e){if(e>20&&(e=20),(0,o.isNumeric)(t))return(0,o.isExponential)(t)?E(t.toExponential(e)):E(t.toFixed(e))},e.getPower=function(t){return t.toExponential().split("e")[1]},e.valueOf=K,e.rotateBBox=function(t,e,n){var i=E(C(n*I).toFixed(3)),o=E(S(n*I).toFixed(3)),r=t.width/2,a=t.height/2,s=t.x+r,l=t.y+a,u=p(r*i)+p(a*o),c=p(r*o)+p(a*i);return H({x:e[0]+(s-e[0])*i+(l-e[1])*o-u,y:e[1]-(s-e[0])*o+(l-e[1])*i-c,width:2*u,height:2*c})},e.normalizeBBox=H,e.PANE_PADDING=10,e.rangesAreEqual=function(t,e){return Array.isArray(e)?t.length===e.length&&t.every((function(t,n){return K(t)===K(e[n])})):K(t.startValue)===K(e.startValue)&&K(t.endValue)===K(e.endValue)},e.pointInCanvas=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(259),a=n(368),s=function(t){function e(e){var n=t.call(this,e)||this;return n._extensionCreators=[],n._registerExtension=n._registerExtension.bind(n),n}return i(e,t),e.prototype.componentDidMount=function(){t.prototype.componentDidMount.call(this),this._createWidget(),this._createExtensions()},e.prototype.renderChildren=function(){var t=this;return o.Children.map(this.props.children,(function(e){return e&&a.ExtensionComponent.isPrototypeOf(e.type)?o.cloneElement(e,{onMounted:t._registerExtension}):e}))},e.prototype._registerExtension=function(t){this._extensionCreators.push(t)},e.prototype._createExtensions=function(){var t=this;this._extensionCreators.forEach((function(e){return e(t._element)}))},e}(r.ComponentBase);e.Component=s},function(t,e,n){"use strict";var i,o=n(89),r=(i=o)&&i.__esModule?i:{default:i},a=n(4);function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l={querySelectorAll:function(t,e){return t.querySelectorAll(e)},elementMatches:function(t,e){var n=this;return(t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector||function(e){var i=t.document||t.ownerDocument;if(!i)return!1;for(var o=n.querySelectorAll(i,e),r=0;r=0&&(a.splice(s,1),i=a.join(" ")),void 0!==i&&(o?t.className=i:this.setAttribute(t,"class",i))}},setStyle:function(t,e,n){t.style[e]=n||""},_document:"undefined"===typeof document?void 0:document,getDocument:function(){return this._document},getActiveElement:function(){return this._document.activeElement},getBody:function(){return this._document.body},createDocumentFragment:function(){return this._document.createDocumentFragment()},getDocumentElement:function(){return this._document.documentElement},getLocation:function(){return this._document.location},getSelection:function(){return this._document.selection},getReadyState:function(){return this._document.readyState},getHead:function(){return this._document.head},hasDocumentProperty:function(t){return t in this._document},listen:function(t,e,n,i){return t&&"addEventListener"in t?(t.addEventListener(e,n,i),function(){t.removeEventListener(e,n)}):a.noop}};t.exports=(0,r.default)(l)},function(t,e,n){"use strict";var i=n(2).isDefined,o=n(5).each,r=n(54),a=n(51),s=function(t,e){return e?(Array.isArray(e)?e:e.toArray()).indexOf(t):-1};e.isEmpty=function(t){return Array.isArray(t)&&!t.length},e.wrapToArray=function(t){return Array.isArray(t)?t:[t]},e.intersection=function(t,e){if(!Array.isArray(t)||0===t.length||!Array.isArray(e)||0===e.length)return[];var n=[];return o(t,(function(t,i){-1!==s(i,e)&&n.push(i)})),n},e.removeDuplicates=function(t,e){if(!Array.isArray(t)||0===t.length)return[];if(!Array.isArray(e)||0===e.length)return t.slice();var n=[];return o(t,(function(t,i){-1===s(i,e)&&n.push(i)})),n},e.normalizeIndexes=function(t,e,n,s){var l={},u=0,c=a().useLegacyVisibleIndex;return o(t,(function(t,i){(t=i[e])>=0?(l[t]=l[t]||[],i===n?l[t].unshift(i):l[t].push(i)):i[e]=void 0})),c||o(t,(function(){if(!i(this[e])&&(!s||s(this))){for(;l[u];)u++;l[u]=[this],u++}})),u=0,r.orderEach(l,(function(t,n){o(n,(function(){t>=0&&(this[e]=u++)}))})),c&&o(t,(function(){i(this[e])||s&&!s(this)||(this[e]=u++)})),u},e.inArray=s,e.merge=function(t,e){for(var n=0;n");return s.WinJS.Utilities.setInnerHTMLUnsafe(e.get(0),t),e.contents()},e.triggerShownEvent=m("dxshown"),e.triggerHidingEvent=m("dxhiding"),e.triggerResizeEvent=m("dxresize"),e.getElementOptions=_,e.createComponents=function(t,e){var n=[];return t.find("[data-options]").add(t.filter("[data-options]")).each((function(t,i){var r=o(i),a=_(i);for(var s in a)(!e||u(s,e)>-1)&&r[s]&&(r[s](a[s]),n.push(r[s]("instance")))})),n},e.extractTemplateMarkup=function(t){var e=(t=o(t)).length&&t.filter((function(){var t=o(this);return t.is("script[type]")&&t.attr("type").indexOf("script")<0}));return e.length?e.eq(0).html():(t=o("
").append(t)).html()},e.normalizeTemplateElement=function t(e){var n=d(e)&&(e.nodeType||h(e))?o(e):o("
").html(e).contents();return 1===n.length&&(n.is("script")?n=t(n.html().trim()):n.is("table")&&(n=n.children("tbody").contents())),n},e.clearSelection=function(){var t=s.getSelection();if(t&&"Caret"!==t.type)if(t.empty)t.empty();else if(t.removeAllRanges)try{t.removeAllRanges()}catch(e){}},e.uniqueId=g,e.closestCommonParent=function(t,e){var n=o(t),i=o(e);if(n[0]===i[0])return n[0];for(var r=n.parents(),a=i.parents(),s=-Math.min(r.length,a.length);s<0;s++)if(r.get(s)===a.get(s))return r.get(s)},e.clipboardText=function(t,e){var n=t.originalEvent&&t.originalEvent.clipboardData||s.clipboardData;if(1===arguments.length)return n&&n.getData("Text");n&&n.setData("Text",e)},e.contains=function t(e,n){return!!n&&(a.isTextNode(n)&&(n=n.parentNode),a.isDocument(e)?e.documentElement.contains(n):f(e)?t(e.document,n):e.contains?e.contains(n):!!(n.compareDocumentPosition(e)&n.DOCUMENT_POSITION_CONTAINS))},e.getPublicElement=function(t){return i(t)},e.createTextElementHiddenCopy=function(t,e,n){var i=s.getComputedStyle(o(t).get(0)),r=n&&n.includePaddings;return o("
").text(e).css({fontStyle:i.fontStyle,fontVariant:i.fontVariant,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFamily:i.fontFamily,letterSpacing:i.letterSpacing,border:i.border,paddingTop:r?i.paddingTop:"",paddingRight:r?i.paddingRight:"",paddingBottom:r?i.paddingBottom:"",paddingLeft:r?i.paddingLeft:"",visibility:"hidden",whiteSpace:"nowrap",position:"absolute",float:"left"})}},function(t,e,n){"use strict";var i=m(n(3)),o=m(n(10)),r=n(0),a=n(2),s=n(5),l=m(n(38)),u=m(n(39)),c=m(n(213)),d=n(153),h=n(356),f=m(n(106)),p=m(n(51));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e){for(var n=0;n1&&(i[0]<4||4===i[0]&&i[1]<4)?"B":"A"}}}},x=new(function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._window=(null===e||void 0===e?void 0:e.window)||v,this._realDevice=this._getDevice(),this._currentDevice=void 0,this._currentOrientation=void 0,this._eventsStrategy=new d.EventsStrategy(this),this.changed=(0,u.default)(),o.default.hasWindow()&&(this._recalculateOrientation(),c.default.add(this._recalculateOrientation.bind(this)))}var e,n,f;return e=t,(n=[{key:"current",value:function(t){if(t)return this._currentDevice=this._getDevice(t),this._forced=!0,void this.changed.fire();if(!this._currentDevice){t=void 0;try{t=this._getDeviceOrNameFromWindowScope()}catch(e){t=this._getDeviceNameFromSessionStorage()}finally{t||(t=this._getDeviceNameFromSessionStorage()),t&&(this._forced=!0)}this._currentDevice=this._getDevice(t)}return this._currentDevice}},{key:"real",value:function(t){return(0,r.extend)({},this._realDevice)}},{key:"orientation",value:function(){return this._currentOrientation}},{key:"isForced",value:function(){return this._forced}},{key:"isRippleEmulator",value:function(){return!!this._window.tinyHippos}},{key:"_getCssClasses",value:function(t){var e=[],n=this._realDevice;return(t=t||this.current()).deviceType&&(e.push("dx-device-".concat(t.deviceType)),"desktop"!==t.deviceType&&e.push("dx-device-mobile")),e.push("dx-device-".concat(n.platform)),n.version&&n.version.length&&e.push("dx-device-".concat(n.platform,"-").concat(n.version[0])),this.isSimulator()&&e.push("dx-simulator"),(0,p.default)().rtlEnabled&&e.push("dx-rtl"),e}},{key:"attachCssClasses",value:function(t,e){this._deviceClasses=this._getCssClasses(e).join(" "),(0,i.default)(t).addClass(this._deviceClasses)}},{key:"detachCssClasses",value:function(t){(0,i.default)(t).removeClass(this._deviceClasses)}},{key:"isSimulator",value:function(){try{return this._isSimulator||o.default.hasWindow()&&this._window.top!==this._window.self&&this._window.top["dx-force-device"]||this.isRippleEmulator()}catch(t){return!1}}},{key:"forceSimulator",value:function(){this._isSimulator=!0}},{key:"_getDevice",value:function(t){if("genericPhone"===t&&(t={deviceType:"phone",platform:"generic",generic:!0}),(0,a.isPlainObject)(t))return this._fromConfig(t);var e;if(t){if(!(e=y[t]))throw l.default.Error("E0005")}else e=_.userAgent;return this._fromUA(e)}},{key:"_getDeviceOrNameFromWindowScope",value:function(){var t;return o.default.hasWindow()&&(this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"])&&(t=this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"]),t}},{key:"_getDeviceNameFromSessionStorage",value:function(){var t=(0,h.sessionStorage)();if(t){var e=t.getItem("dx-force-device");try{return JSON.parse(e)}catch(n){return e}}}},{key:"_fromConfig",value:function(t){var e=(0,r.extend)({},b,this._currentDevice,t),n={phone:"phone"===e.deviceType,tablet:"tablet"===e.deviceType,android:"android"===e.platform,ios:"ios"===e.platform,generic:"generic"===e.platform};return(0,r.extend)(e,n)}},{key:"_fromUA",value:function(t){var e;return(0,s.each)(w,(function(n,i){return!(e=i(t))})),e?this._fromConfig(e):b}},{key:"_changeOrientation",value:function(){var t=(0,i.default)(this._window),e=t.height()>t.width()?"portrait":"landscape";this._currentOrientation!==e&&(this._currentOrientation=e,this._eventsStrategy.fireEvent("orientationChanged",[{orientation:e}]))}},{key:"_recalculateOrientation",value:function(){var t=(0,i.default)(this._window).width();this._currentWidth!==t&&(this._currentWidth=t,this._changeOrientation())}},{key:"on",value:function(t,e){return this._eventsStrategy.on(t,e),this}},{key:"off",value:function(t,e){return this._eventsStrategy.off(t,e),this}}])&&g(e.prototype,n),f&&g(e,f),t}());f.default.changeCallback.add((function(t,e){x.detachCssClasses(e),x.attachCssClasses(t)})),t.exports=x,t.exports.default=t.exports},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(367),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(){var t=o.Children.map(this.props.children,(function(t){return r.getElementInfo(t).type===r.ElementType.Option?t:null}));return o.createElement(o.Fragment,{},t)},e}(o.PureComponent);e.default=a},function(t,e,n){"use strict";var i=p(n(3)),o=p(n(155)),r=p(n(97)),a=n(158),s=n(4),l=n(5),u=n(0),c=n(91),d=n(16),h=n(11),f=n(2);function p(t){return t&&t.__esModule?t:{default:t}}function m(t,e,n){t="role"===t||"id"===t?t:"aria-".concat(t),e=(0,f.isDefined)(e)?e.toString():null,n.attr(t,e)}n(25),n(159),n(216);var g=r.default.inherit({_feedbackHideTimeout:400,_feedbackShowTimeout:30,_supportedKeys:function(){return{}},_getDefaultOptions:function(){return(0,u.extend)(this.callBase(),{hoveredElement:null,isActive:!1,disabled:!1,visible:!0,hint:void 0,activeStateEnabled:!1,onContentReady:null,hoverStateEnabled:!1,focusStateEnabled:!1,tabIndex:0,accessKey:null,onFocusIn:null,onFocusOut:null,onKeyboardHandled:null,ignoreParentReadOnly:!1})},_init:function(){this.callBase(),this._initContentReadyAction()},_innerWidgetOptionChanged:function(t,e){var n=g.getOptionsFromContainer(e);t&&t.option(n),this._options.cache(e.name,n)},_bindInnerWidgetOptions:function(t,e){var n=this,i=function(){return n._options.silent(e,(0,u.extend)({},t.option()))};i(),t.on("optionChanged",i)},_getAriaTarget:function(){return this._focusTarget()},_initContentReadyAction:function(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initMarkup:function(){var t=this.option(),e=t.disabled,n=t.visible;this.$element().addClass("dx-widget"),this._toggleDisabledState(e),this._toggleVisibility(n),this._renderHint(),this._isFocusable()&&this._renderFocusTarget(),this.callBase()},_render:function(){this.callBase(),this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents(),this._toggleIndependentState()},_renderHint:function(){var t=this.option().hint;this.$element().attr("title",t||null)},_renderContent:function(){var t=this;(0,s.deferRender)((function(){return t._disposed?void 0:t._renderContentImpl()})).done((function(){return t._disposed?void 0:t._fireContentReadyAction()}))},_renderContentImpl:s.noop,_fireContentReadyAction:(0,s.deferRenderer)((function(){return this._contentReadyAction()})),_dispose:function(){this._contentReadyAction=null,this._detachKeyboardEvents(),this.callBase()},_resetActiveState:function(){this._toggleActiveState(this._eventBindingTarget(),!1)},_clean:function(){this._cleanFocusState(),this._resetActiveState(),this.callBase(),this.$element().empty()},_toggleVisibility:function(t){this.$element().toggleClass("dx-state-invisible",!t),this.setAria("hidden",!t||void 0)},_renderFocusState:function(){this._attachKeyboardEvents(),this._isFocusable()&&(this._renderFocusTarget(),this._attachFocusEvents(),this._renderAccessKey())},_renderAccessKey:function(){var t=this,e=this._focusTarget(),n=this.option().accessKey;e.attr("accesskey",n),a.dxClick.off(e,{namespace:"UIFeedback"}),n&&a.dxClick.on(e,(function(e){(0,h.isFakeClickEvent)(e)&&(e.stopImmediatePropagation(),t.focus())}),{namespace:"UIFeedback"})},_isFocusable:function(){var t=this.option(),e=t.focusStateEnabled,n=t.disabled;return e&&!n},_eventBindingTarget:function(){return this.$element()},_focusTarget:function(){return this._getActiveElement()},_getActiveElement:function(){var t=this._eventBindingTarget();return this._activeStateUnit?t.find(this._activeStateUnit).not(".dx-state-disabled"):t},_renderFocusTarget:function(){var t=this.option().tabIndex;this._focusTarget().attr("tabIndex",t)},_keyboardEventBindingTarget:function(){return this._eventBindingTarget()},_refreshFocusEvent:function(){this._detachFocusEvents(),this._attachFocusEvents()},_focusEventTarget:function(){return this._focusTarget()},_focusInHandler:function(t){var e=this;t.isDefaultPrevented()||this._createActionByOption("onFocusIn",{beforeExecute:function(){return e._updateFocusState(t,!0)},excludeValidators:["readOnly"]})({event:t})},_focusOutHandler:function(t){var e=this;t.isDefaultPrevented()||this._createActionByOption("onFocusOut",{beforeExecute:function(){return e._updateFocusState(t,!1)},excludeValidators:["readOnly","disabled"]})({event:t})},_updateFocusState:function(t,e){var n=t.target;-1!==(0,d.inArray)(n,this._focusTarget())&&this._toggleFocusClass(e,(0,i.default)(n))},_toggleFocusClass:function(t,e){(e&&e.length?e:this._focusTarget()).toggleClass("dx-state-focused",t)},_hasFocusClass:function(t){return(0,i.default)(t||this._focusTarget()).hasClass("dx-state-focused")},_isFocused:function(){return this._hasFocusClass()},_getKeyboardListeners:function(){return[]},_attachKeyboardEvents:function(){var t=this;this._detachKeyboardEvents();var e=this.option(),n=e.focusStateEnabled,i=e.onKeyboardHandled,o=this._getKeyboardListeners().length;(n||o||!!i)&&(this._keyboardListenerId=a.keyboard.on(this._keyboardEventBindingTarget(),this._focusTarget(),(function(e){return t._keyboardHandler(e)})))},_keyboardHandler:function(t,e){if(!e){var n=t.originalEvent,i=t.keyName,o=t.which,r=this._supportedKeys(n),a=r[i]||r[o];if(void 0!==a)if(!a.bind(this)(n,t))return!1}var s=this._getKeyboardListeners(),l=this.option().onKeyboardHandled;return s.forEach((function(e){return e&&e._keyboardHandler(t)})),l&&l(t),!0},_refreshFocusState:function(){this._cleanFocusState(),this._renderFocusState()},_cleanFocusState:function(){this._focusTarget().removeAttr("tabIndex"),this._toggleFocusClass(!1),this._detachFocusEvents(),this._detachKeyboardEvents()},_detachKeyboardEvents:function(){a.keyboard.off(this._keyboardListenerId),this._keyboardListenerId=null},_attachHoverEvents:function(){var t=this,e=this.option().hoverStateEnabled,n=this._activeStateUnit,r=this._eventBindingTarget();a.hover.off(r,{selector:n,namespace:"UIFeedback"}),e&&a.hover.on(r,new o.default((function(e){var n=e.event,o=e.element;t._hoverStartHandler(n),t.option("hoveredElement",(0,i.default)(o))}),{excludeValidators:["readOnly"]}),(function(e){t.option("hoveredElement",null),t._hoverEndHandler(e)}),{selector:n,namespace:"UIFeedback"})},_attachFeedbackEvents:function(){var t=this,e=this.option().activeStateEnabled,n=this._activeStateUnit,r=this._eventBindingTarget();a.active.off(r,{namespace:"UIFeedback",selector:n}),e&&a.active.on(r,new o.default((function(e){var n=e.event,o=e.element;return t._toggleActiveState((0,i.default)(o),!0,n)})),new o.default((function(e){var n=e.event,o=e.element;return t._toggleActiveState((0,i.default)(o),!1,n)}),{excludeValidators:["disabled","readOnly"]}),{showTimeout:this._feedbackShowTimeout,hideTimeout:this._feedbackHideTimeout,selector:n,namespace:"UIFeedback"})},_detachFocusEvents:function(){var t=this._focusEventTarget();a.focus.off(t,{namespace:"".concat(this.NAME,"Focus")})},_attachFocusEvents:function(){var t=this,e=this._focusEventTarget();a.focus.on(e,(function(e){return t._focusInHandler(e)}),(function(e){return t._focusOutHandler(e)}),{namespace:"".concat(this.NAME,"Focus"),isFocusable:function(t){return(0,i.default)(t).is(c.focusable)}})},_hoverStartHandler:s.noop,_hoverEndHandler:s.noop,_toggleActiveState:function(t,e){this.option("isActive",e),t.toggleClass("dx-state-active",e)},_updatedHover:function(){var t=this._options.silent("hoveredElement");this._hover(t,t)},_findHoverTarget:function(t){return t&&t.closest(this._activeStateUnit||this._eventBindingTarget())},_hover:function(t,e){var n=this.option(),i=n.hoverStateEnabled,o=n.disabled,r=n.isActive;if((e=this._findHoverTarget(e))&&e.toggleClass("dx-state-hover",!1),t&&i&&!o&&!r){var a=this._findHoverTarget(t);a&&a.toggleClass("dx-state-hover",!0)}},_toggleDisabledState:function(t){this.$element().toggleClass("dx-state-disabled",Boolean(t)),this.setAria("disabled",t||void 0)},_toggleIndependentState:function(){this.$element().toggleClass("dx-state-independent",this.option("ignoreParentReadOnly"))},_setWidgetOption:function(t,e){var n=this;if(this[t])if((0,f.isPlainObject)(e[0]))(0,l.each)(e[0],(function(e,i){return n._setWidgetOption(t,[e,i])}));else{var i=e[0],o=e[1];1===e.length&&(o=this.option(i));var r=this["".concat(t,"OptionMap")];this[t].option(r?r(i):i,o)}},_optionChanged:function(t){var e=t.name,n=t.value,i=t.previousValue;switch(e){case"disabled":this._toggleDisabledState(n),this._updatedHover(),this._refreshFocusState();break;case"hint":this._renderHint();break;case"ignoreParentReadOnly":this._toggleIndependentState();break;case"activeStateEnabled":this._attachFeedbackEvents();break;case"hoverStateEnabled":this._attachHoverEvents(),this._updatedHover();break;case"tabIndex":case"focusStateEnabled":this._refreshFocusState();break;case"onFocusIn":case"onFocusOut":break;case"accessKey":this._renderAccessKey();break;case"hoveredElement":this._hover(n,i);break;case"isActive":this._updatedHover();break;case"visible":this._toggleVisibility(n),this._isVisibilityChangeSupported()&&this._checkVisibilityChanged(n?"shown":"hiding");break;case"onKeyboardHandled":this._attachKeyboardEvents();break;case"onContentReady":this._initContentReadyAction();break;default:this.callBase(t)}},_isVisible:function(){var t=this.option().visible;return this.callBase()&&t},beginUpdate:function(){this._ready(!1),this.callBase()},endUpdate:function(){this.callBase(),this._initialized&&this._ready(!0)},_ready:function(t){if(0===arguments.length)return this._isReady;this._isReady=t},setAria:function(){if((0,f.isPlainObject)(arguments.length<=0?void 0:arguments[0])){var t=(arguments.length<=1?void 0:arguments[1])||this._getAriaTarget();(0,l.each)(arguments.length<=0?void 0:arguments[0],(function(e,n){return m(e,n,t)}))}else m(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],(arguments.length<=2?void 0:arguments[2])||this._getAriaTarget())},isReady:function(){return this._ready()},repaint:function(){this._refresh()},focus:function(){a.focus.trigger(this._focusTarget())},registerKeyHandler:function(t,e){var n=this._supportedKeys();this._supportedKeys=function(){return(0,u.extend)(n,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},t,e))}}});g.getOptionsFromContainer=function(t){var e=t.name,n=t.fullName,i=t.value,o={};e===n?o=i:o[n.split(".").pop()]=i;return o},t.exports=g},function(t,e,n){"use strict";var i=n(38),o=n(2),r=function(t,e,n){return function(){var i=this.callBase;this.callBase=t[e];try{return n.apply(this,arguments)}finally{this.callBase=i}}},a=function(t){var e,n,i;if(!t)return this;for(n in t)i=t[n],e="function"===typeof this.prototype[n]&&"function"===typeof i,this.prototype[n]=e?r(this.parent.prototype,n,i):i;return this},s=function(){var t,e,n,i=this,o=Object.prototype.hasOwnProperty.bind(i),r=!o("_includedCtors")&&!o("_includedPostCtors");for(r&&(i._includedCtors=i._includedCtors.slice(0),i._includedPostCtors=i._includedPostCtors.slice(0)),n=0;n10||p(o.y)>10;return i||r},_fireClickEvent:function(t){this._fireEvent("dxclick",t,{target:s.closestCommonParent(this._startTarget,t.target)})},dispose:function(){g.cancelAnimationFrame(this._clickAnimationFrame)}});!function(){var t=r.real(),e=t.generic||t.ios&&f(t.version,[9,3])>=0||t.android&&f(t.version,[5])>=0,n=function(t){return e||i(t).closest(".dx-native-click").length},a=null,s=null,l=function(t){var e=t.originalEvent,i=s===e||e&&e.DXCLICK_FIRED;(!t.which||1===t.which)&&!a&&n(t.target)&&!i&&(e&&(e.DXCLICK_FIRED=!0),s=e,u.fireEvent({type:"dxclick",originalEvent:t}))};_=_.inherit({_makeElementClickable:function(t){n(t)||this.callBase(t),o.on(t,"click",l)},configure:function(t){this.callBase(t),t.useNative&&this.getElement().addClass("dx-native-click")},start:function(t){a=null,n(t.target)||this.callBase(t)},end:function(t){n(t.target)||this.callBase(t)},cancel:function(){a=!0},dispose:function(){this.callBase(),o.off(this.getElement(),"click",l)}})}(),function(){if(!r.real().generic){var t=null,e=!1,n=a.getDocument();o.subscribeGlobal(n,u.addNamespace(c.down,"NATIVE_CLICK_FIXER"),(function(n){t=n.target,e=n.isDefaultPrevented()})),o.subscribeGlobal(n,u.addNamespace("click","NATIVE_CLICK_FIXER"),(function(n){var o=i(n.target);e||!t||o.is(t)||i(t).is("label")||!m(o)||s.resetActiveElement(),t=null,e=!1}))}}(),h({emitter:_,bubble:!0,events:["dxclick"]}),e.name="dxclick"},function(t,e,n){"use strict";var i=n(2),o=n(37).adjust,r=n(5).each,a=n(46).camelize,s=i.isObject,l=i.isString,u=i.isDate,c=i.isDefined,d=["millisecond","second","minute","hour","day","week","month","quarter","year"],h=function t(e){switch(e){case"millisecond":return 1;case"second":return 1e3*t("millisecond");case"minute":return 60*t("second");case"hour":return 60*t("minute");case"day":return 24*t("hour");case"week":return 7*t("day");case"month":return 30*t("day");case"quarter":return 3*t("month");case"year":return 365*t("day");default:return 0}},f=function(t){var e,n,i,o=["millisecond","second","minute","hour","day","month","year"],r={};for(e=o.length-1;e>=0;e--)i=o[e],(n=Math.floor(t/h(i)))>0&&(r[i+"s"]=n,t-=p(i,n));return r};function p(t,e){return h(t)*e}function m(t){var e,n=-1;return l(t)?t:s(t)?(r(t,(function(t,i){for(e=0;en&&(i=n),i):t}function P(t,e){if(c(t)){var n=e.getHours()-t.getHours();if(0!==n){var i=1===n||-23===n?-1:1,o=new Date(e.getTime()+36e5*i);(i>0||o.getDate()===e.getDate())&&e.setTime(o.getTime())}}}function D(t,e){return 60*(e.getTimezoneOffset()-t.getTimezoneOffset())*1e3}var A={dateUnitIntervals:d,convertMillisecondsToDateUnits:f,dateToMilliseconds:function(t){var e=0;return s(t)&&r(t,(function(t,n){e+=p(t.substr(0,t.length-1),n)})),l(t)&&(e=p(t,1)),e},getNextDateUnit:function(t,e){switch(m(t)){case"millisecond":return"second";case"second":return"minute";case"minute":return"hour";case"hour":return"day";case"day":return e?"week":"month";case"week":return"month";case"month":return"quarter";case"quarter":case"year":return"year";default:return 0}},convertDateUnitToMilliseconds:p,getDateUnitInterval:m,getDateFormatByTickInterval:function(t){return g[m(t)]||""},getDatesDifferences:function(t,e){var n=0,i={year:t.getFullYear()!==e.getFullYear(),month:t.getMonth()!==e.getMonth(),day:t.getDate()!==e.getDate(),hour:t.getHours()!==e.getHours(),minute:t.getMinutes()!==e.getMinutes(),second:t.getSeconds()!==e.getSeconds(),millisecond:t.getMilliseconds()!==e.getMilliseconds()};return r(i,(function(t,e){e&&n++})),0===n&&0!==D(t,e)&&(i.hour=!0,n++),i.count=n,i},correctDateWithUnitBeginning:y,trimTime:b,setToDayEnd:function(t){var e=b(t);return e.setDate(e.getDate()+1),new Date(e.getTime()-1)},roundDateByStartDayHour:function(t,e){var n=this.dateTimeFromDecimal(e),i=new Date(t);return(t.getHours()===n.hours&&t.getMinutes()=6&&(i=new Date(i.setDate(i.getDate()+7))),i},getQuarter:_,getFirstQuarterMonth:v,dateInRange:function(t,e,n,i){return"date"===i&&(e=e&&A.correctDateWithUnitBeginning(e,"day"),n=n&&A.correctDateWithUnitBeginning(n,"day"),t=t&&A.correctDateWithUnitBeginning(t,"day")),M(t,e,n)===t},roundToHour:function(t){return t.setHours(t.getHours()+1),t.setMinutes(0),t},normalizeDate:M,getViewMinBoundaryDate:function(t,e){var n=new Date(e.getFullYear(),e.getMonth(),1);return"month"===t?n:(n.setMonth(0),"year"===t||("decade"===t&&n.setFullYear(E(e)),"century"===t&&n.setFullYear(T(e))),n)},getViewMaxBoundaryDate:function(t,e){var n=new Date(e);return n.setDate(C(e)),"month"===t?n:(n.setMonth(11),n.setDate(C(n)),"year"===t||("decade"===t&&n.setFullYear(E(e)+9),"century"===t&&n.setFullYear(T(e)+99)),n)},fixTimezoneGap:P,getTimezonesDifference:D,makeDate:function(t){return new Date(t)},getDatesInterval:function(t,e,n){var i=e.getTime()-t.getTime(),o=h(n)||1;return Math.floor(i/o)},getDatesOfInterval:function(t,e,n){var i=[],o=new Date(t.getTime());for(t.getTime()===e.getTime()&&i.push(new Date(t.getTime()));o1&&(t=[].slice.call(arguments)),!t||"this"===t)return function(t){return t};if("string"===typeof t){var e=(t=h(t)).split(".");return function(t,n){for(var i=(n=p(n)).functionsAsIs,o=("defaultValue"in n),r=m(t,n),s=0;s=0||t.indexOf("crios")>=0?(i="chrome",o=(o=/(?:chrome|crios)\/(\d+\.\d+)/.exec(t))&&o[1]):t.indexOf("fxios")>=0?(i="mozilla",o=(o=/fxios\/(\d+\.\d+)/.exec(t))&&o[1]):t.indexOf("safari")>=0&&/version|phantomjs/.test(t)?(i="safari",o=(o=/(?:version|phantomjs)\/([0-9.]+)/.exec(t))&&o[1]):(i="unknown",o=(o=/applewebkit\/([0-9.]+)/.exec(t))&&o[1])),"trident"!==i&&"edge"!==i||(i="msie"),i&&(e[i]=!0,e.version=o),e};t.exports=i({_fromUA:c},c(o.userAgent))},function(t,e,n){t.exports=n(594)},function(t,e,n){"use strict";var i=n(57),o=n(2).type,r=/matrix(3d)?\((.+?)\)/,a=/translate(?:3d)?\((.+?)\)/;function s(t){return"string"===o(t)&&"%"===t[t.length-1]}function l(t,e){t.length&&i.data(t.get(0),"dxTranslator",e)}var u=function(t){t.length&&i.removeData(t.get(0),"dxTranslator")},c=function(t){return t.x=t.x||0,t.y=t.y||0,"translate("+(s(t.x)?t.x:t.x+"px")+", "+(s(t.y)?t.y:t.y+"px")+")"},d=function(t){var e=t.length?i.data(t.get(0),"dxTranslator"):null;if(!e){var n=(t.css("transform")||c({x:0,y:0})).match(r),o=n&&n[1];n?(n=n[2].split(","),"3d"===o?n=n.slice(12,15):(n.push(0),n=n.slice(4,7))):n=[0,0,0],l(t,e={x:parseFloat(n[0]),y:parseFloat(n[1]),z:parseFloat(n[2])})}return e};e.move=function(t,e){var n,i=e.left,o=e.top;void 0===i?(n=d(t)).y=o||0:void 0===o?(n=d(t)).x=i||0:l(t,n={x:i||0,y:o||0,z:0}),t.css({transform:c(n)}),(s(i)||s(o))&&u(t)},e.locate=function(t){var e=d(t);return{left:e.x,top:e.y}},e.clearCache=u,e.parseTranslate=function(t){var e=t.match(a);if(e&&e[1])return e=e[1].split(","),e={x:parseFloat(e[0]),y:parseFloat(e[1]),z:parseFloat(e[2])}},e.getTranslate=d,e.getTranslateCss=c,e.resetPosition=function(t,e){var n,i={left:0,top:0,transform:"none"};e&&(n=t.css("transition"),i.transition="none"),t.css(i),u(t),e&&(t.get(0).offsetHeight,t.css("transition",n))}},function(t,e,n){"use strict";var i,o=n(0),r=n(44),a=(i=r)&&i.__esModule?i:{default:i};(0,o.extend)(e,a.default,{modules:[],foreachNodes:function(t,e){for(var n=0;n>>2]>>>24-r%4*8&255;e[i+r>>>2]|=a<<24-(i+r)%4*8}else for(r=0;r>>2]=n[r>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n>>2]>>>24-o%4*8&255;i.push((r>>>4).toString(16)),i.push((15&r).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new c.init(n,e/2)}},f=d.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],o=0;o>>2]>>>24-o%4*8&255;i.push(String.fromCharCode(r))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new c.init(n,e)}},p=d.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},m=l.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,i=this._data,o=i.words,r=i.sigBytes,a=this.blockSize,s=r/(4*a),l=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*l,r);if(l){for(var d=0;d",i).addClass("dx-theme-marker").appendTo(i.documentElement);try{return(t=e.css("fontFamily"))?"dx."!==(t=t.replace(/["']/g,"")).substr(0,"dx.".length)?null:t.substr("dx.".length):null}finally{e.remove()}}function I(t){var e;function n(){s=null,w.fire(),w.empty()}s=t,T()?n():(e=Date.now(),l=setInterval((function(){var t=T(),i=!t&&Date.now()-e>15e3;i&&m.log("W0004",s),(t||i)&&(clearInterval(l),l=void 0,n())}),10))}function T(){return!s||k()===s}function E(t){var e=t?t.split("."):[],n=null;if(r){if(t in r)return t;v(r,(function(t,i){var o=t.split(".");if((!e[0]||o[0]===e[0])&&(!e[1]||e[1]===o[1])&&(!e[2]||e[2]===o[2]))return n&&!i.isActive||(n=t),!i.isActive&&void 0}))}return n}function O(t){(function(t){try{t!==i&&(r=null)}catch(e){r=null}i=t})((t=t||{}).context||d.getDocument()),i&&(!function(){var t=c("link[rel=dx-theme]",i);t.length&&(r={},o=c(g.createMarkupFromString(""),i),t.each((function(){var t=c(this,i),e=t.attr("data-theme"),n=t.attr("href"),o="true"===t.attr("data-active");r[e]={url:n,isActive:o}})),t.last().after(o),t.remove())}(),a=void 0,M(t))}function M(t){if(!arguments.length)return a=a||k();D(x()),"string"===typeof(t=t||{})&&(t={theme:t});var e,n=t._autoInit,i=t.loadCallback;if((a=E(t.theme||a))&&(e=r[a]),i&&w.add(i),e)o.attr("href",r[a].url),!w.has()&&!t._forceTimeout||l?s&&(s=a):I(a);else{if(!n)throw m.Error("E0021",a);w.fire(),w.empty()}N(),P(b.originalViewPort(),a)}function P(t,e){u=function(t){var e=[],n=(t=t||M())&&t.split(".");return n&&(e.push("dx-theme-"+n[0],"dx-theme-"+n[0]+"-typography"),n.length>1&&e.push("dx-color-scheme-"+n[1]+(R(t)?"-"+n[2]:""))),e}(e).join(" "),c(t).addClass(u);!function(){var e=h.hasWindow()&&f.devicePixelRatio;if(e&&!(e<2)){var n=c("
");n.css("border",".5px solid transparent"),c("body").append(n),1===n.outerHeight()&&(c(t).addClass("dx-hairlines"),u+=" dx-hairlines"),n.remove()}}()}function D(t){c(t).removeClass(u)}function A(t,e){return e||(e=a||k()),new RegExp(t).test(e)}function R(t){return A("material",t)}function B(t){return A("ios7",t)}function N(){B()&&m.log("W0010","The 'ios7' theme","19.1","Use the 'generic' theme instead.")}function L(t,e){var n=d.getDocument(),i=n.createElement("span");i.style.position="absolute",i.style.top="-9999px",i.style.left="-9999px",i.style.visibility="hidden",i.style.fontFamily="Arial",i.style.fontSize="250px",i.style.fontWeight=e,i.innerHTML=t,n.body.appendChild(i);var o=i.offsetWidth;i.style.fontFamily="Roboto, RobotoFallback, Arial";var r=i.offsetWidth;return i.parentNode.removeChild(i),o!==r}var F=new p;function V(){if(O({_autoInit:!0,_forceTimeout:!0}),c("link[rel=dx-theme]",i).length)throw m.Error("E0022");F.resolve()}h.hasWindow()?V():_(V),S.add((function(t,e){F.done((function(){D(e),P(t)}))})),y.changed.add((function(){O({_autoInit:!0})})),e.current=M,e.ready=function(t){w.add(t)},e.init=O,e.attachCssClasses=P,e.detachCssClasses=D,e.waitForThemeLoad=I,e.isMaterial=R,e.isIos7=B,e.isGeneric=function(t){return A("generic",t)},e.isDark=function(t){return A("dark",t)},e.isWebFontLoaded=L,e.waitWebFont=function(t,e){return new C((function(n){var i=function(){clearInterval(o),clearTimeout(r),n()},o=setInterval((function(){L(t,e)&&i()}),15),r=setTimeout(i,2e3)}))},e.resetTheme=function(){o&&o.attr("href","about:blank"),a=null,s=null},t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(2).isExponential;function o(t){return Math.abs(parseInt(t.toExponential().split("e")[1]))}function r(t){var e=t.toString();if(e.indexOf(".")<0)return 0;var n=e.split("."),i=n[1].indexOf("e");return i>=0?i:n[1].length}function a(t,e){if(t<0&&e%2!==1)return NaN;var n=Math.pow(Math.abs(t),1/e);return e%2===1&&t<0?-n:n}e.sign=function(t){return 0===t?0:t/Math.abs(t)},e.fitIntoRange=function(t,e,n){var i=!e&&0!==e,o=!n&&0!==n;return i&&(e=o?t:Math.min(t,n)),o&&(n=i?t:Math.max(t,e)),Math.min(Math.max(t,e),n)},e.inRange=function(t,e,n){return t>=e&&t<=n},e.adjust=function(t,e){var n,a=r(e||0)+2,s=t.toString().split("."),l=t,u=Math.abs(t),c=i(t),d=u>1?10:0;return 1===s.length?t:(c||(i(e)&&(a=s[0].length+o(e)),t=(t=u)-Math.floor(t)+d),a="0.000300"!==3e-4.toPrecision(3)&&o(t)>6||a>7?15:7,c||(n=parseFloat(t.toPrecision(a)).toString().split("."))[0]!==d.toString()?parseFloat(l.toPrecision(a)):parseFloat(s[0]+"."+n[1]))},e.getPrecision=r,e.getExponent=o,e.getRoot=a,e.solveCubicEquation=function(t,e,n,i){if(Math.abs(t)<1e-8){if(t=e,e=n,n=i,Math.abs(t)<1e-8)return t=e,e=n,Math.abs(t)<1e-8?[]:[-e/t];var o=e*e-4*t*n;return Math.abs(o)<1e-8?[-e/(2*t)]:o>0?[(-e+Math.sqrt(o))/(2*t),(-e-Math.sqrt(o))/(2*t)]:[]}var r,s,l=(3*t*n-e*e)/(3*t*t),u=(2*e*e*e-9*t*e*n+27*t*t*i)/(27*t*t*t);if(Math.abs(l)<1e-8)r=[a(-u,3)];else if(Math.abs(u)<1e-8)r=[0].concat(l<0?[Math.sqrt(-l),-Math.sqrt(-l)]:[]);else{var c=u*u/4+l*l*l/27;if(Math.abs(c)<1e-8)r=[-1.5*u/l,3*u/l];else if(c>0)r=[(s=a(-u/2-Math.sqrt(c),3))-l/(3*s)];else{s=2*Math.sqrt(-l/3);var d=Math.acos(3*u/l/s)/3,h=2*Math.PI/3;r=[s*Math.cos(d),s*Math.cos(d-h),s*Math.cos(d-2*h)]}}for(var f=0;f0?Math.floor(t):Math.ceil(t)}},function(t,e,n){"use strict";var i=n(211);t.exports=i({E0001:"Method is not implemented",E0002:"Member name collision: {0}",E0003:"A class must be instantiated using the 'new' keyword",E0004:"The NAME property of the component is not specified",E0005:"Unknown device",E0006:"Unknown endpoint key is requested",E0007:"'Invalidate' method is called outside the update transaction",E0008:"Type of the option name is not appropriate to create an action",E0009:"Component '{0}' has not been initialized for an element",E0010:"Animation configuration with the '{0}' type requires '{1}' configuration as {2}",E0011:"Unknown animation type '{0}'",E0012:"jQuery version is too old. Please upgrade jQuery to 1.10.0 or later",E0013:"KnockoutJS version is too old. Please upgrade KnockoutJS to 2.3.0 or later",E0014:"The 'release' method shouldn't be called for an unlocked Lock object",E0015:"Queued task returned an unexpected result",E0017:"Event namespace is not defined",E0018:"DevExpress.ui.DevExpressPopup widget is required",E0020:"Template engine '{0}' is not supported",E0021:"Unknown theme is set: {0}",E0022:"LINK[rel=DevExpress-theme] tags must go before DevExpress included scripts",E0023:"Template name is not specified",E0024:"DevExtreme bundle already included",E0025:"Unexpected argument type",E0100:"Unknown validation type is detected",E0101:"Misconfigured range validation rule is detected",E0102:"Misconfigured comparison validation rule is detected",E0103:"validationCallback of an asynchronous rule should return a jQuery or a native promise",E0110:"Unknown validation group is detected",E0120:"Adapter for a DevExpressValidator component cannot be configured",E0121:"The 'customItem' field of the 'onCustomItemCreating' function's parameter should contain a custom item or Promise that is resolved after the item is created.",W0000:"'{0}' is deprecated in {1}. {2}",W0001:"{0} - '{1}' option is deprecated in {2}. {3}",W0002:"{0} - '{1}' method is deprecated in {2}. {3}",W0003:"{0} - '{1}' property is deprecated in {2}. {3}",W0004:"Timeout for theme loading is over: {0}",W0005:"'{0}' event is deprecated in {1}. {2}",W0006:"Invalid recurrence rule: '{0}'",W0007:"'{0}' Globalize culture is not defined",W0008:"Invalid view name: '{0}'",W0009:"Invalid time zone name: '{0}'",W0010:"{0} is deprecated in {1}. {2}",W0011:"Number parsing is invoked while the parser is not defined",W0012:"Date parsing is invoked while the parser is not defined",W0013:"'{0}' file is deprecated in {1}. {2}",W0014:"{0} - '{1}' type is deprecated in {2}. {3}",W0015:"Instead of returning a value from the '{0}' function, write it into the '{1}' field of the function's parameter.",W0016:'The "{0}" option does not accept the "{1}" value since v.{2}. {3}.'})},function(t,e,n){"use strict";var i=function(t){this._options=t||{},this._list=[],this._queue=[],this._firing=!1,this._fired=!1,this._firingIndexes=[]};i.prototype._fireCore=function(t,e){var n=this._firingIndexes,i=this._list,o=this._options.stopOnFalse,r=n.length;for(n[r]=0;n[r]-1&&(e.splice(i,1),this._firing&&n.length))for(var o=0;o-1:!!e.length},i.prototype.empty=function(t){return this._list=[],this},i.prototype.fireWith=function(t,e){var n=this._queue;if(e=(e=e||[]).slice?e.slice():e,this._options.syncStrategy)this._firing=!0,this._fireCore(t,e);else{if(n.push([t,e]),this._firing)return;for(this._firing=!0;n.length;){var i=n.shift();this._fireCore(i[0],i[1])}}return this._firing=!1,this._fired=!0,this},i.prototype.fire=function(){this.fireWith(this,arguments)},i.prototype.fired=function(){return this._fired};t.exports=function(t){return new i(t)}},function(t,e,n){"use strict";var i=y(n(3)),o=n(2),r=n(7),a=n(197),s=n(55),l=n(5),u=n(0),c=n(24),d=n(29),h=n(4),f=y(n(195)),p=n(60),m=y(n(94)),g=n(54),_=n(10),v=y(n(6));function y(t){return t&&t.__esModule?t:{default:t}}var b={year:function(t){return t&&t.getFullYear()},month:function(t){return t&&t.getMonth()+1},day:function(t){return t&&t.getDate()},quarter:function(t){return t&&Math.floor(t.getMonth()/3)+1},hour:function(t){return t&&t.getHours()},minute:function(t){return t&&t.getMinutes()},second:function(t){return t&&t.getSeconds()}};t.exports=function(){var e=function(){var t=arguments[1],e=this.calculateCellValue(t);if(!(0,o.isDefined)(e))return null;if(n(this.dataType)){var i=arguments[0];return b[i](e)}if("number"===this.dataType){var r=arguments[0];return Math.floor(Number(e)/r)*r}};function n(t){return"date"===t||"datetime"===t}var y=function(t){t.get(0).textContent="\xa0"},w=function(t){var e=t.data&&t.data(),n=e&&e.dxComponents,i=n&&n[0];return i&&e[i]};return{renderNoDataText:function(t){if(t=t||this.element()){var e=this.addWidgetPrefix("nodata"),n=t.find("."+e).last(),o=this._dataController.isEmpty(),r=this._dataController.isLoading();n.length||(n=(0,i.default)("").addClass(e).appendTo(t)),o&&!r?n.removeClass("dx-hidden").text(this._getNoDataText()):n.addClass("dx-hidden")}},renderLoadPanel:function(t,e,n){var o;this._loadPanel&&this._loadPanel.$element().remove(),(o=this.option("loadPanel"))&&("auto"===o.enabled?!n:o.enabled)?(o=(0,u.extend)({shading:!1,message:o.text,position:function(){var e=(0,i.default)((0,_.getWindow)());return t.height()>e.height()?{of:e,boundary:t,collision:"fit"}:{of:t}},container:e},o),this._loadPanel=this._createComponent((0,i.default)("
").appendTo(e),f.default,o)):this._loadPanel=null},getIndexByKey:function(t,e,n){var i=-1;if(void 0!==t&&Array.isArray(e)){n=arguments.length<=2?"key":n;for(var r=0;r=0&&(0,o.isFunction)(n)&&n.columnIndex>=0?e.columnIndex===n.columnIndex&&(0,d.toComparable)(e.filterValue)===(0,d.toComparable)(n.filterValue):(0,d.toComparable)(e)==(0,d.toComparable)(n)},proxyMethod:function(t,e,n){t[e]||(t[e]=function(){var t=this._dataSource;return t?t[e].apply(t,arguments):n})},formatValue:function(t,e){var n=m.default.format(t,e.format)||t&&t.toString()||"",i={value:t,valueText:e.getDisplayFormat?e.getDisplayFormat(n):n,target:e.target||"row",groupInterval:e.groupInterval};return e.customizeText?e.customizeText.call(e,i):i.valueText},getFormatOptionsByColumn:function(t,e){return{format:t.format,getDisplayFormat:t.getDisplayFormat,customizeText:t.customizeText,target:e,trueText:t.trueText,falseText:t.falseText}},getDisplayValue:function(t,e,n,i){return t.displayValueMap&&void 0!==t.displayValueMap[e]?t.displayValueMap[e]:t.calculateDisplayValue&&n&&"group"!==i?t.calculateDisplayValue(n):!t.lookup||"group"===i&&(t.calculateGroupValue||t.calculateDisplayValue)?e:t.lookup.calculateCellValue(e)},getGroupRowSummaryText:function(e,n){for(var i="(",o=0;o0?", ":"")+t.exports.getSummaryText(r,n)}return i+")"},getSummaryText:function(t,e){var n=t.displayFormat||t.columnCaption&&e[t.summaryType+"OtherColumn"]||e[t.summaryType];return this.formatValue(t.value,{format:t.valueFormat,getDisplayFormat:function(e){return n?(0,s.format)(n,e,t.columnCaption):e},customizeText:t.customizeText})},normalizeSortingInfo:function(t){t=t||[];for(var e=(0,p.normalizeSortingInfo)(t),n=0;n0){var p=t.eq(h-1).offset();p.top").addClass(e.value?"dx-datagrid-group-opened":"dx-datagrid-group-closed").appendTo(n),r.setAria("label",e.value?r.localize("dxDataGrid-ariaCollapse"):r.localize("dxDataGrid-ariaExpand"),n)}}}},setEmptyText:y,isDateType:n,getSelectionRange:function(t){try{if(t)return{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}catch(e){}return{}},setSelectionRange:function(t,e){try{t&&t.setSelectionRange&&t.setSelectionRange(e.selectionStart,e.selectionEnd)}catch(n){}},focusAndSelectElement:function(t,e){v.default.trigger(e,"focus");var n=t.option("editing.selectTextOnEditStart"),i=t.getController("keyboardNavigation"),o=i&&i._isFastEditingStarted(),a=e.get(0);if(n&&!o&&e.is(".dx-texteditor-input")&&!e.is("[readonly]")){var s=w(e.closest(".dx-texteditor"));(0,r.when)(s&&s._loadItemDeferred).done((function(){a.select()}))}},getWidgetInstance:w,getLastResizableColumnIndex:function(t,e){var n,i=t.some((function(t){return t&&!t.command&&!t.fixed&&!1!==t.allowResizing}));for(n=t.length-1;t[n];n--){var o=t[n],r=e&&e[n],a=!i||!1!==o.allowResizing;if(!o.command&&!o.fixed&&"adaptiveHidden"!==r&&a)break}return n},isElementInCurrentGrid:function(t,e){return!(!e||!e.length)&&e.closest("."+t.getWidgetContainerClass()).parent().is(t.component.$element())}}}()},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e").text(a).addClass("dx-button-text"),d=(0,i.default)(r);d.append(c),"left"===l?d.prepend(u):(u.addClass("dx-icon-right"),d.append(u))}))}),b(S(g.prototype),"_initTemplates",this).call(this)}},{key:"_optionChanged",value:function(t){var e=t.name,n=t.previousValue;switch(e){case"onClick":this._updateClick();break;case"icon":case"text":this._updateContent(),this._updateAriaLabel();break;case"type":this._updateType(n),this._updateContent();break;case"_templateData":break;case"template":case"iconPosition":this._updateContent();break;case"stylingMode":this._updateStylingMode();break;case"useSubmitBehavior":this._updateSubmitInput();break;case"useInkRipple":this._invalidate();break;default:b(S(g.prototype),"_optionChanged",this).call(this,t)}}},{key:"_renderClick",value:function(){var t=this,e=this.$element();d.dxClick.off(e,{namespace:this.NAME}),d.dxClick.on(e,(function(e){return t._executeClickAction(e)}),{namespace:this.NAME}),this._updateClick()}},{key:"_renderInkRipple",value:function(){var t=this,e=this.option(),n=e.text,i=e.icon,o=e.type;if(e.useInkRipple){var a=!n&&i||"back"===o,s=r.default.render(a?{waveSizeCoefficient:1,useHoldAnimation:!1,isCentered:!0}:{}),l=function(e,n){var i=t.option(),o=i.activeStateEnabled;if(i.useInkRipple&&o&&!t._disposed){var r={element:t._$content(),event:e};n?s.showWave(r):s.hideWave(r)}};this._attachActiveEvents((function(t){var e=t.event;return l(e,!0)}),(function(t){var e=t.event;return l(e)}))}}},{key:"_renderStylingMode",value:function(){var t=this.$element(),e=this.option().stylingMode;-1===["contained","text","outlined"].indexOf(e)&&(e=this._getDefaultOptions().stylingMode),t.addClass("dx-button-mode-".concat(e))}},{key:"_renderSubmitInput",value:function(){if(this.option().useSubmitBehavior){var t=this._getSubmitAction(),e=this._$content();(0,i.default)("").attr("type","submit").attr("tabindex",-1).addClass("dx-button-submit-input").appendTo(e),d.click.on(this._$submitInput(),(function(e){return t({event:e})}))}}},{key:"_renderType",value:function(){var t=this.option().type,e=this.$element();t&&e.addClass("dx-button-".concat(t))}},{key:"_submitInput",value:function(){return this._$submitInput().get(0)}},{key:"_supportedKeys",value:function(){var t=this,e=function(e){e.preventDefault(),t._executeClickAction(e)};return(0,h.extend)(b(S(g.prototype),"_supportedKeys",this).call(this),{space:e,enter:e})}},{key:"_updateAriaLabel",value:function(){var t=this._getAriaTarget(),e=this.option(),n=e.icon,i=e.text;i||("image"===(0,p.getImageSourceType)(n)&&(n=-1===n.indexOf("base64")?n.replace(/.+\/([^.]+)\..+$/,"$1"):"Base64"),i=n||""),t.attr("aria-label",i||null)}},{key:"_updateClick",value:function(){var t=this;this._clickAction=this._createActionByOption("onClick",{excludeValidators:["readOnly"],afterExecute:function(){t.option().useSubmitBehavior&&setTimeout((function(){return t._submitInput().click()}))}})}},{key:"_updateContent",value:function(){var t=this.$element(),e=this._$content(),n=this._getContentData(),o=this.option(),r=o.template,a=o.iconPosition,s=n.icon,l=n.text;e.length?e.empty():e=(0,i.default)("
").addClass("dx-button-content").appendTo(t),t.toggleClass("dx-button-has-icon",!!s).toggleClass("dx-button-icon-right",!!s&&"left"!==a).toggleClass("dx-button-has-text",!!l);var u=(0,i.default)(this._getTemplateByOption("template").render({model:n,container:(0,m.getPublicElement)(e),transclude:this._templateManager.anonymousTemplateName===r}));u.hasClass("dx-template-wrapper")&&(u.addClass("dx-button-content"),e.replaceWith(u)),this._updateSubmitInput()}},{key:"_updateSubmitInput",value:function(){var t=this.option().useSubmitBehavior,e=this._$submitInput();!t&&e.length?e.remove():t&&!e.length&&this._renderSubmitInput()}},{key:"_updateStylingMode",value:function(){var t=this.$element();["contained","text","outlined"].map((function(t){return"dx-button-mode-".concat(t)})).forEach(t.removeClass.bind(t)),this._renderStylingMode()}},{key:"_updateType",value:function(t){var e=this.$element();[t,"back","danger","default","normal","success"].map((function(t){return"dx-button-".concat(t)})).forEach(e.removeClass.bind(e)),this._renderType()}},{key:"_validationGroupConfig",get:function(){return u.default.getGroupConfig(this._findGroup())}}])&&y(e.prototype,n),a&&y(e,a),g}(c.default);(0,a.default)("dxButton",k),t.exports=k,t.exports.default=t.exports},function(t,e,n){"use strict";var i=g(n(89)),o=n(2),r=g(n(5)),a=n(16),s=g(n(38)),l=n(385),u=n(276),c=n(277),d=g(n(386)),h=g(n(709)),f=n(193),p=g(n(74)),m=g(n(710));function g(t){return t&&t.__esModule?t:{default:t}}var _="undefined"!==typeof Intl,v={shortdate:"M/d/y",shorttime:"h:mm a",longdate:"EEEE, MMMM d, y",longtime:"h:mm:ss a",monthandday:"MMMM d",monthandyear:"MMMM y",quarterandyear:"QQQ y",day:"d",year:"y",shortdateshorttime:"M/d/y, h:mm a",longdatelongtime:"EEEE, MMMM d, y, h:mm:ss a",month:"LLLL",shortyear:"yy",dayofweek:"EEEE",quarter:"QQQ",hour:"HH",minute:"mm",second:"ss",millisecond:"SSS","datetime-local":"yyyy-MM-ddTHH':'mm':'ss"},y={year:["y","yy","yyyy"],day:["d","dd"],month:["M","MM","MMM","MMMM"],hours:["H","HH","h","hh","ah"],minutes:["m","mm"],seconds:["s","ss"],milliseconds:["S","SS","SSS"]},b=(0,i.default)({engine:function(){return"base"},_getPatternByFormat:function(t){return v[t.toLowerCase()]},_expandPattern:function(t){return this._getPatternByFormat(t)||t},formatUsesMonthName:function(t){return-1!==this._expandPattern(t).indexOf("MMMM")},formatUsesDayName:function(t){return-1!==this._expandPattern(t).indexOf("EEEE")},getFormatParts:function(t){var e=this._getPatternByFormat(t)||t,n=[];return r.default.each(e.split(/\W+/),(function(t,e){r.default.each(y,(function(t,i){(0,a.inArray)(e,i)>-1&&n.push(t)}))})),n},getMonthNames:function(t){return d.default.getMonthNames(t)},getDayNames:function(t){return d.default.getDayNames(t)},getQuarterNames:function(t){return d.default.getQuarterNames(t)},getPeriodNames:function(t){return d.default.getPeriodNames(t)},getTimeSeparator:function(){return":"},is24HourFormat:function(t){for(var e=new Date(2017,0,20,11,0,0,0),n=new Date(2017,0,20,23,0,0,0),i=this.format(e,t),o=this.format(n,t),r=0;r0&&(this._updateLockCount--,this._updateLockCount||this._endUpdateCore())},option:function(t){var e=this.component,n=e._optionCache;return 1===arguments.length&&n?(t in n||(n[t]=e.option(t)),n[t]):e.option.apply(e,arguments)},localize:function(t){var e=this.component._optionCache;return e?(t in e||(e[t]=h.default.format(t)),e[t]):h.default.format(t)},on:function(){return this.component.on.apply(this.component,arguments)},off:function(){return this.component.off.apply(this.component,arguments)},optionChanged:function(t){t.name in this._actions&&(this.createAction(t.name,this._actionConfigs[t.name]),t.handled=!0)},getAction:function(t){return this._actions[t]},setAria:function(t,e,n){var i=n.get(0),o="role"!==t&&"id"!==t?"aria-":"";i.setAttribute?i.setAttribute(o+t,e):n.attr(o+t,e)},_createComponent:function(){return this.component._createComponent.apply(this.component,arguments)},getController:function(t){return this.component._controllers[t]},createAction:function(t,e){if((0,l.isFunction)(t)){var n=this.component._createAction(t.bind(this),e);return function(t){n({event:t})}}this._actions[t]=this.component._createActionByOption(t,e),this._actionConfigs[t]=e},executeAction:function(t,e){var n=this._actions[t];return n&&n(e)},dispose:function(){var t=this;(0,c.each)(t.callbackNames()||[],(function(){t[this].empty()}))},addWidgetPrefix:function(t){return"dx-"+this.component.NAME.slice(2).toLowerCase()+(t?"-"+t:"")},getWidgetContainerClass:function(){var t="dxDataGrid"===this.component.NAME?null:"container";return this.addWidgetPrefix(t)}}),g=m,_=g.inherit({getView:function(t){return this.component._views[t]},getViews:function(){return this.component._views}}),v=m.inherit({_isReady:function(){return this.component.isReady()},_endUpdateCore:function(){this.callBase(),!this._isReady()&&this._requireReady&&(this._requireRender=!1,this.component._requireResize=!1),this._requireRender&&(this._requireRender=!1,this.render(this._$parent))},_invalidate:function(t,e){this._requireRender=!0,this.component._requireResize=(0,f.hasWindow)()&&(this.component._requireResize||t),this._requireReady=this._requireReady||e},_renderCore:function(){},_resizeCore:function(){},_afterRender:function(){},_parentElement:function(){return this._$parent},ctor:function(t){this.callBase(t),this.renderCompleted=(0,a.default)(),this.resizeCompleted=(0,a.default)()},element:function(){return this._$element},getElementHeight:function(){var t=this.element();if(!t)return 0;var e=parseFloat(t.css("marginTop"))||0,n=parseFloat(t.css("marginBottom"))||0;return t.get(0).offsetHeight+e+n},isVisible:function(){return!0},getTemplate:function(t){return this.component._getTemplate(t)},render:function(t,e){var n=this._$element,o=this.isVisible();(n||t)&&(this._requireReady=!1,n||(n=this._$element=(0,i.default)("
").appendTo(t),this._$parent=t),n.toggleClass("dx-hidden",!o),o&&(this.component._optionCache={},this._renderCore(e),this.component._optionCache=void 0,this._afterRender(t),this.renderCompleted.fire(e)))},resize:function(){this.isResizing=!0,this._resizeCore(),this.resizeCompleted.fire(),this.isResizing=!1},focus:function(){o.default.trigger(this.element(),"focus")}});t.exports={modules:[],View:v,ViewController:_,Controller:g,registerModule:function(t,e){for(var n=this.modules,i=0;i0)&&(t=r(t)),t})).join("")},e.humanize=function(t){return r(s(t).replace(/-/g," "))},e.titleize=function(t){return i(a(t),(function(t){return r(t.toLowerCase())})).join(" ")},e.underscore=function(t){return s(t).replace(/-/g,"_")},e.captionize=function(t){var e,n,i=[],o=!1,r=!1;for(e=0;e0&&i.push(" "),i.push(n),o=r;return i.join("")}},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(3),r=n(10).getWindow(),a=n(6),s=n(38),l=n(17).getPublicElement,u=n(0).extend,c=n(2),d=n(5),h=n(33),f=n(619),p=n(184),m=n(58),g=n(90),_=n(185),v=n(11),y=n(7),b=y.when,w=y.Deferred,x=v.addNamespace(_,"dxFX"),C=c.isFunction,S=c.isPlainObject,k=n(4).noop,I=/^([+-])=(.*)/i,T={initAnimation:function(t,e){t.css({transitionProperty:"none"}),"string"===typeof e.from?t.addClass(e.from):$(t,e.from);var n=this,i=new w,o=e.cleanupWhen;e.transitionAnimation={deferred:i,finish:function(){n._finishTransition(t),o?b(i,o).always((function(){n._cleanup(t,e)})):n._cleanup(t,e),i.resolveWith(t,[e,t])}},this._completeAnimationCallback(t,e).done((function(){e.transitionAnimation.finish()})).fail((function(){i.rejectWith(t,[e,t])})),e.duration||e.transitionAnimation.finish(),t.css("transform")},animate:function(t,e){return this._startAnimation(t,e),e.transitionAnimation.deferred.promise()},_completeAnimationCallback:function(t,e){var n,i=this,o=Date.now()+e.delay,r=new w,s=new w,l=new w,u=m.transitionEndEventName()+".dxFX";e.transitionAnimation.cleanup=function(){clearTimeout(n),clearTimeout(c),a.off(t,u),a.off(t,x)},a.one(t,u,(function(){Date.now()-o>=e.duration&&s.reject()})),a.off(t,x),a.on(t,x,(function(){i.stop(t,e),r.reject()}));var c=setTimeout((function(){n=setTimeout((function(){l.reject()}),e.duration+e.delay+Y._simulatedTransitionEndDelay),b(s,l).fail(function(){r.resolve()}.bind(this))}));return r.promise()},_startAnimation:function(t,e){t.css({transitionProperty:"all",transitionDelay:e.delay+"ms",transitionDuration:e.duration+"ms",transitionTimingFunction:e.easing}),"string"===typeof e.to?t[0].className+=" "+e.to:e.to&&$(t,e.to)},_finishTransition:function(t){t.css("transition","none")},_cleanup:function(t,e){e.transitionAnimation.cleanup(),"string"===typeof e.from&&(t.removeClass(e.from),t.removeClass(e.to))},stop:function(t,e,n){e&&(n?e.transitionAnimation.finish():(S(e.to)&&d.each(e.to,(function(e){t.css(e,t.css(e))})),this._finishTransition(t),this._cleanup(t,e)))}},E={initAnimation:function(t,e){$(t,e.from)},animate:function(t,e){var n=new w,i=this;return e?(d.each(e.to,(function(n){void 0===e.from[n]&&(e.from[n]=i._normalizeValue(t.css(n)))})),e.to.transform&&(e.from.transform=i._parseTransform(e.from.transform),e.to.transform=i._parseTransform(e.to.transform)),e.frameAnimation={to:e.to,from:e.from,currentValue:e.from,easing:f.convertTransitionTimingFuncToEasing(e.easing),duration:e.duration,startTime:(new Date).valueOf(),finish:function(){this.currentValue=this.to,this.draw(),p.cancelAnimationFrame(e.frameAnimation.animationFrameId),n.resolve()},draw:function(){if(e.draw)e.draw(this.currentValue);else{var n=u({},this.currentValue);n.transform&&(n.transform=d.map(n.transform,(function(t,e){return"translate"===e?h.getTranslateCss(t):"scale"===e?"scale("+t+")":"rotate"===e.substr(0,e.length-1)?e+"("+t+"deg)":void 0})).join(" ")),t.css(n)}}},e.delay?(e.frameAnimation.startTime+=e.delay,e.frameAnimation.delayTimeout=setTimeout((function(){i._startAnimation(t,e)}),e.delay)):i._startAnimation(t,e),n.promise()):n.reject().promise()},_startAnimation:function(t,e){a.off(t,x),a.on(t,x,(function(){e.frameAnimation&&p.cancelAnimationFrame(e.frameAnimation.animationFrameId)})),this._animationStep(t,e)},_parseTransform:function(t){var e={};return d.each(t.match(/(\w|\d)+\([^)]*\)\s*/g),(function(t,n){var i=h.parseTranslate(n),o=n.match(/scale\((.+?)\)/),r=n.match(/(rotate.)\((.+)deg\)/);i&&(e.translate=i),o&&o[1]&&(e.scale=parseFloat(o[1])),r&&r[1]&&(e[r[1]]=parseFloat(r[2]))})),e},stop:function(t,e,n){var i=e&&e.frameAnimation;i&&(p.cancelAnimationFrame(i.animationFrameId),clearTimeout(i.delayTimeout),n&&i.finish(),delete e.frameAnimation)},_animationStep:function(t,e){var n=e&&e.frameAnimation;if(n){var i=(new Date).valueOf();if(i>=n.startTime+n.duration)n.finish();else{n.currentValue=this._calcStepValue(n,i-n.startTime),n.draw();var o=this;n.animationFrameId=p.requestAnimationFrame((function(){o._animationStep(t,e)}))}}},_calcStepValue:function(t,e){return function n(o,r){var a=Array.isArray(r)?[]:{};return d.each(r,(function(s,l){if("string"===typeof l&&!1===parseFloat(l,10))return!0;a[s]="object"===i(l)?n(o[s],l):function(n){var i=e/t.duration,a=e,s=1*o[n],l=r[n]-o[n],u=t.duration;return f.getEasing(t.easing)(i,a,s,l,u)}(s)})),a}(t.from,t.to)},_normalizeValue:function(t){var e=parseFloat(t,10);return!1===e?t:e}},O={initAnimation:function(){},animate:function(){return(new w).resolve().promise()},stop:k,isSynchronous:!0},M=function(t,e,n,i){d.each(["from","to"],(function(){if(!n(t[this]))throw s.Error("E0010",e,this,i)}))},P=function(t,e){return M(t,e,(function(t){return S(t)}),"a plain object")},D={top:{my:"bottom center",at:"top center"},bottom:{my:"top center",at:"bottom center"},right:{my:"left center",at:"right center"},left:{my:"right center",at:"left center"}},A={validateConfig:function(t){P(t,"slide")},setup:function(t,e){var n=h.locate(t);if("slide"!==e.type){var i="slideIn"===e.type?e.from:e.to;i.position=u({of:r},D[e.direction]),q(t,i)}this._setUpConfig(n,e.from),this._setUpConfig(n,e.to),h.clearCache(t)},_setUpConfig:function(t,e){e.left="left"in e?e.left:"+=0",e.top="top"in e?e.top:"+=0",this._initNewPosition(t,e)},_initNewPosition:function(t,e){var n={left:e.left,top:e.top};delete e.left,delete e.top;var i=this._getRelativeValue(n.left);void 0!==i?n.left=i+t.left:e.left=0,void 0!==(i=this._getRelativeValue(n.top))?n.top=i+t.top:e.top=0,e.transform=h.getTranslateCss({x:n.left,y:n.top})},_getRelativeValue:function(t){var e;if("string"===typeof t&&(e=I.exec(t)))return parseInt(e[1]+"1")*e[2]}},R={setup:function(t,e){var n,i=e.from,o=S(i)?e.skipElementInitialStyles?0:t.css("opacity"):String(i);switch(e.type){case"fadeIn":n=1;break;case"fadeOut":n=0;break;default:n=String(e.to)}e.from={visibility:"visible",opacity:o},e.to={opacity:n}}},B={custom:{setup:function(){}},slide:A,slideIn:A,slideOut:A,fade:R,fadeIn:R,fadeOut:R,pop:{validateConfig:function(t){P(t,"pop")},setup:function(t,e){var n=e.from,i=e.to,o="opacity"in n?n.opacity:t.css("opacity"),r="opacity"in i?i.opacity:1,a="scale"in n?n.scale:0,s="scale"in i?i.scale:1;e.from={opacity:o};var l=h.getTranslate(t);e.from.transform=this._getCssTransform(l,a),e.to={opacity:r},e.to.transform=this._getCssTransform(l,s)},_getCssTransform:function(t,e){return h.getTranslateCss(t)+"scale("+e+")"}},css:{validateConfig:function(t){!function(t,e){M(t,e,(function(t){return"string"===typeof t}),"a string")}(t,"css")},setup:function(){}}},N={type:"custom",from:{},to:{},duration:400,start:k,complete:k,easing:"ease",delay:0},L={duration:400,easing:"ease",delay:0};function F(){var t=this.element,e=this.config;if(q(t,e.from),q(t,e.to),this.configurator.setup(t,e),t.data("dxAnimData",this),Y.off&&(e.duration=0,e.delay=0),this.strategy.initAnimation(t,e),e.start){var n=l(t);e.start.apply(this,[n,e])}}var V=function(){var t=this,e=t.element,n=t.config;return t.isStarted=!0,t.strategy.animate(e,n).done((function(){!function(t){var e=t.element,n=t.config;if(e.removeData("dxAnimData"),n.complete){var i=l(e);n.complete.apply(this,[i,n])}t.deferred.resolveWith(this,[e,n])}(t)})).fail((function(){t.deferred.rejectWith(this,[e,n])}))},z=function(t){var e=this.element,n=this.config;clearTimeout(this.startTimeout),this.isStarted||this.start(),this.strategy.stop(e,n,t)},j=v.addNamespace(_,"dxFXStartAnimation"),H=function(t,e){var n="css"===e.type?L:N,i=u(!0,{},n,e),r=function(t){var e=B[t.type];if(!e)throw s.Error("E0011",t.type);return e}(i),l=function(t){t=t||{};var e={transition:m.transition()?T:E,frame:E,noAnimation:O},n=t.strategy||"transition";return"css"!==t.type||m.transition()||(n="noAnimation"),e[n]}(i),c={element:o(t),config:i,configurator:r,strategy:l,isSynchronous:l.isSynchronous,setup:F,start:V,stop:z,deferred:new w};return C(r.validateConfig)&&r.validateConfig(i),function(t){a.off(t.element,j),a.on(t.element,j,(function(){Y.stop(t.element)})),t.deferred.always((function(){a.off(t.element,j)}))}(c),c};function W(t){return t.data("dxAnimQueue")||[]}var U=function(t){t.removeData("dxAnimQueue")};function G(t){return!!t.data("dxAnimData")}function K(t,e){if((e=W(t)).length){var n=e.shift();0===e.length&&U(t),function(t){t.setup(),Y.off||t.isSynchronous?t.start():t.startTimeout=setTimeout((function(){t.start()}));return t.deferred.promise()}(n).done((function(){G(t)||K(t)}))}}function q(t,e){if(e&&e.position){var n=o(r),i=0,a=0,s=g.calculate(t,e.position),l=t.offset(),c=t.position();c.top>l.top&&(a=n.scrollTop()),c.left>l.left&&(i=n.scrollLeft()),u(e,{left:s.h.location-l.left+c.left-i,top:s.v.location-l.top+c.top-a}),delete e.position}}function $(t,e){d.each(e,(function(e,n){try{t.css(e,c.isFunction(n)?n():n)}catch(i){}}))}var Y={off:!1,animationTypes:B,animate:function(t,e){var n=o(t);if(!n.length)return(new w).resolve().promise();var i=H(n,e);return function(t,e){var n=W(t);(function(t,e){t.data("dxAnimQueue",e)})(t,n),n.push(e),G(t)||K(t,n)}(n,i),i.deferred.promise()},createAnimation:H,isAnimating:G,stop:function(t,e){var n=o(t),i=W(n);d.each(i,(function(t,e){e.config.delay=0,e.config.duration=0,e.isSynchronous=!0})),G(n)||K(n,i);var r=n.data("dxAnimData");r&&r.stop(e),n.removeData("dxAnimData"),U(n)},_simulatedTransitionEndDelay:100};t.exports=Y,t.exports.default=t.exports},function(t,e,n){"use strict";var i=k(n(33)),o=k(n(8)),r=k(n(18)),a=n(17),s=k(a),l=k(n(3)),u=n(98),c=n(16),d=k(n(31)),h=n(4),f=n(0),p=n(46),m=n(5),g=k(n(212)),_=n(24),v=n(2),y=n(187),b=k(n(10)),w=k(n(12)),x=k(n(42)),C=k(n(80)),S=k(n(36));function k(t){return t&&t.__esModule?t:{default:t}}var I=b.default.getWindow();n(374);var T=["cancel","clear","done"],E=d.default.msie&&11===parseInt(d.default.version),O=d.default.safari&&(0,y.compare)(d.default.version,[11])<0,M={static:"",inherit:"dx-popup-inherit-height",flex:"dx-popup-flex-height"},P=C.default.inherit({_getDefaultOptions:function(){return(0,f.extend)(this.callBase(),{fullScreen:!1,title:"",showTitle:!0,titleTemplate:"title",onTitleRendered:null,dragEnabled:!1,toolbarItems:[],showCloseButton:!1,bottomTemplate:"bottom",useDefaultToolbarButtons:!1,useFlatToolbarButtons:!1,autoResizeEnabled:!0})},_defaultOptionsRules:function(){var t=S.default.current();return this.callBase().concat([{device:{platform:"ios"},options:{animation:this._iosAnimation}},{device:{platform:"android"},options:{animation:this._androidAnimation}},{device:{platform:"generic"},options:{showCloseButton:!0}},{device:function(t){return"desktop"===r.default.real().deviceType&&"generic"===t.platform},options:{dragEnabled:!0}},{device:function(){return"desktop"===r.default.real().deviceType&&!r.default.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return S.default.isMaterial(t)},options:{useDefaultToolbarButtons:!0,useFlatToolbarButtons:!0}}])},_iosAnimation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom"}},to:{position:{my:"center",at:"center"}}},hide:{type:"slide",duration:400,from:{opacity:1,position:{my:"center",at:"center"}},to:{opacity:1,position:{my:"top",at:"bottom"}}}},_androidAnimation:function(){return this.option("fullScreen")?{show:{type:"slide",duration:300,from:{top:"30%",opacity:0},to:{top:0,opacity:1}},hide:{type:"slide",duration:300,from:{top:0,opacity:1},to:{top:"30%",opacity:0}}}:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}}},_init:function(){this.callBase(),this.$element().addClass("dx-popup"),this._wrapper().addClass("dx-popup-wrapper"),this._$popupContent=this._$content.wrapInner((0,l.default)("
").addClass("dx-popup-content")).children().eq(0)},_render:function(){var t=this.option("fullScreen");this._toggleFullScreenClass(t),this.callBase()},_toggleFullScreenClass:function(t){this._$content.toggleClass("dx-popup-fullscreen",t).toggleClass("dx-popup-normal",!t)},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({title:new u.EmptyTemplate,bottom:new u.EmptyTemplate})},_renderContentImpl:function(){this._renderTitle(),this.callBase(),this._renderBottom()},_renderTitle:function(){var t=this._getToolbarItems("top"),e=this.option("title"),n=this.option("showTitle");if(n&&e&&t.unshift({location:r.default.current().ios?"center":"before",text:e}),n||t.length>0){this._$title&&this._$title.remove();var i=(0,l.default)("
").addClass("dx-popup-title").insertBefore(this.$content());this._$title=this._renderTemplateByType("titleTemplate",t,i).addClass("dx-popup-title"),this._renderDrag(),this._executeTitleRenderAction(this._$title)}else this._$title&&this._$title.detach()},_renderTemplateByType:function(t,e,n,i){var o=this._getTemplateByOption(t);if(o instanceof u.EmptyTemplate){var r=(0,f.extend)({},this.option("integrationOptions"),{skipTemplates:["content","title"]}),s=(0,f.extend)(i,{items:e,rtlEnabled:this.option("rtlEnabled"),useDefaultButtons:this.option("useDefaultToolbarButtons"),useFlatButtons:this.option("useFlatToolbarButtons"),integrationOptions:r});this._getTemplate("dx-polymorph-widget").render({container:n,model:{widget:"dxToolbarBase",options:s}});var c=n.children("div");return n.replaceWith(c),c}var d=(0,l.default)(o.render({container:(0,a.getPublicElement)(n)}));return d.hasClass("dx-template-wrapper")&&(n.replaceWith(d),n=d),n},_executeTitleRenderAction:function(t){this._getTitleRenderAction()({titleElement:(0,a.getPublicElement)(t)})},_getTitleRenderAction:function(){return this._titleRenderAction||this._createTitleRenderAction()},_createTitleRenderAction:function(){return this._titleRenderAction=this._createActionByOption("onTitleRendered",{element:this.element(),excludeValidators:["disabled","readOnly"]})},_getCloseButton:function(){return{toolbar:"top",location:"after",template:this._getCloseButtonRenderer()}},_getCloseButtonRenderer:function(){return function(t,e,n){var i=(0,l.default)("
").addClass("dx-closebutton");this._createComponent(i,x.default,{icon:"close",onClick:this._createToolbarItemAction(void 0),integrationOptions:{}}),(0,l.default)(n).append(i)}.bind(this)},_getToolbarItems:function(t){var e=this.option("toolbarItems"),n=[];this._toolbarItemClasses=[];var i=r.default.current().platform,o=0;return(0,m.each)(e,function(e,a){var s=(0,v.isDefined)(a.shortcut),l=s?function(t){var e=r.default.current(),n=e.platform,i="bottom",o="before";if("ios"===n)switch(t){case"cancel":i="top";break;case"clear":i="top",o="after";break;case"done":o="after"}else if("android"===n&&e.version&&parseInt(e.version[0])>4)switch(t){case"cancel":o="after";break;case"done":o="after"}else"android"===n&&(o="center");return{toolbar:i,location:o}}(a.shortcut):a;if(s&&"ios"===i&&o<2&&(l.toolbar="top",o++),l.toolbar=a.toolbar||l.toolbar||"top",l&&l.toolbar===t){s&&(0,f.extend)(l,{location:a.location},this._getToolbarItemByAlias(a));var u="generic"===i;"done"===a.shortcut&&u||"cancel"===a.shortcut&&!u?n.unshift(l):n.push(l)}}.bind(this)),"top"===t&&this.option("showCloseButton")&&this.option("showTitle")&&n.push(this._getCloseButton()),n},_getLocalizationKey:function(t){return"done"===t.toLowerCase()?"OK":(0,p.camelize)(t,!0)},_getToolbarItemByAlias:function(t){var e=this,n=t.shortcut;if((0,c.inArray)(n,T)<0)return!1;var i=(0,f.extend)({text:w.default.format(this._getLocalizationKey(n)),onClick:this._createToolbarItemAction(t.onClick),integrationOptions:{},type:e.option("useDefaultToolbarButtons")?"default":"normal",stylingMode:e.option("useFlatToolbarButtons")?"text":"contained"},t.options||{}),o="dx-popup-"+n;return this._toolbarItemClasses.push(o),{template:function(t,n,r){var a=(0,l.default)("
").addClass(o).appendTo(r);e._createComponent(a,x.default,i)}}},_createToolbarItemAction:function(t){return this._createAction(t,{afterExecute:function(t){t.component.hide()}})},_renderBottom:function(){var t=this._getToolbarItems("bottom");if(t.length){this._$bottom&&this._$bottom.remove();var e=(0,l.default)("
").addClass("dx-popup-bottom").insertAfter(this.$content());this._$bottom=this._renderTemplateByType("bottomTemplate",t,e,{compactMode:!0}).addClass("dx-popup-bottom"),this._toggleClasses()}else this._$bottom&&this._$bottom.detach()},_toggleClasses:function(){var t=T;(0,m.each)(t,function(t,e){var n="dx-popup-"+e;(0,c.inArray)(n,this._toolbarItemClasses)>=0?(this._wrapper().addClass(n+"-visible"),this._$bottom.addClass(n)):(this._wrapper().removeClass(n+"-visible"),this._$bottom.removeClass(n))}.bind(this))},_getContainer:function(){return this.option("fullScreen")?(0,l.default)(I):this.callBase()},_getDragTarget:function(){return this.topToolbar()},_renderGeometryImpl:function(t){t||this._resetContentHeight(),this.callBase.apply(this,arguments),this._setContentHeight()},_resetContentHeight:function(){this._$popupContent.css({height:"auto",maxHeight:"none"})},_renderDrag:function(){this.callBase(),this._$content.toggleClass("dx-popup-draggable",this.option("dragEnabled"))},_renderResize:function(){this.callBase(),this._resizable.option("onResize",function(){this._setContentHeight(),this._actions.onResize(arguments)}.bind(this))},_setContentHeight:function(){(this.option("forceApplyBindings")||h.noop)();var t=this.overlayContent().get(0),e=this._chooseHeightStrategy(t);this.$content().css(this._getHeightCssStyles(e,t)),this._setHeightClasses(this.overlayContent(),e)},_heightStrategyChangeOffset:function(t,e){return t===M.flex?-e:0},_chooseHeightStrategy:function(t){var e="auto"===t.style.width||""===t.style.width,n=M.static;return this._isAutoHeight()&&this.option("autoResizeEnabled")&&(e||O?E||(n=M.inherit):n=M.flex),n},_getHeightCssStyles:function(t,e){var n={},i=this._getOptionValue("maxHeight",e),o=this._getOptionValue("minHeight",e),r=this._splitPopupHeight(),a=r.header+r.footer+r.contentVerticalOffsets+r.popupVerticalOffsets+this._heightStrategyChangeOffset(t,r.popupVerticalPaddings);if(t===M.static){if(!this._isAutoHeight()||i||o){var s=(this.option("fullScreen")?Math.min((0,_.getBoundingRect)(e).height,b.default.getWindow().innerHeight):(0,_.getBoundingRect)(e).height)-a;n={height:Math.max(0,s),minHeight:"auto",maxHeight:"auto"}}}else{var u=(0,l.default)(this._getContainer()).get(0),c=g.default.addOffsetToMaxHeight(i,-a,u);n={height:"auto",minHeight:g.default.addOffsetToMinHeight(o,-a,u),maxHeight:c}}return n},_setHeightClasses:function(t,e){var n="";for(var i in M)M[i]!==e&&(n+=" "+M[i]);t.removeClass(n).addClass(e)},_isAutoHeight:function(){return"auto"===this.overlayContent().get(0).style.height},_splitPopupHeight:function(){var t=this.topToolbar(),e=this.bottomToolbar();return{header:g.default.getVisibleHeight(t&&t.get(0)),footer:g.default.getVisibleHeight(e&&e.get(0)),contentVerticalOffsets:g.default.getVerticalOffsets(this.overlayContent().get(0),!0),popupVerticalOffsets:g.default.getVerticalOffsets(this.$content().get(0),!0),popupVerticalPaddings:g.default.getVerticalOffsets(this.$content().get(0),!1)}},_useFixedPosition:function(){return this.callBase()||this.option("fullScreen")},_toggleSafariFullScreen:function(t){this._useFixedPosition()&&t&&!this._isShown?this._bodyScrollTop=t?I.pageYOffset:void 0:this._toggleSafariScrolling(!t)},_renderDimensions:function(){this.option("fullScreen")?this._$content.css({width:"100%",height:"100%"}):this.callBase.apply(this,arguments),b.default.hasWindow()&&this._renderFullscreenWidthClass()},_renderFullscreenWidthClass:function(){this.overlayContent().toggleClass("dx-popup-fullscreen-width",this.overlayContent().outerWidth()===(0,l.default)(I).width())},refreshPosition:function(){this._renderPosition()},_renderPosition:function(){if(!this.option("fullScreen"))return(this.option("forceApplyBindings")||h.noop)(),this.callBase.apply(this,arguments);i.default.move(this._$content,{top:0,left:0})},_optionChanged:function(t){switch(t.name){case"showTitle":case"title":case"titleTemplate":this._renderTitle(),this._renderGeometry();break;case"bottomTemplate":this._renderBottom(),this._renderGeometry();break;case"onTitleRendered":this._createTitleRenderAction(t.value);break;case"toolbarItems":case"useDefaultToolbarButtons":case"useFlatToolbarButtons":var e=!t.fullName.match(/^toolbarItems((\[\d+\])(\.(options|visible).*)?)?$/);this._renderTitle(),this._renderBottom(),e&&this._renderGeometry();break;case"dragEnabled":this._renderDrag();break;case"autoResizeEnabled":this._renderGeometry(),s.default.triggerResizeEvent(this._$content);break;case"fullScreen":this._toggleFullScreenClass(t.value),this._toggleSafariFullScreen(t.value),this._renderGeometry(),s.default.triggerResizeEvent(this._$content);break;case"showCloseButton":this._renderTitle();break;default:this.callBase(t)}},bottomToolbar:function(){return this._$bottom},topToolbar:function(){return this._$title},$content:function(){return this._$popupContent},content:function(){return(0,a.getPublicElement)(this._$popupContent)},overlayContent:function(){return this._$content}});(0,o.default)("dxPopup",P),t.exports=P,t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return S})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return C}));var i=n(75),o=n(1),r=n.n(o),a=(n(9),n(88)),s=n(341),l=n(76),u=n(41),c=n(342),d=n.n(c),h=(n(248),n(71)),f=(n(210),function(t){var e=Object(s.a)();return e.displayName=t,e}("Router-History")),p=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router"),m=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(i.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return r.a.createElement(p.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},r.a.createElement(f.Provider,{children:this.props.children||null,value:this.props.history}))},e}(r.a.Component);r.a.Component;var g=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},e}(r.a.Component);var _={},v=0;function y(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(_[t])return _[t];var e=d.a.compile(t);return v<1e4&&(_[t]=e,v++),e}(t)(e,{pretty:!0})}function b(t){var e=t.computedMatch,n=t.to,i=t.push,o=void 0!==i&&i;return r.a.createElement(p.Consumer,null,(function(t){t||Object(l.a)(!1);var i=t.history,s=t.staticContext,c=o?i.push:i.replace,d=Object(a.c)(e?"string"===typeof n?y(n,e.params):Object(u.a)({},n,{pathname:y(n.pathname,e.params)}):n);return s?(c(d),null):r.a.createElement(g,{onMount:function(){c(d)},onUpdate:function(t,e){var n=Object(a.c)(e.to);Object(a.f)(n,Object(u.a)({},d,{key:n.key}))||c(d)},to:n})}))}var w={},x=0;function C(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var n=e,i=n.path,o=n.exact,r=void 0!==o&&o,a=n.strict,s=void 0!==a&&a,l=n.sensitive,u=void 0!==l&&l;return[].concat(i).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var i=function(t,e){var n=""+e.end+e.strict+e.sensitive,i=w[n]||(w[n]={});if(i[t])return i[t];var o=[],r={regexp:d()(t,o,e),keys:o};return x<1e4&&(i[t]=r,x++),r}(n,{end:r,strict:s,sensitive:u}),o=i.regexp,a=i.keys,l=o.exec(t);if(!l)return null;var c=l[0],h=l.slice(1),f=t===c;return r&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:a.reduce((function(t,e,n){return t[e.name]=h[n],t}),{})}}),null)}var S=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.render=function(){var t=this;return r.a.createElement(p.Consumer,null,(function(e){e||Object(l.a)(!1);var n=t.props.location||e.location,i=t.props.computedMatch?t.props.computedMatch:t.props.path?C(n.pathname,t.props):e.match,o=Object(u.a)({},e,{location:n,match:i}),a=t.props,s=a.children,c=a.component,d=a.render;return Array.isArray(s)&&0===s.length&&(s=null),r.a.createElement(p.Provider,{value:o},o.match?s?"function"===typeof s?s(o):s:c?r.a.createElement(c,o):d?d(o):null:"function"===typeof s?s(o):null)}))},e}(r.a.Component);function k(t){return"/"===t.charAt(0)?t:"/"+t}function I(t,e){if(!t)return e;var n=k(t);return 0!==e.pathname.indexOf(n)?e:Object(u.a)({},e,{pathname:e.pathname.substr(n.length)})}function T(t){return"string"===typeof t?t:Object(a.e)(t)}function E(t){return function(){Object(l.a)(!1)}}function O(){}r.a.Component;r.a.Component;r.a.useContext},function(t,e){var n,i,o=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:r}catch(t){n=r}try{i="function"===typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(l=u,u=[];++d1)for(var n=1;n=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(t).length;default:if(i)return z(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return E(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function _(t,e,n,i,o){if(0===t.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,i,o);if("number"===typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,i,o){var r,a=1,s=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var c=-1;for(r=n;rs&&(n=s-l),r=n;r>=0;r--){for(var d=!0,h=0;ho&&(i=o):i=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");i>r/2&&(i=r/2);for(var a=0;a>8,o=n%256,r.push(o),r.push(i);return r}(e,t.length-n),t,n,i)}function k(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function I(t,e,n){n=Math.min(t.length,n);for(var i=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128===(192&(r=t[o+1]))&&(l=(31&u)<<6|63&r)>127&&(c=l);break;case 3:r=t[o+1],a=t[o+2],128===(192&r)&&128===(192&a)&&(l=(15&u)<<12|(63&r)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:r=t[o+1],a=t[o+2],s=t[o+3],128===(192&r)&&128===(192&a)&&128===(192&s)&&(l=(15&u)<<18|(63&r)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),o+=d}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",i=0;for(;i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,i,o){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var r=(o>>>=0)-(i>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(r,a),u=this.slice(i,o),c=t.slice(e,n),d=0;do)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var r=!1;;)switch(i){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,e,n){var i="";n=Math.min(t.length,n);for(var o=e;oi)&&(n=i);for(var o="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,i,o,r){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function A(t,e,n,i){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-n,2);o>>8*(i?o:1-o)}function R(t,e,n,i){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-n,4);o>>8*(i?o:3-o)&255}function B(t,e,n,i,o,r){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,i,r){return r||B(t,0,n,4),o.write(t,e,n,i,23,4),n+4}function L(t,e,n,i,r){return r||B(t,0,n,8),o.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(o*=256);)i+=this[t+--e]*o;return i},l.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var i=this[t],o=1,r=0;++r=(o*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var i=e,o=1,r=this[t+--i];i>0&&(o*=256);)r+=this[t+--i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||D(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,r=0;for(this[e]=255&t;++r=0&&(r*=256);)this[e+o]=t/r&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):A(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):A(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var o=Math.pow(2,8*n-1);D(this,t,e,n,o-1,-o)}var r=0,a=1,s=0;for(this[e]=255&t;++r>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var o=Math.pow(2,8*n-1);D(this,t,e,n,o-1,-o)}var r=n-1,a=1,s=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===s&&0!==this[e+r+1]&&(s=1),this[e+r]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):A(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):A(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(r=e;r55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function j(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,n,i){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(56))},function(t,e,n){"use strict";function i(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(u){return void n(u)}s.done?e(l):Promise.resolve(l).then(i,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var a=t.apply(e,n);function s(t){i(a,o,r,s,l,"next",t)}function l(t){i(a,o,r,s,l,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";var i=n(2),o=n(129),r=function(){function t(){}return function(e){return t.prototype=e,new t}}(),a=function(t,e,n,i){!i&&o.isWrapped(t[e])?o.assign(t[e],n):t[e]=n};e.clone=r,e.orderEach=function(t,e){var n,o,r=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.push(n);for(r.sort((function(t,e){var n=i.isNumeric(t),o=i.isNumeric(e);return n&&o?t-e:n&&!o?-1:!n&&o?1:te?1:0})),o=0;o","g")];return function(e){return String(e).replace(t[0],"&").replace(t[1],""").replace(t[2],"'").replace(t[3],"<").replace(t[4],">")}}(),a=function(t,e,n){return t.replace(new RegExp("("+(e+"").replace(/([+*?.[^\]$(){}><|=!:])/g,"\\$1")+")","gi"),n)},s=function(){var t=/\s/g;return function(e){return!e||!e.replace(t,"")}}();e.encodeHtml=r,e.quadToObject=function(t){var e=function(t){switch(i(t)){case"string":return t.split(/\s+/,4);case"object":return[t.x||t.h||t.left,t.y||t.v||t.top,t.x||t.h||t.right,t.y||t.v||t.bottom];case"number":return[t];default:return t}}(t),n=parseInt(e&&e[0],10),o=parseInt(e&&e[1],10),r=parseInt(e&&e[2],10),a=parseInt(e&&e[3],10);return isFinite(n)||(n=0),isFinite(o)||(o=n),isFinite(r)||(r=n),isFinite(a)||(a=o),{top:o,right:r,bottom:a,left:n}},e.format=function(){var t,e,n,i=arguments[0],r=[].slice.call(arguments).slice(1);if(o.isFunction(i))return i.apply(this,r);for(var a=0;a=0&&(t="$".replace("$","$$").length,n=n.replace("$",1===t?"$$$$":"$$")),i=i.replace(e,n);return i},e.replaceAll=a,e.isEmpty=s},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=s(n(253)),o=s(n(15)),r=s(n(6)),a=s(n(255));function s(t){return t&&t.__esModule?t:{default:t}}var l,u=new i.default,c=new a.default,d=function(){},h=function(){},f=e.setDataStrategy=function(t){c.fire(t);var e=(l=t).cleanData;l.cleanData=function(t){d(t);var n=e.call(this,t);return h(t),n}};f({data:function(){var t=arguments[0],e=arguments[1],n=arguments[2];if(t){var i=u.get(t);return i||(i={},u.set(t,i)),void 0===e?i:2===arguments.length?i[e]:(i[e]=n,n)}},removeData:function(t,e){if(t)if(void 0===e)u.delete(t);else{var n=u.get(t);n&&delete n[e]}},cleanData:function(t){for(var e=0;e-1||o}(),e.styleProp=u.default.styleProp,e.stylePropPrefix=u.default.stylePropPrefix,e.supportProp=_,e.inputType=function(t){if("text"===t)return!0;var e=(0,o.createElement)("input");try{return e.setAttribute("type",t),e.value="wrongValue",!e.value}catch(n){return!1}}},function(t,e,n){!function(e,i,o){var r;t.exports=(r=n(35),n(151),void(r.lib.Cipher||function(t){var e=r,n=e.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=e.enc,l=(s.Utf8,s.Base64),u=e.algo.EvpKDF,c=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?y:_}return function(e){return{encrypt:function(n,i,o){return t(i).encrypt(e,n,i,o)},decrypt:function(n,i,o){return t(i).decrypt(e,n,i,o)}}}}()}),d=(n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),e.mode={}),h=n.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),f=d.CBC=function(){var t=h.extend();function e(t,e,n){var i,o=this._iv;o?(i=o,this._iv=void 0):i=this._prevBlock;for(var r=0;r>>2];t.sigBytes-=e}},m=(n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:p}),reset:function(){var t;c.reset.call(this);var e=this.cfg,n=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(i,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(e):e).toString(l)},parse:function(t){var e,n=l.parse(t),i=n.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=o.create(i.slice(2,4)),i.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:e})}},_=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(t,e,n,i){i=this.cfg.extend(i);var o=t.createEncryptor(n,i),r=o.finalize(e),a=o.cfg;return m.create({ciphertext:r,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,n,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(n,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),v=(e.kdf={}).OpenSSL={execute:function(t,e,n,i){i||(i=o.random(8));var r=u.create({keySize:e+n}).compute(t,i),a=o.create(r.words.slice(e),4*n);return r.sigBytes=4*e,m.create({key:r,iv:a,salt:i})}},y=n.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:v}),encrypt:function(t,e,n,i){var o=(i=this.cfg.extend(i)).kdf.execute(n,t.keySize,t.ivSize);i.iv=o.iv;var r=_.encrypt.call(this,t,e,o.key,i);return r.mixIn(o),r},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var o=i.kdf.execute(n,t.keySize,t.ivSize,e.salt);return i.iv=o.iv,_.decrypt.call(this,t,e,o.key,i)}})}()))}()},function(t,e,n){"use strict";var i=n(2),o=d(i),r=d(n(15)),a=n(77),s=n(10),l=n(5),u=n(7),c=n(4);function d(t){return t&&t.__esModule?t:{default:t}}function h(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);nt?e:t}},avg:{seed:[0,0],step:function(t,e){return[t[0]+e,t[1]+1]},finalize:function(t){return t[1]?t[0]/t[1]:NaN}}},g=function(){var t,e=0;return{obtain:function(){0===e&&(t=new u.Deferred),e++},release:function(){--e<1&&t.resolve()},promise:function(){return(0===e?(new u.Deferred).resolve():t).promise()},reset:function(){e=0,t&&t.resolve()}}}();var _={XHR_ERROR_UNLOAD:"DEVEXTREME_XHR_ERROR_UNLOAD",normalizeBinaryCriterion:function(t){return[t[0],t.length<3?"=":String(t[1]).toLowerCase(),t.length<2||t[t.length-1]]},normalizeSortingInfo:function(t){return Array.isArray(t)||(t=[t]),(0,l.map)(t,(function(t){var e={selector:(0,i.isFunction)(t)||"string"===typeof t?t:t.getter||t.field||t.selector,desc:!(!t.desc&&"d"!==String(t.dir).charAt(0).toLowerCase())};return t.compare&&(e.compare=t.compare),e}))},errorMessageFromXhr:p,aggregators:m,keysEqual:function(t,e,n){if(Array.isArray(t)){for(var i,o=(0,l.map)(e,(function(t,e){return e})),r=0;r>6),128+(63&e)):e<65536?i.push(224+(e>>12),128+(e>>6&63),128+(63&e)):e<2097152&&i.push(240+(e>>18),128+(e>>12&63),128+(e>>6&63),128+(63&e));return i}(String(t)));var e="";function n(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)}for(var i=0;i>2,(3&o)<<4|r>>4,isNaN(r)?64:(15&r)<<2|a>>6,isNaN(a)?64:63&a],n).join("")}return e}};t.exports=_},function(t,e,n){"use strict";var i={array:n(217),remote:n(637)};t.exports=function(){var t=Array.isArray(arguments[0])?"array":"remote";return i[t].apply(this,arguments)},t.exports.queryImpl=i,t.exports.default=t.exports},function(t,e,n){"use strict";var i=g(n(3)),o=g(n(57)),r=g(n(39)),a=g(n(10)),s=n(11),l=n(24),u=n(0),c=g(n(45)),d=g(n(20)),h=g(n(80)),f=g(n(136)),p=g(n(6)),m=n(55);function g(t){return t&&t.__esModule?t:{default:t}}var _=d.default.inherit({ctor:function(){this.showValidationMessageTimeout=null,this.validationRequest=(0,r.default)(),this.callBase.apply(this,arguments)},_createElement:function(t){this.callBase(t);var e=this.$element();e&&o.default.data(e[0],"dx-validation-target",this)},_initOptions:function(t){this.callBase.apply(this,arguments),this.option(f.default.initValidationOptions(t))},_init:function(){this.callBase(),this._options.cache("validationTooltipOptions",this.option("validationTooltipOptions")),this.$element().addClass("dx-show-invalid-badge")},_getDefaultOptions:function(){return(0,u.extend)(this.callBase(),{value:null,name:"",onValueChanged:null,readOnly:!1,isValid:!0,validationError:null,validationErrors:null,validationStatus:"valid",validationMessageMode:"auto",validationBoundary:void 0,validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})},_attachKeyboardEvents:function(){this.option("readOnly")||this.callBase()},_setOptionsByReference:function(){this.callBase(),(0,u.extend)(this._optionsByReference,{validationError:!0})},_createValueChangeAction:function(){this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})},_suppressValueChangeAction:function(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction:function(){this._valueChangeActionSuppressed=!1},_initMarkup:function(){this._toggleReadOnlyState(),this._setSubmitElementName(this.option("name")),this.callBase(),this._renderValidationState()},_raiseValueChangeAction:function(t,e){this._valueChangeAction||this._createValueChangeAction(),this._valueChangeAction(this._valueChangeArgs(t,e))},_valueChangeArgs:function(t,e){return{value:t,previousValue:e,event:this._valueChangeEventInstance}},_saveValueChangeEvent:function(t){this._valueChangeEventInstance=t},_focusInHandler:function(t){var e=this,n="auto"===this.option("validationMessageMode");return this._canValueBeChangedByClick()&&n&&(this._$validationMessage&&this._$validationMessage.removeClass("dx-invalid-message-auto"),clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout((function(){return e._$validationMessage&&e._$validationMessage.addClass("dx-invalid-message-auto")}),150)),this.callBase(t)},_canValueBeChangedByClick:function(){return!1},_renderValidationState:function(){var t=this.option("isValid")&&"invalid"!==this.option("validationStatus"),e=this.option("validationMessageMode"),n=this.$element(),o=this.option("validationErrors");if(!o&&this.option("validationError")&&(o=[this.option("validationError")]),n.toggleClass("dx-invalid",!t),this.setAria("invalid",!t||void 0),a.default.hasWindow()){this._$validationMessage&&(this._$validationMessage.remove(),this.setAria("describedby",null),this._$validationMessage=null);var r=function(t){var e="";return t&&t.forEach((function(t){t.message&&(e+=(e?"
":"")+(0,m.encodeHtml)(t.message))})),e}(o);if(!t&&r){this._$validationMessage=(0,i.default)("
").addClass("dx-invalid-message").html(r).appendTo(n);var s=this._getValidationMessageTarget();this._validationMessage=this._createComponent(this._$validationMessage,h.default,(0,u.extend)({integrationOptions:{},templatesRenderAsynchronously:!1,target:s,shading:!1,width:"auto",height:"auto",container:n,position:this._getValidationMessagePosition("below"),closeOnOutsideClick:!1,closeOnTargetScroll:!1,animation:null,visible:!0,propagateOutsideClick:!0,_checkParentVisibility:!1},this._options.cache("validationTooltipOptions"))),this._$validationMessage.toggleClass("dx-invalid-message-auto","auto"===e).toggleClass("dx-invalid-message-always","always"===e);var l="dx-"+new c.default;this._validationMessage.$content().addClass("dx-invalid-message-content").attr("id",l),this.setAria("describedby",l),this._setValidationMessageMaxWidth(),this._bindInnerWidgetOptions(this._validationMessage,"validationTooltipOptions")}}},_setValidationMessageMaxWidth:function(){if(this._validationMessage)if(0!==this._getValidationMessageTarget().outerWidth()){var t=Math.max(100,this._getValidationMessageTarget().outerWidth());this._validationMessage.option("maxWidth",t)}else this._validationMessage.option("maxWidth","100%")},_getValidationMessageTarget:function(){return this.$element()},_getValidationMessagePosition:function(t){var e=this.option("rtlEnabled"),n=(0,l.getDefaultAlignment)(e),i=this.option("validationMessageOffset"),o={h:i.h,v:i.v},r="below"===t?[" top"," bottom"]:[" bottom"," top"];return e&&(o.h=-o.h),"below"!==t&&(o.v=-o.v),{offset:o,boundary:this.option("validationBoundary"),my:n+r[0],at:n+r[1],collision:"none flip"}},_toggleReadOnlyState:function(){var t=this.option("readOnly");this._toggleBackspaceHandler(t),this.$element().toggleClass("dx-state-readonly",!!t),this.setAria("readonly",t||void 0)},_toggleBackspaceHandler:function(t){var e=this._keyboardEventBindingTarget(),n=(0,s.addNamespace)("keydown","editorReadOnly");p.default.off(e,n),t&&p.default.on(e,n,(function(t){"backspace"===(0,s.normalizeKeyName)(t)&&t.preventDefault()}))},_dispose:function(){var t=this.$element()[0];o.default.data(t,"dx-validation-target",null),clearTimeout(this.showValidationMessageTimeout),this.callBase()},_setSubmitElementName:function(t){var e=this._getSubmitElement();e&&(t.length>0?e.attr("name",t):e.removeAttr("name"))},_getSubmitElement:function(){return null},_optionChanged:function(t){switch(t.name){case"onValueChanged":this._createValueChangeAction();break;case"isValid":case"validationError":this.option(f.default.synchronizeValidationOptions(t,this.option()));break;case"validationErrors":case"validationStatus":this.option(f.default.synchronizeValidationOptions(t,this.option())),this._renderValidationState();break;case"validationBoundary":case"validationMessageMode":this._renderValidationState();break;case"validationTooltipOptions":this._innerWidgetOptionChanged(this._validationMessage,t);break;case"readOnly":this._toggleReadOnlyState(),this._refreshFocusState();break;case"value":t.value!=t.previousValue&&this.validationRequest.fire({value:t.value,editor:this}),this._valueChangeActionSuppressed||(this._raiseValueChangeAction(t.value,t.previousValue),this._saveValueChangeEvent(void 0));break;case"width":this.callBase(t),this._setValidationMessageMaxWidth();break;case"name":this._setSubmitElementName(t.value);break;default:this.callBase(t)}},reset:function(){var t=this._getDefaultOptions();this.option("value",t.value)}});t.exports=_},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){for(var n=0;n=0?"yyyy/MM/dd HH:mm:ss":"yyyy/MM/dd")):t?null:void 0;var e}}},function(t,e,n){(function(e){var n;"undefined"!==typeof self&&self,n=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),o=n(18),r=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),d=n(12),h=n(32),f=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:i.default,Format:o.default,Leaf:r.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:d.default,Class:h.default,Style:f.default,Store:p.default}};e.default=g},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=o;var r,a={},s={},l={},u={};function c(t,e){var n;if(void 0===e&&(e=r.ANY),"string"===typeof t)n=u[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"===typeof t)t&r.LEVEL&r.BLOCK?n=u.block:t&r.LEVEL&r.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var o in i)if(n=s[i[o]])break;n=n||l[t.tagName]}return null==n?null:e&r.LEVEL&n.scope&&e&r.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(r=e.Scope||(e.Scope={})),e.create=function(t,e){var n=c(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=c,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var i=e[0];if("string"!==typeof i.blotName&&"string"!==typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");if(u[i.blotName||i.attrName]=i,"string"===typeof i.keyName)a[i.keyName]=i;else if(null!=i.className&&(s[i.className]=i),null!=i.tagName){Array.isArray(i.tagName)?i.tagName=i.tagName.map((function(t){return t.toUpperCase()})):i.tagName=i.tagName.toUpperCase();var r=Array.isArray(i.tagName)?i.tagName:[i.tagName];r.forEach((function(t){null!=l[t]&&null!=i.className||(l[t]=i)}))}return i}},function(t,e,n){var i=n(51),o=n(11),r=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=r(!0,{},t),"object"===typeof n){if("number"===typeof t.delete&&"number"===typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"===typeof n.delete&&null!=t.insert&&(e-=1,"object"!==typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"===typeof t.insert&&"string"===typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"===typeof t.retain&&"number"===typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(i){(t(i)?e:n).push(i)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!==typeof e&&(e=1/0);for(var n=[],i=a.iterator(this.ops),o=0;o0&&n.next(r.retain-s)}for(var u=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),d=e.next(c),h=n.next(c);if("number"===typeof h.retain){var f={};"number"===typeof d.retain?f.retain=c:f.insert=d.insert;var p=a.attributes.compose(d.attributes,h.attributes,"number"===typeof d.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&o(u.ops[u.ops.length-1],f)){var m=new l(e.rest());return u.concat(m).chop()}}else"number"===typeof h.delete&&"number"===typeof d.retain&&u.push(h)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),r=new l,u=i(n[0],n[1],e),c=a.iterator(this.ops),d=a.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(d.peekLength(),e),r.push(d.next(n));break;case i.DELETE:n=Math.min(e,c.peekLength()),c.next(n),r.delete(n);break;case i.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),e);var s=c.next(n),l=d.next(n);o(s.insert,l.insert)?r.retain(n,a.attributes.diff(s.attributes,l.attributes)):r.push(l).delete(n)}e-=n}})),r.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),i=new l,o=0;n.hasNext();){if("insert"!==n.peekType())return;var r=n.peek(),s=a.length(r)-n.peekLength(),u="string"===typeof r.insert?r.insert.indexOf(e,s)-s:-1;if(u<0)i.push(n.next());else if(u>0)i.push(n.next(u));else{if(!1===t(i,n.next(1).attributes||{},o))return;o+=1,i=new l}}i.length()>0&&t(i,{},o)},l.prototype.transform=function(t,e){if(e=!!e,"number"===typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),i=a.iterator(t.ops),o=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())o.push(i.next());else{var r=Math.min(n.peekLength(),i.peekLength()),s=n.next(r),u=i.next(r);if(s.delete)continue;u.delete?o.push(u):o.retain(r,a.attributes.transform(s.attributes,u.attributes,e))}else o.retain(a.length(n.next()));return o.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var o=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(i0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var r=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},r}}]),e}(s.default.Block);function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"===typeof t.formats&&(e=(0,r.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:_(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,s.default.Embed,c.default],e.bubbleFormats=_,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(v(this,t),this.options=w(e,i),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var i=n.selection.lastRange,o=i&&0===i.length?i.index:void 0;x.call(n,(function(){return n.editor.update(null,e,o)}),t)}));var r=this.clipboard.convert("
"+o+"


");this.setContents(r),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return r(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&y.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof t){var o=t.attrName||t.blotName;"string"===typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach((function(i){n.register(i,t[i],e)}))}else null==this.imports[t]||i||y.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"===typeof e.register&&e.register()}}]),r(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=this,r=C(t,e,n),a=o(r,4);return t=a[0],e=a[1],n=a[3],x.call(this,(function(){return i.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return x.call(this,(function(){var i=n.getSelection(!0),o=new a.default;if(null==i)return o;if(c.default.query(t,c.default.Scope.BLOCK))o=n.editor.formatLine(i.index,i.length,_({},t,e));else{if(0===i.length)return n.selection.format(t,e),o;o=n.editor.formatText(i.index,i.length,_({},t,e))}return n.setSelection(i,l.default.sources.SILENT),o}),i)}},{key:"formatLine",value:function(t,e,n,i,r){var a,s=this,l=C(t,e,n,i,r),u=o(l,4);return t=u[0],e=u[1],a=u[2],r=u[3],x.call(this,(function(){return s.editor.formatLine(t,e,a)}),r,t,0)}},{key:"formatText",value:function(t,e,n,i,r){var a,s=this,l=C(t,e,n,i,r),u=o(l,4);return t=u[0],e=u[1],a=u[2],r=u[3],x.call(this,(function(){return s.editor.formatText(t,e,a)}),r,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"===typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=C(t,e),i=o(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=C(t,e),i=o(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var o=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return x.call(this,(function(){return o.editor.insertEmbed(e,n,i)}),r,e)}},{key:"insertText",value:function(t,e,n,i,r){var a,s=this,l=C(t,0,n,i,r),u=o(l,4);return t=u[0],a=u[2],r=u[3],x.call(this,(function(){return s.editor.insertText(t,e,a)}),r,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var i=this,r=C(t,e,n),a=o(r,4);return t=a[0],e=a[1],n=a[3],x.call(this,(function(){return i.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return x.call(this,(function(){t=new a.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),r=o.ops[o.ops.length-1];return null!=r&&"string"===typeof r.insert&&"\n"===r.insert[r.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),i.compose(o)}),n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var r=C(e,n,i),a=o(r,4);e=a[0],n=a[1],i=a[3],this.selection.setRange(new d.Range(e,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return x.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function w(t,e){if((e=(0,f.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,f.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=b.import("modules/"+e);return null==n?y.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,f.default)(!0,{},b.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"===typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function x(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var o=null==n?null:this.getSelection(),r=this.editor.delta,s=t();if(null!=o&&(!0===n&&(n=o.index),null==i?o=S(o,s,e):0!==i&&(o=S(o,n,i,e)),this.setSelection(o,l.default.sources.SILENT)),s.length()>0){var u,c,d=[l.default.events.TEXT_CHANGE,s,r,e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return s}function C(t,e,n,o,r){var a={};return"number"===typeof t.index&&"number"===typeof t.length?"number"!==typeof e?(r=o,o=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!==typeof e&&(r=o,o=n,n=e,e=0),"object"===("undefined"===typeof n?"undefined":i(n))?(a=n,r=o):"string"===typeof n&&(null!=o?a[n]=o:r=n),[t,e,a,r=r||l.default.sources.API]}function S(t,e,n,i){if(null==t)return null;var r=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,i!==l.default.sources.USER)})),c=o(u,2);r=c[0],s=c[1]}else{var h=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),f=o(h,2);r=f[0],s=f[1]}return new d.Range(r,s-r)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},e.expandConfig=w,e.overload=C,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),o=e.order.indexOf(n);return i>=0||o>=0?i-o:t===n?0:t1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],o="warn";function r(t){if(i.indexOf(t)<=i.indexOf(o)){for(var e,n=arguments.length,r=Array(n>1?n-1:0),a=1;a=0;u--)if(d[u]!=h[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!a(t[c],e[c],n))return!1;return typeof t===typeof e}(t,e,n))};function s(t){return null===t||void 0===t}function l(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&"function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|o:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"===typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,l=r-a+1,u=this.isolate(a,l),c=u.next;u.format(i,o),c instanceof e&&c.formatAt(0,t-a+n-l,i,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var o=this.descendant(c.default,t),r=i(o,2),a=r[0],s=r[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n=r&&!f.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,f);var p=e.scroll.line(t),m=o(p,2),_=m[0],v=m[1],y=(0,g.default)({},(0,d.bubbleFormats)(_));if(_ instanceof h.default){var b=_.descendant(l.default.Leaf,v),w=o(b,1)[0];y=(0,g.default)(y,(0,d.bubbleFormats)(w))}c=s.default.attributes.diff(y,c)||{}}else if("object"===i(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,a.insert[x])}r+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),0),t.reduce((function(t,n){return"number"===typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach((function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var r=n.scroll.lines(t,Math.max(e,1)),a=e;r.forEach((function(e){var r=e.length();if(e instanceof u.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,o,i[o])}else e.format(o,i[o]);a-=r}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach((function(o){n.scroll.formatAt(t,e,o,i[o])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((function(t){var e=o(t,1)[0];e instanceof h.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var r=[n,i].map((function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=b((0,d.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,r)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"===typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach((function(o){n.scroll.formatAt(t,e.length,o,i[o])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===h.default.blotName&&!(t.children.length>1)&&t.children.head instanceof f.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),r=o(i,2),s=r[0],l=r[1],c=0,d=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,d=s.delta().slice(l,l+c-1).insert("\n"));var h=this.getContents(t,e+c).diff((new a.default).insert(n).concat(d)),f=(new a.default).retain(t).concat(h);return this.applyDelta(f)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(v)&&l.default.find(e[0].target)){var o=l.default.find(e[0].target),r=(0,d.bubbleFormats)(o),s=o.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),h=(new a.default).insert(u),f=(new a.default).insert(o.value()),p=(new a.default).retain(s).concat(h.diff(f,n));t=p.reduce((function(t,e){return e.insert?t.insert(e.insert,r):t.push(e)}),new a.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function b(t,e){return Object.keys(e).reduce((function(n,i){return null==t[i]||(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]]),n}),{})}e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;d(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;d(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=r.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&i.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,o=n.startNode,r=n.startOffset,a=n.endNode,s=n.endOffset;i.setNativeRange(o,r,a,s)}})),this.update(l.default.sources.SILENT)}return o(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!r.default.query(t,r.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=r.default.find(n.start.node,!1);if(null==i)return;if(i instanceof r.default.Leaf){var o=i.split(n.start.offset);i.parent.insertBefore(this.cursor,o)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var o=void 0,r=this.scroll.leaf(t),a=i(r,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=i(u,2);o=c[0],l=c[1];var d=document.createRange();if(e>0){d.setStart(o,l);var h=this.scroll.leaf(t+e),f=i(h,2);if(s=f[0],l=f[1],null==s)return null;var p=s.position(l,!0),m=i(p,2);return o=m[0],l=m[1],d.setEnd(o,l),d.getBoundingClientRect()}var g="left",_=void 0;return o instanceof Text?(l0&&(g="right")),{bottom:_.top+_.height,height:_.height,left:_[g],right:_[g],top:_.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var o=n.map((function(t){var n=i(t,2),o=n[0],a=n[1],s=r.default.find(o,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof r.default.Container?l+s.length():l+s.index(o,a)})),a=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(o)));return new f(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],o=[],r=this.scroll.length();return n.forEach((function(t,n){t=Math.min(r-1,t);var a,s=e.scroll.leaf(t),l=i(s,2),u=l[0],c=l[1],d=u.position(c,0!==n),h=i(d,2);a=h[0],c=h[1],o.push(a,c)})),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var o=this.scroll.length()-1,r=this.scroll.line(Math.min(e.index,o)),a=i(r,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,o));s=i(l,1)[0]}if(null!=a&&null!=s){var u=t.getBoundingClientRect();n.topu.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var r=document.getSelection();if(null!=r)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||o||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||i!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,i),r.removeAllRanges(),r.addRange(s)}}else r.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"===typeof e&&(n=e,e=!1),h.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,c(i).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),o=i(n,2),r=o[0],u=o[1];if(this.lastRange=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,h=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(h)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,h)}}}]),t}();function m(t,e){try{e.parentNode}catch(n){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=f,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=r.Scope.INLINE_BLOT,e}(o.default);e.default=a},function(t,e,n){var i=n(11),o=n(3),r={attributes:{compose:function(t,e,n){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});var i=o(!0,{},e);for(var r in n||(i=Object.keys(i).reduce((function(t,e){return null!=i[e]&&(t[e]=i[e]),t}),{})),t)void 0!==t[r]&&void 0===e[r]&&(i[r]=t[r]);return Object.keys(i).length>0?i:void 0},diff:function(t,e){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,o){return i(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!==typeof t)return e;if("object"===typeof e){if(!n)return e;var i=Object.keys(e).reduce((function(n,i){return void 0===t[i]&&(n[i]=e[i]),n}),{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"===typeof t.delete?t.delete:"number"===typeof t.retain?t.retain:"string"===typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=r.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"===typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"===typeof e.retain?o.retain=t:"string"===typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?r.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"===typeof this.ops[this.index].delete?"delete":"number"===typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=r},function(t,n){var i=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,i,o;try{n=Map}catch(_){n=function(){}}try{i=Set}catch(_){i=function(){}}try{o=Promise}catch(_){o=function(){}}function r(a,l,u,c,d){"object"===typeof l&&(u=l.depth,c=l.prototype,d=l.includeNonEnumerable,l=l.circular);var h=[],f=[],p="undefined"!=typeof e;return"undefined"==typeof l&&(l=!0),"undefined"==typeof u&&(u=1/0),function a(u,m){if(null===u)return null;if(0===m)return u;var g,_;if("object"!=typeof u)return u;if(t(u,n))g=new n;else if(t(u,i))g=new i;else if(t(u,o))g=new o((function(t,e){u.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(r.__isArray(u))g=[];else if(r.__isRegExp(u))g=new RegExp(u.source,s(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(r.__isDate(u))g=new Date(u.getTime());else{if(p&&e.isBuffer(u))return g=e.allocUnsafe?e.allocUnsafe(u.length):new e(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):"undefined"==typeof c?(_=Object.getPrototypeOf(u),g=Object.create(_)):(g=Object.create(c),_=c)}if(l){var v=h.indexOf(u);if(-1!=v)return f[v];h.push(u),f.push(g)}for(var y in t(u,n)&&u.forEach((function(t,e){var n=a(e,m-1),i=a(t,m-1);g.set(n,i)})),t(u,i)&&u.forEach((function(t){var e=a(t,m-1);g.add(e)})),u){var b;_&&(b=Object.getOwnPropertyDescriptor(_,y)),b&&null==b.set||(g[y]=a(u[y],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(y=0;y0){if(s instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(s instanceof d.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===f)return void this.optimize()}else if(f instanceof d.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;s.moveChildren(f,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,i,o){(null==this.whitelist||this.whitelist[i])&&(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,o),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==a.default.query(n,a.default.Scope.BLOCK)){var o=a.default.create(this.statics.defaultChild);this.appendChild(o),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,i)}else{var s=a.default.create(n,i);this.appendChild(s)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var i=a.default.create(this.statics.defaultChild);i.appendChild(t),t=i}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,i){var o=[],r=i;return e.children.forEachAt(n,i,(function(e,n,i){p(e)?o.push(e):e instanceof a.default.Container&&(o=o.concat(t(e,n,r))),r-=i})),o};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"===typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,h.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=T(t);if(null==i||null==i.key)return _.warn("Attempted to add invalid keyboard binding",i);"function"===typeof e&&(e={handler:e}),"function"===typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,a=(t.bindings[r]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=o(u,2),h=c[0],f=c[1],p=t.quill.getLeaf(l.index),m=o(p,2),g=m[0],_=m[1],v=0===l.length?[g,_]:t.quill.getLeaf(l.index+l.length),y=o(v,2),b=y[0],w=y[1],x=g instanceof d.default.Text?g.value().slice(0,_):"",C=b instanceof d.default.Text?b.value().slice(w):"",S={collapsed:0===l.length,empty:0===l.length&&h.length()<=1,format:t.quill.getFormat(l),offset:f,prefix:x,suffix:C};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==S.collapsed)return!1;if(null!=e.empty&&e.empty!==S.empty)return!1;if(null!=e.offset&&e.offset!==S.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==S.format[t]})))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=S.format[t]:!1===e.format[t]?null==S.format[t]:(0,s.default)(e.format[t],S.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(S.prefix))&&!(null!=e.suffix&&!e.suffix.test(S.suffix))&&!0!==e.handler.call(t,l,S)}))&&n.preventDefault()}}}}))}}]),e}(p.default);function b(t,e){var n,i=t===y.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},i,/^$/),g(n,"handler",(function(n){var i=n.index;t===y.keys.RIGHT&&(i+=n.length+1);var r=this.quill.getLeaf(i);return!(o(r,1)[0]instanceof d.default.Embed)||(t===y.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),!1)})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=o(n,1)[0],r={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=o(a,1)[0];if(null!=s&&s.length()>1){var l=i.formats(),u=this.quill.getFormat(t.index-1,1);r=c.default.attributes.diff(l,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-d,d,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index-d,d,r,h.default.sources.USER),this.quill.focus()}}function x(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},r=0,a=this.quill.getLine(t.index),s=o(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),u=o(l,1)[0];if(u){var d=s.formats(),f=this.quill.getFormat(t.index,1);i=c.default.attributes.diff(d,f)||{},r=u.length()}}this.quill.deleteText(t.index,n,h.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+r-1,n,i,h.default.sources.USER)}}function C(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),o=e[e.length-1].formats();n=c.default.attributes.diff(o,i)||{}}this.quill.deleteText(t,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,h.default.sources.USER),this.quill.setSelection(t.index,h.default.sources.SILENT),this.quill.focus()}function S(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce((function(t,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",i,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],h.default.sources.USER))}))}function k(t){return{key:y.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),i=e.index,r=e.length,a=this.quill.scroll.descendant(n,i),s=o(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),f=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+r),m=l.domNode.textContent.slice(f,p).split("\n");u=0,m.forEach((function(e,o){t?(l.insertAt(f+u,n.TAB),u+=n.TAB.length,0===o?i+=n.TAB.length:r+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===o?i-=n.TAB.length:r-=n.TAB.length),u+=e.length+1})),this.quill.update(h.default.sources.USER),this.quill.setSelection(i,r,h.default.sources.SILENT)}}}}function I(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],h.default.sources.USER)}}}function T(t){if("string"===typeof t||"number"===typeof t)return T({key:t});if("object"===("undefined"===typeof t?"undefined":i(t))&&(t=(0,a.default)(t,!1)),"string"===typeof t.key)if(null!=y.keys[t.key.toUpperCase()])t.key=y.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[v]=t.shortKey,delete t.shortKey),t}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:I("bold"),italic:I("italic"),underline:I("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,h.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,h.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,h.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),i=n[0],r=n[1],a=(0,l.default)({},i.formats(),{list:"checked"}),s=(new u.default).retain(t.index).insert("\n",a).retain(i.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),i=o(n,2),r=i[0],a=i[1],s=(new u.default).retain(t.index).insert("\n",e.format).retain(r.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,i=this.quill.getLine(t.index),r=o(i,2),a=r[0],s=r[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,h.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),i=n[0],r=n[1],a=(new u.default).retain(t.index+i.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,h.default.sources.USER)}},"embed left":b(y.keys.LEFT,!1),"embed left shift":b(y.keys.LEFT,!0),"embed right":b(y.keys.RIGHT,!1),"embed right shift":b(y.keys.RIGHT,!0)}},e.default=y,e.SHORTKEY=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,i){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=u,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"===typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"===typeof Event?"undefined":i(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=_(n(0)),o=_(n(5)),r=n(4),a=_(r),s=_(n(16)),l=_(n(25)),u=_(n(24)),c=_(n(35)),d=_(n(6)),h=_(n(22)),f=_(n(7)),p=_(n(55)),m=_(n(42)),g=_(n(23));function _(t){return t&&t.__esModule?t:{default:t}}o.default.register({"blots/block":a.default,"blots/block/embed":r.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":h.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),i.default.register(a.default,s.default,u.default,d.default,h.default,f.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=function(){function t(t){this.domNode=t,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"===typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"===typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var r=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&o)r.wrap(n,o);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var a=i.create(this.statics.scope);r.wrap(a),a.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?i.create("text",e):i.create(e,n),r=this.split(t);this.parent.insertBefore(o,r)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"===typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"===typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),o=n(32),r=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=o.default.keys(this.domNode),s=r.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=r},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;ni&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"===typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=o.default.query(t,o.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,a.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var i=n.index+n.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),t,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",a.default.sources.USER),this.quill.setSelection(i+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(h.default);function S(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)}))}e.BaseTooltip=C,e.default=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var o=n.length();if(ta?n(i,t-a,Math.min(e,a+l-t)):n(i,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),r=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,a),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,o){this.update(),t.prototype.formatAt.call(this,e,n,i,o)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)e.push(a.pop());for(var s=function t(e,n){void 0===n&&(n=!0),null!=e&&e!==i&&null!=e.domNode.parentNode&&(null==e.domNode[r.DATA_KEY].mutations&&(e.domNode[r.DATA_KEY].mutations=[]),n&&t(e.parent))},l=function t(e){null!=e.domNode[r.DATA_KEY]&&null!=e.domNode[r.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(t),e.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=r.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(r.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=r.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),a=(u=[].slice.call(this.observer.takeRecords())).slice();a.length>0;)e.push(a.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=r.find(t.target,!0);return null==e?null:null==e.domNode[r.DATA_KEY].mutations?(e.domNode[r.DATA_KEY].mutations=[t],e):(e.domNode[r.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==i&&null!=t.domNode[r.DATA_KEY]&&t.update(t.domNode[r.DATA_KEY].mutations||[],n)})),null!=this.domNode[r.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[r.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=r.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),r=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,i,o){null!=this.formats()[i]||r.query(i,r.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,o):t.prototype.formatAt.call(this,e,n,i,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(i,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=r.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),r=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var i=r.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=r.query(n,r.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,o){null!=r.query(i,r.Scope.BLOCK)?this.format(i,o):t.prototype.formatAt.call(this,e,n,i,o)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=r.query(n,r.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var o=this.split(e),a=r.create(n,i);o.parent.insertBefore(a,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=r.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,o){0===e&&n===this.length()?this.format(i,o):t.prototype.formatAt.call(this,e,n,i,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),r=n(1),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=r.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=r.Scope.INLINE_BLOT,e}(o.default);e.default=a},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)===!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!==typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,o=arguments[1],r=0;re.length?t:e,l=t.length>e.length?e:t,u=s.indexOf(l);if(-1!=u)return a=[[1,s.substring(0,u)],[0,l],[1,s.substring(u+l.length)]],t.length>e.length&&(a[0][0]=a[2][0]=-1),a;if(1==l.length)return[[-1,t],[1,e]];var c=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,a,s,l,d]:null}var s,l,u,c,d,h=a(n,i,Math.ceil(n.length/4)),f=a(n,i,Math.ceil(n.length/2));if(!h&&!f)return null;s=f?h&&h[4].length>f[4].length?h:f:h,t.length>e.length?(l=s[0],u=s[1],c=s[2],d=s[3]):(c=s[0],d=s[1],l=s[2],u=s[3]);var p=s[4];return[l,u,c,d,p]}(t,e);if(c){var d=c[0],h=c[1],f=c[2],p=c[3],m=c[4],g=n(d,f),_=n(h,p);return g.concat([[0,m]],_)}return function(t,e){for(var n=t.length,o=e.length,r=Math.ceil((n+o)/2),a=r,s=2*r,l=new Array(s),u=new Array(s),c=0;cn)p+=2;else if(b>o)f+=2;else if(h&&(C=a+d-v)>=0&&C=w)return i(t,e,k,b)}}for(var x=-_+m;x<=_-g;x+=2){for(var C=a+x,S=(w=x==-_||x!=_&&u[C-1]n)g+=2;else if(S>o)m+=2;else if(!h&&(y=a+d-x)>=0&&y=(w=n-w))return i(t,e,k,b)}}}return[[-1,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-l),e=e.substring(0,e.length-l));return u&&d.unshift([0,u]),c&&d.push([0,c]),function t(e){e.push([0,""]);for(var n,i=0,a=0,s=0,l="",u="";i1?(0!==a&&0!==s&&(0!==(n=o(u,l))&&(i-a-s>0&&0==e[i-a-s-1][0]?e[i-a-s-1][1]+=u.substring(0,n):(e.splice(0,0,[0,u.substring(0,n)]),i++),u=u.substring(n),l=l.substring(n)),0!==(n=r(u,l))&&(e[i][1]=u.substring(u.length-n)+e[i][1],u=u.substring(0,u.length-n),l=l.substring(0,l.length-n))),0===a?e.splice(i-s,a+s,[1,u]):0===s?e.splice(i-a,a+s,[-1,l]):e.splice(i-a-s,a+s,[-1,l],[1,u]),i=i-a-s+(a?1:0)+(s?1:0)+1):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,s=0,a=0,l="",u=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i0&&i.splice(o+2,0,[a[0],l]),s(i,o,3)}return t}(d,a)),d=function(t){for(var e=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},i=2;i=55296&&o.charCodeAt(o.length-1)<=56319&&-1===t[i-1][0]&&n(t[i-1][1])&&1===t[i][0]&&n(t[i][1])&&(e=!0,t[i-1][1]=t[i-2][1].slice(-1)+t[i-1][1],t[i][1]=t[i-2][1].slice(-1)+t[i][1],t[i-2][1]=t[i-2][1].slice(0,-1));var o;if(!e)return t;var r=[];for(i=0;i0&&r.push(t[i]);return r}(d)}function i(t,e,i,o){var r=t.substring(0,i),a=e.substring(0,o),s=t.substring(i),l=e.substring(o),u=n(r,a),c=n(s,l);return u.concat(c)}function o(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,i=Math.min(t.length,e.length),o=i,r=0;n=0&&i>=e-1;i--)if(i+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=T(e,n)),parseFloat(i.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!O(e,"\n"))return e;for(var i=-1,o=t.parentNode;!o.classList.contains("ql-clipboard");)"list"===(l.default.query(o)||{}).blotName&&(i+=1),o=o.parentNode;return i<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:i}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new s.default}]],S=[h.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),k=[h.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,_.FontStyle,v.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),I=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],C.concat(i.options.matchers).forEach((function(t){var e=o(t,2),r=e[0],a=e[1];(n.matchVisual||a!==B)&&i.addMatcher(r,a)})),i}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"===typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,b({},p.default.blotName,e[p.default.blotName]))}var i=this.prepareMatching(),r=o(i,2),a=r[0],l=r[1],u=function t(e,n,i){return e.nodeType===e.TEXT_NODE?i.reduce((function(t,n){return n(e,t)}),new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(o,r){var a=t(r,n,i);return r.nodeType===e.ELEMENT_NODE&&(a=n.reduce((function(t,e){return e(r,t)}),a),a=(r[x]||[]).reduce((function(t,e){return e(r,t)}),a)),o.concat(a)}),new s.default):new s.default}(this.container,a,l);return O(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"===typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var i=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(i),n),this.quill.setSelection(t+i.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new s.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){i=i.concat(e.convert()).delete(n.length),e.quill.updateContents(i,u.default.sources.USER),e.quill.setSelection(i.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(i){var r=o(i,2),a=r[0],s=r[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[x]=t[x]||[],t[x].push(s)}))}})),[e,n]}}]),e}(d.default);function T(t,e,n){return"object"===("undefined"===typeof e?"undefined":i(e))?Object.keys(e).reduce((function(t,n){return T(t,n,e[n])}),t):t.reduce((function(t,i){return i.attributes&&i.attributes[e]?t.push(i):t.insert(i.insert,(0,a.default)({},b({},e,n),i.attributes))}),new s.default)}function E(t){return t.nodeType!==Node.ELEMENT_NODE?{}:t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function O(t,e){for(var n="",i=t.ops.length-1;i>=0&&n.length-1}function P(t,e,n){return T(n,t,!0)}function D(t,e){var n=l.default.Attributor.Attribute.keys(t),i=l.default.Attributor.Class.keys(t),o=l.default.Attributor.Style.keys(t),r={};return n.concat(i).concat(o).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(r[n.attrName]=n.value(t),r[n.attrName])||(null==(n=S[e])||n.attrName!==e&&n.keyName!==e||(r[n.attrName]=n.value(t)||void 0),null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(n=k[e],r[n.attrName]=n.value(t)||void 0))})),Object.keys(r).length>0&&(e=T(e,r)),e}function A(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var i={},o=n.value(t);null!=o&&(i[n.blotName]=o,e=(new s.default).insert(i,n.formats(t)))}else"function"===typeof n.formats&&(e=T(e,n.blotName,n.formats(t)));return e}function R(t,e){return O(e,"\n")||(M(t)||e.length()>0&&t.nextSibling&&M(t.nextSibling))&&e.insert("\n"),e}function B(t,e){if(M(t)&&null!=t.nextElementSibling&&!O(e,"\n\n")){var n=t.offsetHeight+parseFloat(E(t).marginTop)+parseFloat(E(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function N(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!E(t.parentNode).whiteSpace.startsWith("pre")){var i=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&M(t.parentNode)||null!=t.previousSibling&&M(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&M(t.parentNode)||null!=t.nextSibling&&M(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}I.DEFAULTS={matchers:[],matchVisual:!0},e.default=I,e.matchAttributor=D,e.matchBlot=A,e.matchNewline=R,e.matchSpacing=B,e.matchText=N},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=function(){function t(t,e){for(var n=0;ni.right&&(r=i.right-o.right,this.root.style.left=e+r+"px"),o.lefti.bottom){var a=o.bottom-o.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return r}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,i){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=B(n(29)),o=n(36),r=n(38),a=n(64),s=B(n(65)),l=B(n(66)),u=n(67),c=B(u),d=n(37),h=n(26),f=n(39),p=n(40),m=B(n(56)),g=B(n(68)),_=B(n(27)),v=B(n(69)),y=B(n(70)),b=B(n(71)),w=B(n(72)),x=B(n(73)),C=n(13),S=B(C),k=B(n(74)),I=B(n(75)),T=B(n(57)),E=B(n(41)),O=B(n(28)),M=B(n(59)),P=B(n(60)),D=B(n(61)),A=B(n(108)),R=B(n(62));function B(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":r.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":r.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":r.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":o.AlignClass,"formats/direction":r.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":S.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":_.default,"formats/script":v.default,"formats/strike":y.default,"formats/underline":b.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":u.ListItem,"modules/formula":k.default,"modules/syntax":I.default,"modules/toolbar":T.default,"themes/bubble":A.default,"themes/snow":R.default,"ui/icons":E.default,"ui/picker":O.default,"ui/icon-picker":P.default,"ui/color-picker":M.default,"ui/tooltip":D.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,o=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof h)o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),r=this.split(i);r.parent.insertBefore(t,r)}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=r.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);f.blotName="list",f.scope=r.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[h],e.ListItem=h,e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(56);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=o)&&i.__esModule?i:{default:i}).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"===typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);h.blotName="image",h.tagName="IMG",e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var i=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(s(n(13)).default);d.className="ql-syntax";var h=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),f=function(t){function e(t,n){l(this,e);var i=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!==typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return i.quill.on(r.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(o),o=setTimeout((function(){i.highlight(),o=null}),i.options.interval)})),i.highlight(),i}return c(e,t),i(e,null,[{key:"register",value:function(){r.default.register(h,!0),r.default.register(d,!0)}}]),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(r.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(r.default.sources.SILENT),null!=e&&this.quill.setSelection(e,r.default.sources.SILENT)}}}]),e}(a.default);f.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=h,e.default=f},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var i=function t(e,n,i){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n0&&o===a.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var r=i.quill.getLines(e.index,e.length);if(1===r.length)i.position(i.quill.getBounds(e));else{var s=r[r.length-1],l=i.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-l),d=i.quill.getBounds(new u.Range(l,c));i.position(d)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()})),i}return p(e,t),o(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);_.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=_,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=n()}).call(this,n(52).Buffer)},function(t,e,n){"use strict";var i=_(n(3)),o=_(n(6)),r=_(n(624)),a=_(n(23)),s=n(0),l=n(5),u=n(4),c=n(2),d=_(n(218)),h=n(29),f=n(92),p=n(100),m=_(n(258)),g=n(7);function _(t){return t&&t.__esModule?t:{default:t}}function v(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0?n.totalCount():e.length},key:t.key.bind(t),keyOf:t.keyOf.bind(t),load:function(e){if(t._dataSource){var n=t._dataSource.loadOptions();e.customQueryParams=n.customQueryParams,e.userData=t._dataSource._userData}var i=t._dataSource&&t._dataSource.store();return i?i.load(e).done((function(e){if(!t._disposed){var n=(0,p.normalizeLoadResult)(e).data;t._dataSource._applyMapFunction(n)}})):(new g.Deferred).resolve(this.plainItems())},dataFields:function(){return t._dataSource&&t._dataSource.select()},plainItems:e.bind(t._editStrategy)})},_initEditStrategy:function(){var t=d.default;this._editStrategy=new t(this)},_getSelectedItemIndices:function(t){var e=this,n=[];return t=t||this._selection.getSelectedItemKeys(),e._editStrategy.beginCache(),(0,l.each)(t,(function(t,i){var o=e._getIndexByKey(i);b(o)&&n.push(o)})),e._editStrategy.endCache(),n},_initMarkup:function(){var t=this;this._rendering=!0,this._dataSource&&this._dataSource.isLoading()||this._syncSelectionOptions().done((function(){return t._normalizeSelectedItems()})),this.callBase()},_render:function(){this.callBase(),this._rendering=!1},_fireContentReadyAction:function(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions:function(t){var e,n,i,o;switch(t=t||this._chooseSelectOption()){case"selectedIndex":e=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),(0,c.isDefined)(e)?(this._setOptionWithoutOptionChange("selectedItems",[e]),this._setOptionWithoutOptionChange("selectedItem",e),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([e]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(o=this.option("selectedItems")||[],n=this._editStrategy.getIndexByItemData(o[0]),this.option("selectionRequired")&&!b(n))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",o[0]),this._setOptionWithoutOptionChange("selectedIndex",n),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(o));break;case"selectedItem":if(e=this.option("selectedItem"),n=this._editStrategy.getIndexByItemData(e),this.option("selectionRequired")&&!b(n))return this._syncSelectionOptions("selectedIndex");(0,c.isDefined)(e)?(this._setOptionWithoutOptionChange("selectedItems",[e]),this._setOptionWithoutOptionChange("selectedIndex",n),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([e]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",-1));break;case"selectedItemKeys":if(i=this.option("selectedItemKeys"),this.option("selectionRequired")){var r=this._getIndexByKey(i[0]);if(!b(r))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(i)}return(new g.Deferred).resolve().promise()},_chooseSelectOption:function(){var t="selectedIndex",e=function(t){var e=this.option(t);return(0,c.isDefined)(e)&&e.length||t in this._userOptions}.bind(this);return e("selectedItems")?t="selectedItems":e("selectedItem")?t="selectedItem":e("selectedItemKeys")&&(t="selectedItemKeys"),t},_compareKeys:function(t,e){if(t.length!==e.length)return!1;for(var n=0;n1||!t.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){var e=this._selection.getSelectedItems(),n=void 0===t[0]?e[0]:t[0];return void 0===n&&(n=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&n&&n.items&&(n.items=[n.items[0]]),this._selection.setSelection(this._getKeysByItems([n])),this._setOptionWithoutOptionChange("selectedItems",[n]),this._syncSelectionOptions("selectedItems")}this._selection.setSelection(this._getKeysByItems(t))}else{var i=this._getKeysByItems(this.option("selectedItems")),o=this._selection.getSelectedItemKeys();this._compareKeys(o,i)||this._selection.setSelection(i)}return(new g.Deferred).resolve().promise()},_itemClickHandler:function(t){this._createAction(function(t){this._itemSelectHandler(t.event)}.bind(this),{validatingTargetName:"itemElement"})({itemElement:(0,i.default)(t.currentTarget),event:t}),this.callBase.apply(this,arguments)},_itemSelectHandler:function(t){if(this.option("selectionByClick")){var e=t.currentTarget;this.isItemSelected(e)?this.unselectItem(t.currentTarget):this.selectItem(t.currentTarget)}},_selectedItemElement:function(t){return this._itemElements().eq(t)},_postprocessRenderItem:function(t){if("none"!==this.option("selectionMode")){var e=(0,i.default)(t.itemElement),n=this._editStrategy.getNormalizedIndex(e),o=this._isItemSelected(n);this._processSelectableItem(e,o)}},_processSelectableItem:function(t,e){t.toggleClass(this._selectedItemClass(),e),this._setAriaSelected(t,String(e))},_updateSelectedItems:function(t){var e=this,n=t.addedItemKeys,i=t.removedItemKeys;if(e._rendered&&(n.length||i.length)){var o=e._selectionChangePromise;if(!e._rendering){var r,a=[],s=[];e._editStrategy.beginCache();for(var l=0;l]*>(.|\r\n|\r|\n)*?<\/svg>\s*$/i.test(t)?"svg":/data:.*base64|\.|[^<\s]\//.test(t)?"image":/^[\w-_]+$/.test(t)?"dxIcon":!!/^\s?([\w-_]\s?)+$/.test(t)&&"fontIcon")};e.getImageSourceType=a,e.getImageContainer=function(t){switch(a(t)){case"image":return(0,r.default)("").attr("src",t).addClass("dx-icon");case"fontIcon":return(0,r.default)("").addClass("".concat("dx-icon"," ").concat(t));case"dxIcon":return(0,r.default)("").addClass("".concat("dx-icon"," ").concat("dx-icon","-").concat(t));case"svg":return(0,r.default)("").addClass("".concat("dx-icon"," ").concat("dx-svg-icon")).append(t);default:return null}}},function(t,e,n){"use strict";function i(t,e){if(null==t)return{};var n,i,o={},r=Object.keys(t);for(i=0;i=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(344),o=Object.prototype.toString;function r(t){return"[object Array]"===o.call(t)}function a(t){return"undefined"===typeof t}function s(t){return null!==t&&"object"===typeof t}function l(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n=0&&a.splice(e,1)}a.length||o(r)}))}));return function(){s.forEach((function(t){return t()}))}}(t,e,n,i,o)}));return function(){r&&r(),a&&a()}};e.BindableTemplate=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(l,t);var e,n,o,s=h(l);function l(t,e,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(o=s.call(this))._render=t,o._fields=e,o._fieldsMap=i||{},o._watchMethod=n,o}return e=l,(n=[{key:"_renderCore",value:function(t){var e=this,n=(0,i.default)(t.container),o=m(t.model,this._watchMethod,this._fields,this._fieldsMap,(function(i){n.empty(),e._render(n,i,t.model)}));return(0,r.on)(n,a.default,o),n.contents()}}])&&c(e.prototype,n),o&&c(e,o),l}(o.TemplateBase)},function(t,e,n){"use strict";var i=p(n(89)),o=n(16),r=n(4),a=n(5),s=n(2),l=p(n(369)),u=p(n(51)),c=p(n(38)),d=n(370),h=p(n(261)),f=p(n(658));function p(t){return t&&t.__esModule?t:{default:t}}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1?e.formatType=n:n in y&&(e.power=y[n])})),e.power&&!e.formatType&&(e.formatType="fixedpoint"),e.formatType?e:void 0}},_calculateNumberPower:function(t,e,n,i){var o=Math.abs(t),r=0;if(o>1)for(;o&&o>=e&&(void 0===i||r0&&o<1)for(;o<1&&(void 0===n||r>n);)r--,o*=e;return r},_getNumberByPower:function(t,e,n){for(var i=t;e>0;)i/=n,e--;for(;e<0;)i*=n,e++;return i},_formatNumber:function(t,e,n){"auto"===e.power&&(e.power=this._calculateNumberPower(t,1e3,0,4)),e.power&&(t=this._getNumberByPower(t,e.power,1e3));var i=this.defaultLargeNumberFormatPostfixes[e.power]||"",o=this._formatNumberCore(t,e.formatType,n);return o=o.replace(/(\d|.$)(\D*)$/,"$1"+i+"$2")},_formatNumberExponential:function(t,e){var n=this._calculateNumberPower(t,10),i=this._getNumberByPower(t,n,10);void 0===e.precision&&(e.precision=1),i.toFixed(e.precision||0)>=10&&(n++,i/=10);var o=(n>=0?"+":"")+n.toString();return this._formatNumberCore(i,"fixedpoint",e)+"E"+o},_addZeroes:function(t,e){for(var n=Math.pow(10,e),i=t<0?"-":"",o=(t=(Math.abs(t)*n>>>0)/n).toString();o.length15?NaN:+o*this.getSign(t,e)}},_calcSignificantDigits:function(t){var e=m(t.split("."),2),n=e[0],i=e[1],o=function(t){for(var e=-1,n=0;n-1?t.length-e:0},r=0;return n&&(r+=o(n.split(""))),i&&(r+=o(i.split("").reverse())),r}});b.inject(h.default),_&&b.inject(f.default),t.exports=b},function(t,e,n){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";e.a=function(t,e){if(!t)throw new Error("Invariant failed")}},function(t,e,n){"use strict";var i=n(15),o=n(89),r=n(10),a=n(113),s=[],l=a((function(){var t=i.listen(i.getDocument(),"DOMContentLoaded",(function(){u.fire(),t()}))})),u={add:function(t){var e=r.hasWindow();e&&("complete"===i.getReadyState()||"loading"!==i.getReadyState()&&!i.getDocumentElement().doScroll)?t():(s.push(t),e&&l())},fire:function(){s.forEach((function(t){return t()})),s=[]}};t.exports=o(u)},function(t,e,n){"use strict";var i=n(211),o=n(38),r={},a=i(o.ERROR_MESSAGES,{E4000:"[DevExpress.data]: {0}",E4001:"Unknown aggregating function is detected: '{0}'",E4002:"Unsupported OData protocol version is used",E4003:"Unknown filter operation is used: {0}",E4004:"The thenby() method is called before the sortby() method",E4005:"Store requires a key expression for this operation",E4006:"ArrayStore 'data' option must be an array",E4007:"Compound keys cannot be auto-generated",E4008:"Attempt to insert an item with the a duplicated key",E4009:"Data item cannot be found",E4010:"CustomStore does not support creating queries",E4011:"Custom Store method is not implemented or is not a function: {0}",E4012:"Custom Store method returns an invalid value: {0}",E4013:"Local Store requires the 'name' configuration option is specified",E4014:"Unknown data type is specified for ODataStore: {0}",E4015:"Unknown entity name or alias is used: {0}",E4016:"The compileSetter(expr) method is called with 'self' passed as a parameter",E4017:"Keys cannot be modified",E4018:"The server has returned a non-numeric value in a response to an item count request",E4019:"Mixing of group operators inside a single group of filter expression is not allowed",E4020:"Unknown store type is detected: {0}",E4021:"The server response does not provide the totalCount value",E4022:"The server response does not provide the groupCount value",E4023:"Could not parse the following XML: {0}",E4024:"String function {0} cannot be used with the data field {1} of type {2}.",W4000:"Data returned from the server has an incorrect structure",W4001:'The {0} field is listed in both "keyType" and "fieldTypes". The value of "fieldTypes" is used.',W4002:"Data loading has failed for some cells due to the following error: {0}"});r={errors:a,errorHandler:null,_errorHandler:function(t){r.errorHandler&&r.errorHandler(t)}},t.exports=r},function(t,e,n){"use strict";var i=n(3),o=function(t,e){for(var n=function(t){var e=t.children(".dx-inkripple");return 0===e.length&&(e=i("
").addClass("dx-inkripple").appendTo(t)),e}(t),o=n.children(".dx-inkripple-wave").toArray(),r=o.length;r").appendTo(n).addClass("dx-inkripple-wave");o.push(a[0])}return i(o)};function r(t,e){var n=o(e.element,t.wavesNumber).eq(e.wave||0);t.hidingTimeout&&clearTimeout(t.hidingTimeout),s(n),n.css(function(t,e){var n,i,o=e.element,r=o.outerWidth(),a=o.outerHeight(),s=parseInt(Math.sqrt(r*r+a*a)),l=Math.min(4e3,parseInt(s*t.waveSizeCoefficient));if(t.isCentered)n=(r-l)/2,i=(a-l)/2;else{var u=e.event,c=e.element.offset();n=u.pageX-c.left-l/2,i=u.pageY-c.top-l/2}return{left:n,top:i,height:l,width:l}}(t,e)),t.showingTimeout=setTimeout(a.bind(this,t,n),0)}function a(t,e){var n=t.durations.showingScale+"ms";e.addClass("dx-inkripple-showing").css("transitionDuration",n)}function s(t){t.removeClass("dx-inkripple-hiding").css("transitionDuration","")}function l(t,e){t.showingTimeout&&clearTimeout(t.showingTimeout);var n=o(e.element,e.wavesNumber).eq(e.wave||0),i=t.durations,r=i.hidingScale+"ms, "+i.hidingOpacity+"ms";n.addClass("dx-inkripple-hiding").removeClass("dx-inkripple-showing").css("transitionDuration",r);var a=Math.max(i.hidingScale,i.hidingOpacity);t.hidingTimeout=setTimeout(s.bind(this,n),a)}t.exports={render:function(t){void 0===(t=t||{}).useHoldAnimation&&(t.useHoldAnimation=!0);var e,n={waveSizeCoefficient:t.waveSizeCoefficient||2,isCentered:t.isCentered||!1,wavesNumber:t.wavesNumber||1,durations:(e=t.useHoldAnimation,{showingScale:e?1e3:300,hidingScale:300,hidingOpacity:300})};return{showWave:r.bind(this,n),hideWave:l.bind(this,n)}}}},function(t,e,n){"use strict";t.exports=n(371),t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(3),o=n(10).getNavigator(),r=n(58),a=n(36),s=n(0).extend,l=n(18),u=n(8),c=n(20),d=c.inherit({_getDefaultOptions:function(){return s(this.callBase(),{indicatorSrc:"",activeStateEnabled:!1,hoverStateEnabled:!1,_animatingSegmentCount:1,_animatingSegmentInner:!1})},_defaultOptionsRules:function(){var t=a.current();return this.callBase().concat([{device:function(){return"android"===l.real().platform&&!/chrome/i.test(o.userAgent)},options:{viaImage:!0}},{device:function(){return a.isIos7(t)},options:{_animatingSegmentCount:11}},{device:function(){return a.isMaterial(t)},options:{_animatingSegmentCount:2,_animatingSegmentInner:!0}},{device:function(){return a.isGeneric(t)},options:{_animatingSegmentCount:7}}])},_init:function(){this.callBase(),this.$element().addClass("dx-loadindicator")},_initMarkup:function(){this.callBase(),this._renderWrapper(),this._renderIndicatorContent(),this._renderMarkup()},_renderWrapper:function(){this._$wrapper=i("
").addClass("dx-loadindicator-wrapper"),this.$element().append(this._$wrapper)},_renderIndicatorContent:function(){this._$content=i("
").addClass("dx-loadindicator-content"),this._$wrapper.append(this._$content)},_renderMarkup:function(){!r.animation()||this.option("viaImage")||this.option("indicatorSrc")?this._renderMarkupForImage():this._renderMarkupForAnimation()},_renderMarkupForAnimation:function(){var t=this.option("_animatingSegmentInner");this._$indicator=i("
").addClass("dx-loadindicator-icon"),this._$content.append(this._$indicator);for(var e=this.option("_animatingSegmentCount");e>=0;--e){var n=i("
").addClass("dx-loadindicator-segment").addClass("dx-loadindicator-segment"+e);t&&n.append(i("
").addClass("dx-loadindicator-segment-inner")),this._$indicator.append(n)}},_renderMarkupForImage:function(){var t=this.option("indicatorSrc");this._$wrapper.addClass("dx-loadindicator-image"),t&&this._$wrapper.css("backgroundImage","url("+t+")")},_renderDimensions:function(){this.callBase(),this._updateContentSizeForAnimation()},_updateContentSizeForAnimation:function(){if(this._$indicator){var t=this.option("width"),e=this.option("height");if(t||e){t=this.$element().width(),e=this.$element().height();var n=Math.min(e,t);this._$wrapper.css({height:n,width:n,fontSize:n})}}},_clean:function(){this.callBase(),this._removeMarkupForAnimation(),this._removeMarkupForImage()},_removeMarkupForAnimation:function(){this._$indicator&&(this._$indicator.remove(),delete this._$indicator)},_removeMarkupForImage:function(){this._$wrapper.css("backgroundImage","none")},_optionChanged:function(t){switch(t.name){case"_animatingSegmentCount":case"_animatingSegmentInner":case"indicatorSrc":this._invalidate();break;default:this.callBase(t)}}});u("dxLoadIndicator",d),t.exports=d,t.exports.default=t.exports},function(t,e,n){"use strict";var i,o=n(0).extend,r=n(5).each,a=n(13),s=n(36),l={},u={},c={},d=o,h=r,f=a.normalizeEnum,p=null,m=0,g={};function _(t){var e=f(t);return l[e]||l[u[e]||b()]}function v(t,e){return u[t+"."+e]||c[t+"."+e]||u[t]}function y(t,e,n){return v(t+e,n)||v(t,n)}function b(t,e){if(!arguments.length)return p||v(s.current())||i;var n=f(e);return p=(t&&t.platform?y(f(t.platform),t.version,n):v(f(t),n))||p,this}function w(t,e){var n=function(t,e){var n=t.indexOf(e);return n>0?{name:t.substring(0,n),scheme:t.substring(n+1)}:null}(t,".")||{name:t},i=n.name,o=n.scheme;o?(u[i]=u[i]||e,u[i+"."+o]=e):u[i]=e}function x(t,e,n,i){var o=n?n[e]:i;void 0!==o&&void 0===t[e]&&(t[e]=o)}function C(t,e,n,i){var o=n?n[e]:i;void 0!==o&&(t[e]=d(!0,{},o,t[e]))}d(e,{currentTheme:b,registerTheme:function(t,e){var n=f(t&&t.name);n&&(t.isDefault&&(i=n),w(n,n),l[n]=d(!0,{},_(e),function(t){return x((t=d(!0,{loadingIndicator:{font:{}},export:{font:{}},legend:{font:{},border:{}},title:{font:{}},tooltip:{font:{}},"chart:common":{},"chart:common:axis":{grid:{},minorGrid:{},tick:{},minorTick:{},title:{font:{}},label:{font:{}}},"chart:common:annotation":{font:{},border:{}},chart:{commonSeriesSettings:{candlestick:{}}},pie:{},polar:{},gauge:{scale:{tick:{},minorTick:{},label:{font:{}}}},barGauge:{},funnel:{},sankey:{},map:{background:{}},treeMap:{tile:{selectionStyle:{border:{}}},group:{border:{},selectionStyle:{border:{}},label:{font:{}}}},rangeSelector:{scale:{tick:{},minorTick:{},label:{font:{}}},chart:{}},sparkline:{},bullet:{}},t)).loadingIndicator,"backgroundColor",t),x(t.chart.commonSeriesSettings.candlestick,"innerColor",null,t.backgroundColor),x(t.map.background,"color",null,t.backgroundColor),x(t.title.font,"color",null,t.primaryTitleColor),C(t.title,"subtitle",null,t.title),x(t.legend.font,"color",null,t.secondaryTitleColor),x(t.legend.border,"color",null,t.gridColor),function(t){var e=t["chart:common:axis"];h([e.grid,e.minorGrid],(function(e,n){x(n,"color",null,t.gridColor)})),h([e,e.tick,e.minorTick,e.label.font],(function(e,n){x(n,"color",null,t.axisColor)})),x(e.title.font,"color",null,t.secondaryTitleColor),x(t.gauge.scale.label.font,"color",null,t.axisColor),x(t.gauge.scale.tick,"color",null,t.backgroundColor),x(t.gauge.scale.minorTick,"color",null,t.backgroundColor),x(t.rangeSelector.scale.label.font,"color",null,t.axisColor)}(t),h(["chart","pie","polar","gauge","barGauge","map","treeMap","funnel","rangeSelector","sparkline","bullet","sankey"],(function(e,n){x(t[n],"redrawOnResize",t),x(t[n],"containerBackgroundColor",null,t.backgroundColor),C(t[n],"tooltip",t),C(t[n],"export",t)})),h(["chart","pie","polar","gauge","barGauge","map","treeMap","funnel","rangeSelector","sankey"],(function(e,n){C(t[n],"loadingIndicator",t),C(t[n],"legend",t),C(t[n],"title",t)})),h(["chart","pie","polar"],(function(e,n){C(t,n,null,t["chart:common"])})),h(["chart","polar"],(function(e,n){t[n]=t[n]||{},C(t[n],"commonAxisSettings",null,t["chart:common:axis"]),C(t[n],"commonAnnotationSettings",null,t["chart:common:annotation"])})),C(t.rangeSelector.chart,"commonSeriesSettings",t.chart),C(t.rangeSelector.chart,"dataPrepareSettings",t.chart),x(t.treeMap.group.border,"color",null,t.gridColor),x(t.treeMap.tile.selectionStyle.border,"color",null,t.primaryTitleColor),x(t.treeMap.group.selectionStyle.border,"color",null,t.primaryTitleColor),x(t.map.legend,"backgroundColor",t),function(t){var e=t.map;h(["area","line","marker"],(function(t,n){C(e,"layer:"+n,null,e.layer)})),h(["dot","bubble","pie","image"],(function(t,n){C(e,"layer:marker:"+n,null,e["layer:marker"])}))}(t),t}(t)))},getTheme:_,registerThemeAlias:function(t,e){w(f(t),f(e))},registerThemeSchemeAlias:function(t,e){c[t]=e},refreshTheme:function(){return h(g,(function(){this.refresh()})),this},addCacheItem:function(t){var e=++m;t._cache=e,g[e]=t},removeCacheItem:function(t){delete g[t._cache]}})},function(t,e,n){"use strict";var i,o=n(313),r=n(203),a=(i=r)&&i.__esModule?i:{default:i},s=n(146),l=n(147),u=n(13),c=n(4),d=n(2),h=n(0);var f=Math.max,p={lefttoprightbottom:[1,1],leftbottomrighttop:[1,-1],righttopleftbottom:[-1,1],rightbottomlefttop:[-1,-1]};function m(t){return t>0?Math.round(t):0}n(519),n(146).setDefaultAlgorithm("squarified"),n(521),n(147).setDefaultColorizer("discrete");var g=n(118).inherit({_handlers:{beginBuildNodes:c.noop,buildNode:c.noop,endBuildNodes:c.noop,setTrackerData:c.noop,calculateState:function(t){return(0,o.buildRectAppearance)(t)}},_rootClass:"dxtm-tree-map",_rootClassPrefix:"dxtm",_getDefaultSize:function(){return{width:400,height:400}},_setDeprecatedOptions:function(){this.callBase.apply(this,arguments),(0,h.extend)(this._deprecatedOptions,{resolveLabelOverflow:{since:"19.1",message:"Use the 'tile.label.overflow' and 'group.label.textOverflow' option instead"}})},_themeSection:"treeMap",_fontFields:["tile.label.font","group.label.font"],_init:function(){var t=this;t._rectOffsets={},t._handlers=Object.create(t._handlers),t._context={suspend:function(){t._applyingChanges||t._suspendChanges()},resume:function(){t._applyingChanges||t._resumeChanges()},change:function(e){t._change(e)},settings:[{},{}],calculateState:t._handlers.calculateState,calculateLabelState:o.buildTextAppearance},t._root=t._topNode={nodes:[]},t.callBase.apply(t,arguments)},_initialChanges:["DATA_SOURCE"],_initCore:function(){var t=this._renderer;this._createProxyType(),this._tilesGroup=t.g().linkOn(t.root,"tiles").linkAppend(),this._labelsGroup=t.g().linkOn(t.root,"labels").linkAppend()},_createProxyType:c.noop,_disposeCore:function(){this._filter&&this._filter.dispose(),this._labelsGroup.linkOff(),this._tilesGroup.linkOff()},_applySize:function(t){this._tilingRect=t.slice(),this._change(["TILING"])},_optionChangesMap:{dataSource:"DATA_SOURCE",valueField:"NODES_CREATE",childrenField:"NODES_CREATE",colorField:"TILES",colorizer:"TILES",labelField:"LABELS",tile:"TILE_SETTINGS",group:"GROUP_SETTINGS",maxDepth:"MAX_DEPTH",layoutAlgorithm:"TILING",layoutDirection:"TILING",resolveLabelOverflow:"LABEL_OVERFLOW"},_themeDependentChanges:["TILE_SETTINGS","GROUP_SETTINGS","MAX_DEPTH"],_changeDataSource:function(){this._isDataExpected=this._isSyncData=!0,this._updateDataSource(),this._isSyncData=!1,this._isDataExpected&&this._suspendChanges()},_dataSourceChangedHandler:function(){this._isDataExpected?(this._isDataExpected=!1,this._change(["NODES_CREATE"]),this._isSyncData||this._resumeChanges()):this._requestChange(["NODES_CREATE"])},_optionChangesOrder:["DATA_SOURCE","TILE_SETTINGS","GROUP_SETTINGS","MAX_DEPTH","LABEL_OVERFLOW"],_change_DATA_SOURCE:function(){this._changeDataSource()},_change_TILE_SETTINGS:function(){this._changeTileSettings()},_change_GROUP_SETTINGS:function(){this._changeGroupSettings()},_change_LABEL_OVERFLOW:function(){this._changeTileSettings(),this._changeGroupSettings()},_change_MAX_DEPTH:function(){this._changeMaxDepth()},_customChangesOrder:["NODES_CREATE","NODES_RESET","TILES","LABELS","TILING","LABELS_LAYOUT"],_change_NODES_CREATE:function(){this._buildNodes()},_change_NODES_RESET:function(){this._resetNodes()},_change_TILES:function(){this._applyTilesAppearance()},_change_LABELS:function(){this._applyLabelsAppearance()},_change_TILING:function(){this._performTiling()},_change_LABELS_LAYOUT:function(){this._performLabelsLayout()},_applyChanges:function(){var t=this;t.callBase.apply(t,arguments),t._isDataExpected||t._drawn(),t._context.forceReset=!1},_buildNodes:function(){var t=this._root=this._topNode=new a.default;t._id=0,t.parent={},t.data={},t.level=t.index=-1,t.ctx=this._context,t.label=null,this._nodes=[t],this._handlers.beginBuildNodes();var e=this._processDataSourceItems(this._dataSourceItems()||[]);!function t(e,n,i,o){var r,s,l,u,c=[],d=o.nodes,h=n.length,f=0;for(s=0;s0&&(r.value=Number(l[o.valueField])),f+=r.value}e.nodes=c,e.value=f}(t,e.items,0,{itemsField:!e.isPlain&&this._getOption("childrenField",!0)||"items",valueField:this._getOption("valueField",!0)||"value",buildNode:this._handlers.buildNode,ctx:this._context,nodes:this._nodes}),this._onNodesCreated(),this._handlers.endBuildNodes(),this._change(["NODES_RESET"])},_onNodesCreated:c.noop,_processDataSourceItems:function(t){return{items:t,isPlain:!1}},_changeTileSettings:function(){var t=this._getOption("tile"),e=this._rectOffsets,n=m(t.border.width),i=n/2,o=1&n?.5:0,r=t.label,a=this._context.settings[0];this._change(["TILES","LABELS"]),a.state=this._handlers.calculateState(t),this._filter=this._filter||this._renderer.shadowFilter("-50%","-50%","200%","200%"),this._filter.attr(r.shadow),this._calculateLabelSettings(a,r,this._filter.id),e.tileEdge===i&&e.tileInner===o||(e.tileEdge=i,e.tileInner=o,this._change(["TILING"]))},_changeGroupSettings:function(){var t=this._getOption("group"),e=t.label,n=this._rectOffsets,i=m(t.border.width),o=i/2,r=1&i?.5:0,a=0,s=m(t.padding),l=this._context.settings[1];this._change(["TILES","LABELS"]),l.state=this._handlers.calculateState(t),this._calculateLabelSettings(l,e),a=t.headerHeight>=0?m(t.headerHeight):l.labelParams.height+2*m(e.paddingTopBottom),this._headerHeight!==a&&(this._headerHeight=a,this._change(["TILING"])),this._groupPadding!==s&&(this._groupPadding=s,this._change(["TILING"])),n.headerEdge===o&&n.headerInner===r||(n.headerEdge=o,n.headerInner=r,this._change(["TILING"]))},_calculateLabelSettings:function(t,e,n){var i=this._getTextBBox(e.font),r=m(e.paddingLeftRight),a=m(e.paddingTopBottom),s=this._getOption("tile.label"),l=this._getOption("group.label");t.labelState=(0,o.buildTextAppearance)(e,n),t.labelState.visible=!("visible"in e)||!!e.visible,t.labelParams={height:i.height,rtlEnabled:this._getOption("rtlEnabled",!0),paddingTopBottom:a,paddingLeftRight:r,resolveLabelOverflow:this._options.silent("resolveLabelOverflow"),tileLabelWordWrap:s.wordWrap,tileLabelOverflow:s.textOverflow,groupLabelOverflow:l.textOverflow}},_changeMaxDepth:function(){var t=this._getOption("maxDepth",!0);t=t>=1?Math.round(t):1/0,this._maxDepth!==t&&(this._maxDepth=t,this._change(["NODES_RESET"]))},_resetNodes:function(){this._tilesGroup.clear(),this._renderer.initHatching(),this._context.forceReset=!0,this._context.minLevel=this._topNode.level+1,this._context.maxLevel=this._context.minLevel+this._maxDepth-1,this._change(["TILES","LABELS","TILING"])},_processNodes:function(t,e){!function t(e,n,i){var o,r,a=n.nodes,s=a.length;for(r=0;r0&&t.algorithm({items:o.slice(),sum:a,rect:e.innerRect.slice(),isRotated:1&i[0].level,directions:t.directions}),n=0;n(o>>1)-1?(o>>1)-l:l,r.isubn(s)):s=0,i[a]=s,r.iushrn(1)}return i},i.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var r,a,s,l=t.andln(3)+i&3,u=e.andln(3)+o&3;if(3===l&&(l=-1),3===u&&(u=-1),0===(1&l))r=0;else r=3!==(s=t.andln(7)+i&7)&&5!==s||2!==u?l:-l;if(n[0].push(r),0===(1&u))a=0;else a=3!==(s=e.andln(7)+o&7)&&5!==s||2!==l?u:-u;n[1].push(a),2*i===r+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return n},i.cachedProperty=function(t,e,n){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=n.call(this)}},i.parseBytes=function(t){return"string"===typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new o(t,"hex","le")}},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}}(),t.exports=n(591)},function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return I})),n.d(e,"d",(function(){return E})),n.d(e,"c",(function(){return m})),n.d(e,"f",(function(){return g})),n.d(e,"e",(function(){return p}));var i=n(41);function o(t){return"/"===t.charAt(0)}function r(t,e){for(var n=e,i=n+1,o=t.length;i=0;h--){var f=a[h];"."===f?r(a,h):".."===f?(r(a,h),d++):d&&(r(a,h),d--)}if(!u)for(;d--;d)a.unshift("..");!u||""===a[0]||a[0]&&o(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var l=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,i){return t(e,n[i])}));if("object"===typeof e||"object"===typeof n){var i=s(e),o=s(n);return i!==e||o!==n?t(i,o):Object.keys(Object.assign({},e,n)).every((function(i){return t(e[i],n[i])}))}return!1},u=n(76);function c(t){return"/"===t.charAt(0)?t:"/"+t}function d(t){return"/"===t.charAt(0)?t.substr(1):t}function h(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function f(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function p(t){var e=t.pathname,n=t.search,i=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(o+="#"===i.charAt(0)?i:"#"+i),o}function m(t,e,n,o){var r;"string"===typeof t?(r=function(t){var e=t||"/",n="",i="",o=e.indexOf("#");-1!==o&&(i=e.substr(o),e=e.substr(0,o));var r=e.indexOf("?");return-1!==r&&(n=e.substr(r),e=e.substr(0,r)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i}}(t)).state=e:(void 0===(r=Object(i.a)({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=a(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function g(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&l(t.state,e.state)}function _(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,o){if(null!=t){var r="function"===typeof t?t(e,n):t;"string"===typeof r?"function"===typeof i?i(r,o):o(!0):o(!1!==r)}else o(!0)},appendListener:function(t){var n=!0;function i(){n&&t.apply(void 0,arguments)}return e.push(i),function(){n=!1,e=e.filter((function(t){return t!==i}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),i=0;ie?n.splice(e,n.length-e,i):n.push(i),d({action:"PUSH",location:i,index:e,entries:n})}}))},replace:function(t,e){var i=m(t,e,h(),b.location);c.confirmTransitionTo(i,"REPLACE",n,(function(t){t&&(b.entries[b.index]=i,d({action:"REPLACE",location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(t){var e=b.index+t;return e>=0&&ee.max&&(n+=t.myLocation-e.max),n},S=function(t,e,n){return e.myLocationn.max?"h"===t?"right":"bottom":"none"},k=function(t){t.myLocation=t.atLocation+w(t.atAlign)*t.atSize-w(t.myAlign)*t.mySize+t.offset},I={fit:function(t,e){var n=!1;t.myLocation>e.max&&(t.myLocation=e.max,n=!0),t.myLocatione.max)){var n=c({},t,{myAlign:x(t.myAlign),atAlign:x(t.atAlign),offset:-t.offset});k(n),n.oversize=C(n,e),(n.myLocation>=e.min&&n.myLocation<=e.max||t.oversize>n.oversize)&&(t.myLocation=n.myLocation,t.oversize=n.oversize,t.flip=!0)}},flipfit:function(t,e){this.flip(t,e),this.fit(t,e)},none:function(t){t.oversize=0}},T=function(){var t=o("
").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo(o("body")),e=t.get(0).offsetWidth-t.get(0).clientWidth;t.remove(),i=e},E={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},O=function(t,e){var n=o(t),a=n.offset(),h=c(!0,{},E,{h:{location:a.left},v:{location:a.top}});if(!e)return h;var f=y(e.my),m=y(e.at),g=o(e.of).length&&e.of||s,w=b(e.offset),x=function(t){var e=r.splitPair(t),n=String(e&&e[0]).toLowerCase(),i=String(e&&e[1]).toLowerCase();return _.test(n)||(n="none"),_.test(i)||(i=n),{h:n,v:i}}(e.collision),O=e.boundary,M=b(e.boundaryOffset),P={mySize:n.outerWidth(),myAlign:f.h,atAlign:m.h,offset:w.h,collision:x.h,boundaryOffset:M.h},D={mySize:n.outerHeight(),myAlign:f.v,atAlign:m.v,offset:w.v,collision:x.v,boundaryOffset:M.v};if(g.preventDefault)P.atLocation=g.pageX,D.atLocation=g.pageY,P.atSize=0,D.atSize=0;else if(g=o(g),u(g[0]))P.atLocation=g.scrollLeft(),D.atLocation=g.scrollTop(),P.atSize=g[0].innerWidth>=g[0].outerWidth?g[0].innerWidth:g.width(),D.atSize=g[0].innerHeight>=g[0].outerHeight||v?g[0].innerHeight:g.height();else if(9===g[0].nodeType)P.atLocation=0,D.atLocation=0,P.atSize=g.width(),D.atSize=g.height();else{var A=d(g.get(0)),R=g.offset();P.atLocation=R.left,D.atLocation=R.top,P.atSize=A.width,D.atSize=A.height}k(P),k(D);var B=function(){var t=o(s),e=t.width(),n=t.height(),r=t.scrollLeft(),a=t.scrollTop(),u=l.getDocumentElement(),c=p.touch?u.clientWidth/e:1,d=p.touch?u.clientHeight/n:1;void 0===i&&T();var h=e,f=n;if(O){var m=o(O),g=m.offset();r=g.left,a=g.top,h=m.width(),f=m.height()}return{h:{min:r+P.boundaryOffset,max:r+h/c-P.mySize-P.boundaryOffset},v:{min:a+D.boundaryOffset,max:a+f/d-D.mySize-D.boundaryOffset}}}();P.oversize=C(P,B.h),D.oversize=C(D,B.v),P.collisionSide=S("h",P,B.h),D.collisionSide=S("v",D,B.v),I[P.collision]&&I[P.collision](P,B.h),I[D.collision]&&I[D.collision](D,B.v);var N=function(t){return e.precise?t:Math.round(t)};return c(!0,h,{h:{location:N(P.myLocation),oversize:N(P.oversize),fit:P.fit,flip:P.flip,collisionSide:P.collisionSide},v:{location:N(D.myLocation),oversize:N(D.oversize),fit:D.fit,flip:D.flip,collisionSide:D.collisionSide},precise:e.precise}),h},M=function(t,e){var n=o(t);if(!e)return n.offset();f.resetPosition(n,!0);var i=n.offset(),r=e.h&&e.v?e:O(n,e),a=function(t){return e.precise?t:Math.round(t)};return f.move(n,{left:r.h.location-a(i.left),top:r.v.location-a(i.top)}),r};M.inverseAlign||(M.inverseAlign=x),M.normalizeAlign||(M.normalizeAlign=y),t.exports={calculateScrollbarWidth:T,calculate:O,setup:M,offset:function(t){return t=o(t).get(0),u(t)?null:t&&"pageY"in t&&"pageX"in t?{top:t.pageY,left:t.pageX}:o(t).offset()}}},function(t,e,n){"use strict";var i=n(3),o=n(15),r=function(t,e){if(!function(t){var e=i(t);return e.is(":visible")&&"hidden"!==e.css("visibility")&&"hidden"!==e.parents().css("visibility")}(t))return!1;var n=t.nodeName.toLowerCase(),o=!isNaN(e),r=t.disabled,a=/^(input|select|textarea|button|object|iframe)$/.test(n),s="a"===n,l=t.isContentEditable;return a||l?!r:s&&t.href||o};t.exports={focusable:function(t,e){return r(e,i(e).attr("tabIndex"))},tabbable:function(t,e){var n=i(e).attr("tabIndex");return(isNaN(n)||n>=0)&&r(e,n)},focused:function(t){var e=i(t).get(0);return o.getActiveElement()===e}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataSource=void 0;var i=v(n(21)),o=n(0),r=v(n(4)),a=n(5),s=n(2),l=n(60),u=v(n(190)),c=v(n(191)),d=n(153),h=n(78),f=v(n(16)),p=v(n(634)),m=n(7),g=v(n(635)),_=n(100);function v(t){return t&&t.__esModule?t:{default:t}}e.DataSource=i.default.inherit({ctor:function(t){var e,n=this;t=(0,_.normalizeDataSourceOptions)(t),this._eventsStrategy=new d.EventsStrategy(this);var i=0!==t.pushAggregationTimeout?(0,l.throttleChanges)(this._onPush,(function(){return void 0===t.pushAggregationTimeout?5*n._changedTime:t.pushAggregationTimeout})):this._onPush;this._changedTime=0,this._onPushHandler=function(t){n._aggregationTimeoutId=i.call(n,t)},this._store=t.store,this._store.on("push",this._onPushHandler),this._storeLoadOptions=this._extractLoadOptions(t),this._mapFunc=t.map,this._postProcessFunc=t.postProcess,this._pageIndex=void 0!==t.pageIndex?t.pageIndex:0,this._pageSize=void 0!==t.pageSize?t.pageSize:20,this._loadingCount=0,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in t?t.searchValue:null,this._searchOperation=t.searchOperation||"contains",this._searchExpr=t.searchExpr,this._paginate=t.paginate,this._reshapeOnPush=null!==(e=t.reshapeOnPush)&&void 0!==e&&e,(0,a.each)(["onChanged","onLoadError","onLoadingChanged","onCustomizeLoadResult","onCustomizeStoreLoadOptions"],(function(e,i){i in t&&n.on(i.substr(2,1).toLowerCase()+i.substr(3),t[i])})),this._operationManager=new g.default,this._init()},_init:function(){this._items=[],this._userData={},this._totalCount=-1,this._isLoaded=!1,(0,s.isDefined)(this._paginate)||(this._paginate=!this.group()),this._isLastPage=!this._paginate},dispose:function(){var t;this._store.off("push",this._onPushHandler),this._eventsStrategy.dispose(),clearTimeout(this._aggregationTimeoutId),delete this._store,null===(t=this._delayedLoadTask)||void 0===t||t.abort(),this._operationManager.cancelAll(),this._disposed=!0},_extractLoadOptions:function(t){var e={},n=["sort","filter","select","group","requireTotalCount"],i=this._store._customLoadOptions();return i&&(n=n.concat(i)),(0,a.each)(n,(function(){e[this]=t[this]})),e},loadOptions:function(){return this._storeLoadOptions},items:function(){return this._items},pageIndex:function(t){if(!(0,s.isNumeric)(t))return this._pageIndex;this._pageIndex=t,this._isLastPage=!this._paginate},paginate:function(t){if(!(0,s.isBoolean)(t))return this._paginate;this._paginate!==t&&(this._paginate=t,this.pageIndex(0))},pageSize:function(t){if(!(0,s.isNumeric)(t))return this._pageSize;this._pageSize=t},isLastPage:function(){return this._isLastPage},generateStoreLoadOptionAccessor:function(t){var e=this;return function(n){var i=(0,_.normalizeStoreLoadOptionAccessorArguments)(n);if(void 0===i)return e._storeLoadOptions[t];e._storeLoadOptions[t]=i}},sort:function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&(t=[].slice.call(arguments)),this._searchExpr=t,this.pageIndex(0)},store:function(){return this._store},key:function(){var t;return null===(t=this._store)||void 0===t?void 0:t.key()},totalCount:function(){return this._totalCount},isLoaded:function(){return this._isLoaded},isLoading:function(){return this._loadingCount>0},beginLoading:function(){this._changeLoadingCount(1)},endLoading:function(){this._changeLoadingCount(-1)},_createLoadQueue:function(){return p.default.create()},_changeLoadingCount:function(t){var e=this.isLoading();this._loadingCount+=t;var n=this.isLoading();e^n&&this._eventsStrategy.fireEvent("loadingChanged",[n])},_scheduleLoadCallbacks:function(t){var e=this;this.beginLoading(),t.always((function(){e.endLoading()}))},_scheduleFailCallbacks:function(t){var e=this;t.fail((function(){for(var t=arguments.length,n=new Array(t),i=0;i1)for(e=o.getDatesDifferences(t[0],t[1]),i=1;i0,minute:t[0].getMinutes()>0,second:t[0].getSeconds()>0,millisecond:t[0].getMilliseconds()>0};return this.getDateFormatByDifferences(e)},getDateFormatByTickInterval:function(t,e,n){var r,a=function(t,e,n){switch(e){case"year":case"quarter":t.month=n;case"month":t.day=n;case"week":case"day":t.hour=n;case"hour":t.minute=n;case"minute":t.second=n;case"second":t.millisecond=n}};n=i.isString(n)?n.toLowerCase():n;var s,l,u,c=o.getDatesDifferences(t,e);return t!==e&&(s=c,l=t>e?e:t,!(u=t>e?t:e).getMilliseconds()&&u.getSeconds()?u.getSeconds()-l.getSeconds()===1&&(s.millisecond=!0,s.second=!1):!u.getSeconds()&&u.getMinutes()?u.getMinutes()-l.getMinutes()===1&&(s.second=!0,s.minute=!1):!u.getMinutes()&&u.getHours()?u.getHours()-l.getHours()===1&&(s.minute=!0,s.hour=!1):!u.getHours()&&u.getDate()>1?u.getDate()-l.getDate()===1&&(s.hour=!0,s.day=!1):1===u.getDate()&&u.getMonth()?u.getMonth()-l.getMonth()===1&&(s.day=!0,s.month=!1):!u.getMonth()&&u.getFullYear()&&u.getFullYear()-l.getFullYear()===1&&(s.month=!0,s.year=!1)),a(c,r=o.getDateUnitInterval(c),!0),a(c,r=o.getDateUnitInterval(n||"second"),!1),c[{week:"day"}[r]||r]=!0,this.getDateFormatByDifferences(c)}})},function(t,e,n){"use strict";var i,o=n(2),r=n(134),a=n(29),s=n(5),l=n(0),u=n(43),c=n(94),d=n(92),h=n(107),f=(i=h)&&i.__esModule?i:{default:i},p=n(7);var m=e.setFieldProperty=function(t,e,n,i){var o=t._initProperties=t._initProperties||{},r=i?n:t[e];Object.prototype.hasOwnProperty.call(o,e)&&!i||(o[e]=r),t[e]=n};e.sendRequest=function(t){return(0,r.sendRequest)(t)};var g=new Date;function _(t){return function e(n,i,o,r,a,s){var l,u;function c(t,a,s){(0,p.when)(e(n,i,o,r,a,s)).done(t.resolve)}for(r=r||[],n=n||[],l=a=a||0;la&&l%1e4===0&&new Date-g>=300)return g=new Date,u=new p.Deferred,setTimeout(c(u,l,!1),0),u;var d=n[l];if(!s){if(r.unshift(d),o&&!1===i(r,l))return;if(d.children){var h=e(d.children,i,o,r);if(t&&h)return u=new p.Deferred,h.done(c(u,l,!0)),u}}if(s=!1,!o&&!1===i(r,l))return;r.shift(),n[l]!==d&&l--}}}function v(t,e,n,i){var r=[];return Object.keys(e||[]).forEach((function(u){if(!u||0!==u.indexOf("__")){for(var c,d,h=1,f=n.length?n+"."+u:u,p=i[f],m=(0,a.compileGetter)(f),g=e[u];!(0,o.isDefined)(g)&&t[h];)g=m(t[h]),h++;!p&&(0,o.isDefined)(g)&&(p=(0,o.type)(g)),c=[{dataField:f,dataType:p,groupName:"date"===p?u:void 0,groupInterval:void 0,displayFolder:n}],"date"===p?c=c.concat((d=c[0],(0,s.map)(["year","quarter","month"],(function(t,e){return(0,l.extend)({},d,{groupInterval:t,groupIndex:e})})))):"object"===p&&(c=v(t,g,f,i)),r.push.apply(r,c)}})),r}e.foreachTree=_(!1),e.foreachTreeAsync=_(!0),e.findField=function(t,e){if(t&&(0,o.isDefined)(e))for(var n=0;na?i=1:r=0;n--)e.push(t[n].key||t[n].value);return e},e.foreachDataLevel=function t(e,n,i,o){i=i||0,o=o||"children",e.length&&n(e,i);for(var r=0;r0&&t.groupInterval;e&&!t.customizeText&&m(t,"customizeText",(function(n){var i=n.value+e,o=(0,c.format)(i,t.format);return n.valueText&&o?n.valueText+" - "+o:""}))}},e.getFiltersByPath=function(t,e){var n=[];e=e||[];for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{},r=(0,p.grep)(this._getSynchronizableOptionsForCreateComponent(),(function(t){return!(t in o)})),a=this.option(),s=a.integrationOptions,l=this.option(),u=l.nestedComponentOptions;u=u||p.noop;var c=(0,h.extend)({integrationOptions:s},u(this));r.forEach((function(t){return c[t]=n.option(t)})),this._extendConfig(o,c);var d=void 0;if((0,g.isString)(e)){var f=(0,i.default)(t)[e](o);d=f[e]("instance")}else t&&((d=e.getInstance(t))?d.option(o):d=new e(t,o));if(d){var _=function(t){var e=t.name,n=t.value;(0,m.inArray)(e,r)>=0&&d.option(e,n)};this.on("optionChanged",_),d.on("disposing",(function(){return n.off("optionChanged",_)}))}return d},_extendConfig:function(t,e){(0,d.each)(e,(function(e,n){!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=n)}))},_defaultActionConfig:function(){var t=this.$element(),e=this._modelByElement(t);return(0,h.extend)(this.callBase(),{context:e})},_defaultActionArgs:function(){var t=this.$element(),e=this._modelByElement(t),n=this.element();return(0,h.extend)(this.callBase(),{element:n,model:e})},_optionChanged:function(t){switch(t.name){case"width":case"height":this._renderDimensions();break;case"rtlEnabled":this._invalidate();break;case"elementAttr":this._renderElementAttributes();break;case"disabled":case"integrationOptions":break;default:this.callBase(t)}},_removeAttributes:function(t){for(var e=t.attributes,n=e.length-1;n>=0;n--){var i=e[n];if(i){var o=i.name;o.indexOf("aria-")&&-1===o.indexOf("dx-")&&"role"!==o&&"style"!==o&&"tabindex"!==o||t.removeAttribute(o)}}},_removeClasses:function(t){t.className=t.className.split(" ").filter((function(t){return 0!==t.lastIndexOf("dx-",0)})).join(" ")},_updateDOMComponent:function(t){t?this._renderComponent():this._requireRefresh&&(this._requireRefresh=!1,this._refresh())},endUpdate:function(){var t=this._isInitializingRequired();this.callBase(),this._isUpdateAllowed()&&this._updateDOMComponent(t)},$element:function(){return this._$element},element:function(){var t=this.$element();return(0,f.getPublicElement)(t)},dispose:function(){var t=this.$element().get(0);(0,c.cleanDataRecursive)(t,!0),t.textContent="",this._removeAttributes(t),this._removeClasses(t)},resetOption:function(t){if(this.callBase(t),"width"===t||"height"===t){var e=this.initialOption(t);!(0,g.isDefined)(e)&&this.$element().css(t,"")}},_getAnonymousTemplateName:function(){},_initTemplateManager:function(){if(!this._templateManager&&this._useTemplates()){var t=this.option().integrationOptions,e=(void 0===t?{}:t).createTemplate;this._templateManager=new l.default(e,this._getAnonymousTemplateName()),this._initTemplates()}},_initTemplates:function(){var t=this,e=this._templateManager.extractTemplates(this.$element()),n=e.templates,i=e.anonymousTemplateMeta,o=this.option("integrationOptions.templates.".concat(i.name));n.forEach((function(e){var n=e.name,i=e.template;t._options.silent("integrationOptions.templates.".concat(n),i)})),i.name&&!o&&this._options.silent("integrationOptions.templates.".concat(i.name),i.template)},_getTemplateByOption:function(t){return this._getTemplate(this.option(t))},_getTemplate:function(t){var e=this.option("integrationOptions.templates"),n=this.option("templatesRenderAsynchronously"),i=this.option("integrationOptions.skipTemplates");return this._templateManager.getTemplate(t,e,{isAsyncTemplate:n,skipTemplates:i},this)},_saveTemplate:function(t,e){this._setOptionWithoutOptionChange("integrationOptions.templates."+t,this._templateManager._createTemplate(e))},_useTemplates:function(){return!0}});w.getInstance=function(t){return(0,u.getInstanceByElement)((0,i.default)(t),this)},w.defaultOptions=function(t){this._classCustomRules=this._classCustomRules||[],this._classCustomRules.push(t)},t.exports=w,t.exports.default=t.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyTemplate=void 0;var i,o=n(3),r=(i=o)&&i.__esModule?i:{default:i},a=n(156);function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n-1){var i=o.data(t,"dxDragEventsCount")||0;o.data(t,"dxDragEventsCount",Math.max(0,i+n))}},remove:function(t,e){this.updateEventsCounter(t,e.type,-1)},teardown:function(t){if(!o.data(t,"dxDragEventsCount")){var e=a(t,g);g.splice(e,1),_.splice(e,1),v.splice(e,1),o.removeData(t,"dxDragEventsCount")}}};u(f,y),u(p,y),u(m,y);h({emitter:d.inherit({ctor:function(t){this.callBase(t),this.direction="both"},_init:function(t){this._initEvent=t},_start:function(t){t=this._fireEvent("dxdragstart",this._initEvent),this._maxLeftOffset=t.maxLeftOffset,this._maxRightOffset=t.maxRightOffset,this._maxTopOffset=t.maxTopOffset,this._maxBottomOffset=t.maxBottomOffset;var e=r(t.targetElements||(null===t.targetElements?[]:g));this._dropTargets=s.map(e,(function(t){return i(t).get(0)}))},_move:function(t){var e=c.eventData(t),n=this._calculateOffset(e);t=this._fireEvent("dxdrag",t,{offset:n}),this._processDropTargets(t),t._cancelPreventDefault||t.preventDefault()},_calculateOffset:function(t){return{x:this._calculateXOffset(t),y:this._calculateYOffset(t)}},_calculateXOffset:function(t){if("vertical"!==this.direction){var e=t.x-this._startEventData.x;return this._fitOffset(e,this._maxLeftOffset,this._maxRightOffset)}return 0},_calculateYOffset:function(t){if("horizontal"!==this.direction){var e=t.y-this._startEventData.y;return this._fitOffset(e,this._maxTopOffset,this._maxBottomOffset)}return 0},_fitOffset:function(t,e,n){return null!=e&&(t=Math.max(t,-e)),null!=n&&(t=Math.min(t,n)),t},_processDropTargets:function(t){var e=this._findDropTarget(t);e===this._currentDropTarget||(this._fireDropTargetEvent(t,p),this._currentDropTarget=e,this._fireDropTargetEvent(t,f))},_fireDropTargetEvent:function(t,e){if(this._currentDropTarget){var n={type:e,originalEvent:t,draggingElement:this._$element.get(0),target:this._currentDropTarget};c.fireEvent(n)}},_findDropTarget:function(t){var e,n=this;return s.each(g,(function(o,r){if(n._checkDropTargetActive(r)){var l=i(r);s.each(function(t){var e=a(t.get(0),g),n=_[e].filter((function(t){return t})),i=t.find(n.join(", "));return-1!==a(void 0,_[e])&&(i=i.add(t)),i}(l),(function(o,r){var s=i(r);n._checkDropTarget(function(t){var e=a(t.get(0),g);return v[e]}(l),s,t)&&(e=r)}))}})),e},_checkDropTargetActive:function(t){var e=!1;return s.each(this._dropTargets,(function(n,i){return!(e=e||i===t||l(i,t))})),e},_checkDropTarget:function(t,e,n){if(e.get(0)===i(n.target).get(0))return!1;var o,r,a=(r=e,(o=t).itemPositionFunc?o.itemPositionFunc(r):r.offset());if(n.pageXa.left+s.width)&&(!(n.pageY>a.top+s.height)&&(!(t.checkDropTarget&&!t.checkDropTarget(e,n))&&e))},_end:function(t){var e=c.eventData(t);this._fireEvent("dxdragend",t,{offset:this._calculateOffset(e)}),this._fireDropTargetEvent(t,m),delete this._currentDropTarget}}),events:["dxdragstart","dxdrag","dxdragend"]}),e.move="dxdrag",e.start="dxdragstart",e.end="dxdragend",e.enter=f,e.leave=p,e.drop=m},function(t,e,n){"use strict";t.exports=n(665),t.exports.default=t.exports},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=S(n(3)),r=S(n(6)),a=S(n(58)),s=S(n(31)),l=S(n(4)),u=S(n(2)),c=n(0),d=n(17),h=S(n(10)),f=S(n(15)),p=S(n(18)),m=S(n(8)),g=S(n(97)),_=S(n(91)),v=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var e=C();if(e&&e.has(t))return e.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=o?Object.getOwnPropertyDescriptor(t,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=t[r]}n.default=t,e&&e.set(t,n);return n}(n(11)),y=S(n(268)),b=S(n(382)),w=S(n(267)),x=n(7);function C(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return C=function(){return t},t}function S(t){return t&&t.__esModule?t:{default:t}}var k="dxScrollable",I="vertical",T=function(){return[{device:function(){return!a.default.nativeScrolling},options:{useNative:!1}},{device:function(t){return!p.default.isSimulator()&&"desktop"===p.default.real().deviceType&&"generic"===t.platform},options:{bounceEnabled:!1,scrollByThumb:!0,scrollByContent:a.default.touch,showScrollbar:"onHover"}}]},E=g.default.inherit({_getDefaultOptions:function(){return(0,c.extend)(this.callBase(),{disabled:!1,onScroll:null,direction:I,showScrollbar:"onScroll",useNative:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,onUpdated:null,onStart:null,onEnd:null,onBounce:null,onStop:null,useSimulatedScrollbar:!1,useKeyboard:!0,inertiaEnabled:!0,pushBackValue:0,updateManually:!1})},_defaultOptionsRules:function(){return this.callBase().concat(T(),[{device:function(){return a.default.nativeScrolling&&"android"===p.default.real().platform&&!s.default.mozilla},options:{useSimulatedScrollbar:!0}},{device:function(){return"ios"===p.default.real().platform},options:{pushBackValue:1}}])},_initOptions:function(t){this.callBase(t),"useSimulatedScrollbar"in t||this._setUseSimulatedScrollbar()},_setUseSimulatedScrollbar:function(){this.initialOption("useSimulatedScrollbar")||this.option("useSimulatedScrollbar",!this.option("useNative"))},_init:function(){this.callBase(),this._initScrollableMarkup(),this._locked=!1},_visibilityChanged:function(t){t?(this.update(),this._updateRtlPosition(),this._savedScrollOffset&&this.scrollTo(this._savedScrollOffset),delete this._savedScrollOffset):this._savedScrollOffset=this.scrollOffset()},_initScrollableMarkup:function(){var t=this.$element().addClass("dx-scrollable"),e=this._$container=(0,o.default)("
").addClass("dx-scrollable-container"),n=this._$wrapper=(0,o.default)("
").addClass("dx-scrollable-wrapper"),i=this._$content=(0,o.default)("
").addClass("dx-scrollable-content");f.default.hasDocumentProperty("onbeforeactivate")&&s.default.msie&&s.default.version<12&&r.default.on(t,v.addNamespace("beforeactivate",k),(function(t){(0,o.default)(t.target).is(_.default.focusable)||t.preventDefault()})),i.append(t.contents()).appendTo(e),e.appendTo(n),n.appendTo(t)},_dimensionChanged:function(){this.update()},_initMarkup:function(){this.callBase(),this._renderDirection()},_render:function(){this._renderStrategy(),this._attachEventHandlers(),this._renderDisabledState(),this._createActions(),this.update(),this.callBase(),this._updateRtlPosition()},_updateRtlPosition:function(){var t=this;this._updateBounds(),this.option("rtlEnabled")&&this.option("direction")!==I&&l.default.deferUpdate((function(){var e=t._container().get(0),n=e.scrollWidth-e.clientWidth;l.default.deferRender((function(){t.scrollTo({left:n})}))}))},_updateBounds:function(){this._strategy.updateBounds()},_attachEventHandlers:function(){var t=this._strategy,e={getDirection:t.getDirection.bind(t),validate:this._validate.bind(this),isNative:this.option("useNative"),scrollTarget:this._$container};r.default.off(this._$wrapper,"."+k),r.default.on(this._$wrapper,v.addNamespace(y.default.init,k),e,this._initHandler.bind(this)),r.default.on(this._$wrapper,v.addNamespace(y.default.start,k),t.handleStart.bind(t)),r.default.on(this._$wrapper,v.addNamespace(y.default.move,k),t.handleMove.bind(t)),r.default.on(this._$wrapper,v.addNamespace(y.default.end,k),t.handleEnd.bind(t)),r.default.on(this._$wrapper,v.addNamespace(y.default.cancel,k),t.handleCancel.bind(t)),r.default.on(this._$wrapper,v.addNamespace(y.default.stop,k),t.handleStop.bind(t)),r.default.off(this._$container,"."+k),r.default.on(this._$container,v.addNamespace("scroll",k),t.handleScroll.bind(t))},_validate:function(t){return!this._isLocked()&&(this._updateIfNeed(),this._strategy.validate(t))},_initHandler:function(){var t=this._strategy;t.handleInit.apply(t,arguments)},_renderDisabledState:function(){this.$element().toggleClass("dx-scrollable-disabled",this.option("disabled")),this.option("disabled")?this._lock():this._unlock()},_renderDirection:function(){this.$element().removeClass("dx-scrollable-horizontal").removeClass("dx-scrollable-"+I).removeClass("dx-scrollable-both").addClass("dx-scrollable-"+this.option("direction"))},_renderStrategy:function(){this._createStrategy(),this._strategy.render(),this.$element().data("dxScrollableStrategy",this._strategy)},_createStrategy:function(){this._strategy=this.option("useNative")?new w.default(this):new b.default.SimulatedStrategy(this)},_createActions:function(){this._strategy&&this._strategy.createActions()},_clean:function(){this._strategy&&this._strategy.dispose()},_optionChanged:function(t){switch(t.name){case"onStart":case"onEnd":case"onStop":case"onUpdated":case"onScroll":case"onBounce":this._createActions();break;case"direction":this._resetInactiveDirection(),this._invalidate();break;case"useNative":this._setUseSimulatedScrollbar(),this._invalidate();break;case"inertiaEnabled":case"scrollByContent":case"scrollByThumb":case"bounceEnabled":case"useKeyboard":case"showScrollbar":case"useSimulatedScrollbar":case"pushBackValue":this._invalidate();break;case"disabled":this._renderDisabledState(),this._strategy&&this._strategy.disabledChanged();break;case"updateManually":break;case"width":this.callBase(t),this._updateRtlPosition();break;default:this.callBase(t)}},_resetInactiveDirection:function(){var t=this._getInactiveProp();if(t&&h.default.hasWindow()){var e=this.scrollOffset();e[t]=0,this.scrollTo(e)}},_getInactiveProp:function(){var t=this.option("direction");return t===I?"left":"horizontal"===t?"top":void 0},_location:function(){return this._strategy.location()},_normalizeLocation:function(t){if(u.default.isPlainObject(t)){var e=l.default.ensureDefined(t.left,t.x),n=l.default.ensureDefined(t.top,t.y);return{left:u.default.isDefined(e)?-e:void 0,top:u.default.isDefined(n)?-n:void 0}}var i=this.option("direction");return{left:i!==I?-t:void 0,top:"horizontal"!==i?-t:void 0}},_isLocked:function(){return this._locked},_lock:function(){this._locked=!0},_unlock:function(){this.option("disabled")||(this._locked=!1)},_isDirection:function(t){var e=this.option("direction");return t===I?"horizontal"!==e:"horizontal"===t?e!==I:e===t},_updateAllowedDirection:function(){var t=this._strategy._allowedDirections();this._isDirection("both")&&t.vertical&&t.horizontal?this._allowedDirectionValue="both":this._isDirection("horizontal")&&t.horizontal?this._allowedDirectionValue="horizontal":this._isDirection(I)&&t.vertical?this._allowedDirectionValue=I:this._allowedDirectionValue=null},_allowedDirection:function(){return this._allowedDirectionValue},_container:function(){return this._$container},$content:function(){return this._$content},content:function(){return(0,d.getPublicElement)(this._$content)},scrollOffset:function(){var t=this._location();return{top:-t.top,left:-t.left}},scrollTop:function(){return this.scrollOffset().top},scrollLeft:function(){return this.scrollOffset().left},clientHeight:function(){return this._$container.height()},scrollHeight:function(){return this.$content().outerHeight()-2*this._strategy.verticalOffset()},clientWidth:function(){return this._$container.width()},scrollWidth:function(){return this.$content().outerWidth()},update:function(){if(this._strategy)return(0,x.when)(this._strategy.update()).done(function(){this._updateAllowedDirection()}.bind(this))},scrollBy:function(t){((t=this._normalizeLocation(t)).top||t.left)&&(this._updateIfNeed(),this._strategy.scrollBy(t))},scrollTo:function(t){t=this._normalizeLocation(t),this._updateIfNeed();var e=this._location();this.option("useNative")||(t=this._strategy._applyScaleRatio(t),e=this._strategy._applyScaleRatio(e));var n=this._normalizeLocation({left:e.left-l.default.ensureDefined(t.left,e.left),top:e.top-l.default.ensureDefined(t.top,e.top)});(n.top||n.left)&&this._strategy.scrollBy(n)},scrollToElement:function(t,e){var n=(0,o.default)(t),i=this.$content().find(t).length,r=n.parents(".dx-scrollable").length-n.parents(".dx-scrollable-content").length===0;if(i&&r){var a={top:0,left:0},s=this.option("direction");s!==I&&(a.left=this.getScrollElementPosition(n,"horizontal",e)),"horizontal"!==s&&(a.top=this.getScrollElementPosition(n,I,e)),this.scrollTo(a)}},scrollToElementTopLeft:function(t){var e=(0,o.default)(t),n=this.$content().find(t).length,i=e.parents(".dx-scrollable").length-e.parents(".dx-scrollable-content").length===0;if(n&&i){var r={top:0,left:0},a=this.option("direction");if(a!==I){var s=this._elementPositionRelativeToContent(e,"left");r.left=!0===this.option("rtlEnabled")?s+e.width()-this.clientWidth():s}"horizontal"!==a&&(r.top=this._elementPositionRelativeToContent(e,"top")),this.scrollTo(r)}},getScrollElementPosition:function(t,e,n){n=n||{};var i=e===I,o=(i?n.top:n.left)||0,r=(i?n.bottom:n.right)||0,a=i?this._strategy.verticalOffset():0,s=this._elementPositionRelativeToContent(t,i?"top":"left")-a,l=t[i?"outerHeight":"outerWidth"](),u=i?this.scrollTop():this.scrollLeft(),c=u-s+o,d=u-s-l+(i?this.clientHeight():this.clientWidth())-r;return c<=0&&d>=0?u:u-(Math.abs(c)>Math.abs(d)?d:c)},_elementPositionRelativeToContent:function(t,e){for(var n=0;this._hasScrollContent(t);)n+=t.position()[e],t=t.offsetParent();return n},_hasScrollContent:function(t){var e=this.$content();return t.closest(e).length&&!t.is(e)},_updateIfNeed:function(){this.option("updateManually")||this.update()},_useTemplates:function(){return!1}});(0,m.default)(k,E),t.exports=E,t.exports.deviceDependentOptions=T},function(t,e,n){"use strict";var i=n(23),o=n(850);t.exports.getDiagram=function(){if(!o)throw i.Error("E1041","devexpress-diagram");return o}},function(t,e,n){"use strict";var i=n(84),o=n(22);function r(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function l(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=o,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),o=0;o>6|192,n[i++]=63&a|128):r(t,o)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++o)),n[i++]=a>>18|240,n[i++]=a>>12&63|128,n[i++]=a>>6&63|128,n[i++]=63&a|128):(n[i++]=a>>12|224,n[i++]=a>>6&63|128,n[i++]=63&a|128)}else for(o=0;o>>0}return a},e.split32=function(t,e){for(var n=new Array(4*t.length),i=0,o=0;i>>24,n[o+1]=r>>>16&255,n[o+2]=r>>>8&255,n[o+3]=255&r):(n[o+3]=r>>>24,n[o+2]=r>>>16&255,n[o+1]=r>>>8&255,n[o]=255&r)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,i){return t+e+n+i>>>0},e.sum32_5=function(t,e,n,i,o){return t+e+n+i+o>>>0},e.sum64=function(t,e,n,i){var o=t[e],r=i+t[e+1]>>>0,a=(r>>0,t[e+1]=r},e.sum64_hi=function(t,e,n,i){return(e+i>>>0>>0},e.sum64_lo=function(t,e,n,i){return e+i>>>0},e.sum64_4_hi=function(t,e,n,i,o,r,a,s){var l=0,u=e;return l+=(u=u+i>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,i,o,r,a,s){return e+i+r+s>>>0},e.sum64_5_hi=function(t,e,n,i,o,r,a,s,l,u){var c=0,d=e;return c+=(d=d+i>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,n,i,o,r,a,s,l,u){return e+i+r+s+u>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){"use strict";var i=n(3),o=n(77).add,r=n(39)(),a=i(),s=function(){var t;return function(e){if(!arguments.length)return t;var n=i(e);a=n;var o=!!n.length,l=s();t=o?n:i("body"),r.fire(o?s():i(),l)}}();o((function(){s(".dx-viewport")})),e.value=s,e.changeCallback=r,e.originalViewPort=function(){return a}},function(t,e,n){"use strict";var i=n(60),o=l(n(61)),r=n(78),a=l(n(192)),s=l(n(190));function l(t){return t&&t.__esModule?t:{default:t}}var u=a.default.inherit({ctor:function(t){t=Array.isArray(t)?{data:t}:t||{},this.callBase(t);var e=t.data;if(e&&!Array.isArray(e))throw r.errors.Error("E4006");this._array=e||[]},createQuery:function(){return(0,o.default)(this._array,{errorHandler:this._errorHandler})},_byKeyImpl:function(t){var e=s.default.indexByKey(this,this._array,t);return-1===e?(0,i.rejectedPromise)(r.errors.Error("E4009")):(0,i.trivialPromise)(this._array[e])},_insertImpl:function(t){return s.default.insert(this,this._array,t)},_pushImpl:function(t){s.default.applyBatch(this,this._array,t)},_updateImpl:function(t,e){return s.default.update(this,this._array,t,e)},_removeImpl:function(t){return s.default.remove(this,this._array,t)},clear:function(){this._eventsStrategy.fireEvent("modifying"),this._array=[],this._eventsStrategy.fireEvent("modified")}},"array");t.exports=u,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(675);n(8)("dxList",i),t.exports=i,t.exports.default=t.exports},function(t,e,n){"use strict";var i,o=n(414),r=(i=o)&&i.__esModule?i:{default:i};t.exports=r.default,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(3),o=n(4),r=n(2),a=r.isDefined,s=r.isPromise,l=n(0).extend,u=n(16).inArray,c=n(5).each,d=n(7),h=n(17).getPublicElement,f=d.Deferred,p=n(38),m=n(15),g=n(79),_=n(12),v=n(8),y=n(263),b=y.inherit({_supportedKeys:function(){var t=this,e=this.callBase(),n=function(t){this._isEditable()?this._valueSubstituted()&&(this._preventFiltering=!0):this.option("showClearButton")&&(t.preventDefault(),this.reset()),this._preventSubstitution=!0},i=function(){t.option("searchEnabled")&&t._valueSubstituted()&&t._searchHandler()};return l({},e,{tab:function(){this.option("opened")&&"instantly"===this.option("applyValueMode")&&this._cleanInputSelection(),this._wasSearch()&&this._clearFilter(),e.tab&&e.tab.apply(this,arguments)},upArrow:function(t){if(e.upArrow&&e.upArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(t),!0},downArrow:function(t){if(e.downArrow&&e.downArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(t),!0},leftArrow:function(){i(),e.leftArrow&&e.leftArrow.apply(this,arguments)},rightArrow:function(){i(),e.rightArrow&&e.rightArrow.apply(this,arguments)},home:function(){i(),e.home&&e.home.apply(this,arguments)},end:function(){i(),e.end&&e.end.apply(this,arguments)},escape:function(){var t=e.escape&&e.escape.apply(this,arguments);return this._cancelEditing(),!a(t)||t},enter:function(t){var n=this.option("opened"),i=this._input().val().trim(),o=i&&this._list&&!this._list.option("focusedElement");if(!i&&this.option("value")&&this.option("allowClearing"))this.option({selectedItem:null,value:null}),this.close();else{if(this.option("acceptCustomValue"))return t.preventDefault(),o&&(this._valueChangeEventHandler(t),n&&this._toggleOpenState()),n;if(e.enter&&e.enter.apply(this,arguments))return n}},space:function(t){var e=this.option("opened"),n=this.option("searchEnabled"),i=this.option("acceptCustomValue");if(e&&!n&&!i)return t.preventDefault(),this._valueChangeEventHandler(t),!0},backspace:n,del:n})},_getDefaultOptions:function(){return l(this.callBase(),{placeholder:_.format("Select"),fieldTemplate:null,valueChangeEvent:"change",acceptCustomValue:!1,onCustomItemCreating:function(t){a(t.customItem)||(t.customItem=t.text)},showSelectionControls:!1,autocompletionEnabled:!0,allowClearing:!0,tooltipEnabled:!1,openOnFieldClick:!0,showDropDownButton:!0,displayCustomValue:!1,_isAdaptablePopupPosition:!1,useInkRipple:!1,useHiddenSubmitElement:!0})},_init:function(){this.callBase(),this._initCustomItemCreatingAction()},_initMarkup:function(){this.$element().addClass("dx-selectbox"),this._renderTooltip(),this.option("useInkRipple")&&this._renderInkRipple(),this.callBase(),this._$container.addClass("dx-selectbox-container")},_renderInkRipple:function(){this._inkRipple=g.render()},_toggleActiveState:function(t,e,n){if(this.callBase.apply(this,arguments),this._inkRipple&&!this._isEditable()){var i={element:this._inputWrapper(),event:n};e?this._inkRipple.showWave(i):this._inkRipple.hideWave(i)}},_createPopup:function(){this.callBase(),this._popup.$element().addClass("dx-selectbox-popup"),this._popup.overlayContent().attr("tabindex",-1)},_popupWrapperClass:function(){return this.callBase()+" dx-selectbox-popup-wrapper"},_cancelEditing:function(){!this.option("searchEnabled")&&this._list&&(this._focusListElement(null),this._updateField(this.option("selectedItem")))},_renderOpenedState:function(){this.callBase(),this.option("opened")&&(this._scrollToSelectedItem(),this._focusSelectedElement())},_focusSelectedElement:function(){if(this._searchValue()){var t=this._list._itemElements(),e=u(this.option("selectedItem"),this.option("items")),n=e>=0&&!this._isCustomItemSelected()?t.eq(e):null;this._focusListElement(n)}else this._focusListElement(null)},_renderFocusedElement:function(){if(this._list)if(this._searchValue()&&!this.option("acceptCustomValue")){var t=this._list._itemElements().not(".dx-state-disabled").eq(0);this._focusListElement(t)}else this._focusListElement(null)},_focusListElement:function(t){this._preventInputValueRender=!0,this._list.option("focusedElement",h(t)),delete this._preventInputValueRender},_scrollToSelectedItem:function(){this._list&&this._list.scrollToItem(this._list.option("selectedItem"))},_listContentReadyHandler:function(){this.callBase(),this._dataSource&&this._dataSource.paginate()&&this._needPopupRepaint()||this._scrollToSelectedItem()},_renderValue:function(){return this._renderInputValue(),this._setSubmitValue(),(new f).resolve()},_renderInputValue:function(){return this.callBase().always(function(){this._renderInputValueAsync()}.bind(this))},_renderInputValueAsync:function(){this._renderTooltip(),this._renderInputValueImpl().always(function(){this._refreshSelected()}.bind(this))},_renderInputValueImpl:function(){return this._renderField(),(new f).resolve()},_setNextItem:function(t){var e=this._calcNextItem(t),n=this._valueGetter(e);this._setValue(n)},_setNextValue:function(t){(this._dataSource.isLoaded()?(new f).resolve():this._dataSource.load()).done(function(){var e=this._getSelectedIndex(),n=this._dataSource.pageSize(),i=this._dataSource.isLastPage(),o=e===this._items().length-1;this._saveValueChangeEvent(t);var r="ArrowDown"===t.key?1:-1;n&&!i&&o&&r>0?(this._popup||this._createPopup(),this._dataSource.isLoading()||this._list._loadNextPage().done(this._setNextItem.bind(this,r))):this._setNextItem(r)}.bind(this))},_setSelectedItem:function(t){var e=!this._isCustomValueAllowed()&&void 0===t;this.callBase(e?null:t),e||this._isEditable()&&!this._isCustomItemSelected()||this._setListOption("selectedItem",this.option("selectedItem"))},_isCustomValueAllowed:function(){return this.option("acceptCustomValue")||this.callBase()},_displayValue:function(t){return t=!a(t)&&this._isCustomValueAllowed()?this.option("value"):t,this.callBase(t)},_listConfig:function(){var t=l(this.callBase(),{pageLoadMode:"scrollBottom",onSelectionChanged:this._getSelectionChangeHandler(),selectedItem:this.option("selectedItem"),onFocusedItemChanged:this._listFocusedItemChangeHandler.bind(this)});return this.option("showSelectionControls")&&l(t,{showSelectionControls:!0,selectionByClick:!0}),t},_listFocusedItemChangeHandler:function(t){if(!this._preventInputValueRender){var e=t.component,n=i(e.option("focusedElement")),o=e._getItemData(n);this._updateField(o)}},_updateField:function(t){if(!this._getTemplateByOption("fieldTemplate")||!this.option("fieldTemplate")){var e=this._displayGetter(t);return this.option("text",e),void this._renderDisplayText(e)}this._renderField()},_getSelectionChangeHandler:function(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):o.noop},_selectionChangeHandler:function(t){c(t.addedItems||[],function(t,e){this._setValue(this._valueGetter(e))}.bind(this))},_getActualSearchValue:function(){return this._dataSource.searchValue()},_toggleOpenState:function(t){if(!this.option("disabled")){if((t=arguments.length?t:!this.option("opened"))||this._restoreInputText(!0),this._wasSearch()&&t){this._wasSearch(!1);var e=this.option("showDataBeforeSearch")||0===this.option("minSearchLength");if(e&&this._dataSource){if(this._searchTimer)return;var n=this._getActualSearchValue();n&&this._wasSearch(!0),this._filterDataSource(n||null)}else this._setListOption("items",[])}t&&this._scrollToSelectedItem(),this.callBase(t)}},_renderTooltip:function(){this.option("tooltipEnabled")&&this.$element().attr("title",this.option("displayValue"))},_renderDimensions:function(){this.callBase(),this._dimensionChanged()},_isValueEqualInputText:function(){var t=this.option("selectedItem"),e=this._displayGetter(t);return(e?String(e):"")===this._searchValue()},_popupHidingHandler:function(){this._isValueEqualInputText()&&this._cancelEditing(),this.callBase()},_restoreInputText:function(t){this.option("readOnly")||this._loadItemDeferred&&this._loadItemDeferred.always(function(){var e=this.option("selectedItem");this.option("acceptCustomValue")?t||(this._updateField(e),this._clearFilter()):this.option("searchEnabled")&&!this._searchValue()&&this.option("allowClearing")?this._clearTextValue():this._isValueEqualInputText()||this._renderInputValue().always(function(t){var n=o.ensureDefined(t,e);this._setSelectedItem(n),this._updateField(n),this._clearFilter()}.bind(this))}.bind(this))},_focusOutHandler:function(t){if(!this._preventNestedFocusEvent(t)){var e=this._isOverlayNestedTarget(t.relatedTarget);e||(this._restoreInputText(),this._clearSearchTimer()),this._wasSearch()&&!this.option("acceptCustomValue")&&this.option("searchEnabled")&&this.option("opened")&&!e&&this._searchCanceled()}this.callBase(t)},_isOverlayNestedTarget:function(t){return!!i(t).closest(".".concat("dx-selectbox-popup-wrapper")).length},_clearTextValue:function(){this.option("selectedItem")&&this.option("value",null)},_shouldOpenPopup:function(){return this._needPassDataSourceToList()},_isFocused:function(){var t=m.getActiveElement();return this.callBase()&&i(t).closest(this._input()).length>0},_renderValueChangeEvent:function(){this._isEditable()&&this.callBase()},_isEditable:function(){return this.option("acceptCustomValue")||this.option("searchEnabled")},_fieldRenderData:function(){var t=this._list&&this.option("opened")&&i(this._list.option("focusedElement"));return t&&t.length?this._list._getItemData(t):this.option("selectedItem")},_readOnlyPropValue:function(){return!this._isEditable()||this.option("readOnly")},_isSelectedValue:function(t){return this._isValueEquals(t,this.option("value"))},_shouldCloseOnItemClick:function(){return!(this.option("showSelectionControls")&&"single"!==this.option("selectionMode"))},_listItemClickHandler:function(t){var e=this._getCurrentValue();this._focusListElement(i(t.itemElement)),this._saveValueChangeEvent(t.event),this._shouldClearFilter()&&this._clearFilter(),this._completeSelection(this._valueGetter(t.itemData)),this._shouldCloseOnItemClick()&&this.option("opened",!1),this.option("searchEnabled")&&e===this._valueGetter(t.itemData)&&this._updateField(t.itemData)},_shouldClearFilter:function(){return this._wasSearch()},_completeSelection:function(t){this._setValue(t)},_loadItem:function(t,e){var n=this,i=new f;return this.callBase(t,e).done(function(t){i.resolve(t)}.bind(this)).fail(function(){var e=n.option("selectedItem");n.option("acceptCustomValue")&&t===n._valueGetter(e)?i.resolve(e):i.reject()}.bind(this)),i.promise()},_loadInputValue:function(t,e){return this._loadItemDeferred=this._loadItem(t).always(e),this._loadItemDeferred},_isCustomItemSelected:function(){var t=this.option("selectedItem"),e=this._searchValue(),n=this._displayGetter(t);return!n||e!==n.toString()},_valueChangeEventHandler:function(t){this.option("acceptCustomValue")&&this._isCustomItemSelected()&&!this._isValueChanging&&(this._isValueChanging=!0,this._customItemAddedHandler(t),this._isValueChanging=!1)},_initCustomItemCreatingAction:function(){this._customItemCreatingAction=this._createActionByOption("onCustomItemCreating")},_createCustomItem:function(t){var e={text:t},n=this._customItemCreatingAction(e),i=o.ensureDefined(n,e.customItem);return a(n)&&p.log("W0015","onCustomItemCreating","customItem"),i},_customItemAddedHandler:function(t){var e=this._searchValue(),n=this._createCustomItem(e);if(this._saveValueChangeEvent(t),void 0===n)throw this._renderValue(),p.Error("E0121");s(n)?d.fromPromise(n).done(this._setCustomItem.bind(this)).fail(this._setCustomItem.bind(this,null)):this._setCustomItem(n)},_setCustomItem:function(t){this._disposed||(t=t||null,this.option("selectedItem",t),this._shouldClearFilter()&&this._filterDataSource(null),this._setValue(this._valueGetter(t)),this._renderDisplayText(this._displayGetter(t)))},_clearValueHandler:function(t){return this.callBase(t),!1},_wasSearch:function(t){if(!arguments.length)return this._wasSearchValue;this._wasSearchValue=t},_searchHandler:function(t){this._preventFiltering?delete this._preventFiltering:(this._needPassDataSourceToList()&&this._wasSearch(!0),this.callBase(t))},_dataSourceFiltered:function(t){this.callBase(),null!==t&&(this._renderInputSubstitution(),this._renderFocusedElement())},_valueSubstituted:function(){var t=this._input().get(0),e=0===t.selectionStart&&t.selectionEnd===this._searchValue().length,n=t.selectionStart!==t.selectionEnd;return this._wasSearch()&&n&&!e},_shouldSubstitutionBeRendered:function(){return this.option("autocompletionEnabled")&&!this._preventSubstitution&&this.option("searchEnabled")&&!this.option("acceptCustomValue")&&"startswith"===this.option("searchMode")},_renderInputSubstitution:function(){if(this._shouldSubstitutionBeRendered()){var t=this._list&&this._getPlainItems(this._list.option("items"))[0];if(t){var e=this._input(),n=e.val().length;if(0!==n){var i=e.get(0),o=this._displayGetter(t).toString();i.value=o,this._caret({start:n,end:o.length})}}}else delete this._preventSubstitution},_cleanInputSelection:function(){var t=this._input().get(0),e=t.value.length;t.selectionStart=e,t.selectionEnd=e},_dispose:function(){this._renderInputValueAsync=o.noop,delete this._loadItemDeferred,this.callBase()},_optionChanged:function(t){switch(t.name){case"_isAdaptablePopupPosition":case"autocompletionEnabled":break;case"onCustomItemCreating":this._initCustomItemCreatingAction();break;case"tooltipEnabled":this._renderTooltip();break;case"displayCustomValue":case"acceptCustomValue":case"showSelectionControls":case"useInkRipple":this._invalidate();break;case"allowClearing":break;default:this.callBase(t)}},_clean:function(){delete this._inkRipple,this.callBase()}});v("dxSelectBox",b),t.exports=b,t.exports.default=t.exports},function(t,e,n){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function o(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function r(t,e,n){if(r.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"===typeof t?t.exports=r:e.BN=r,r.BN=r,r.wordSize=26;try{a=n(1198).Buffer}catch(S){}function s(t,e,n){for(var i=0,o=Math.min(t.length,n),r=e;r=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function l(t,e,n,i){for(var o=0,r=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(t){return t instanceof r||null!==t&&"object"===typeof t&&t.constructor.wordSize===r.wordSize&&Array.isArray(t.words)},r.max=function(t,e){return t.cmp(e)>0?t:e},r.min=function(t,e){return t.cmp(e)<0?t:e},r.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&o++,16===e?this._parseHex(t,o):this._parseBase(t,e,o),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},r.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},r.prototype._initArray=function(t,e,n){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var o=0;o=0;o-=3)a=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[r]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)o=s(t,n,n+6),this.words[i]|=o<>>26-r&4194303,(r+=24)>=26&&(r-=26,i++);n+6!==e&&(o=s(t,e,n+6),this.words[i]|=o<>>26-r&4194303),this.strip()},r.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=e)i++;i--,o=o/e|0;for(var r=t.length-n,a=r%i,s=Math.min(r,r-a)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var u=["","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"],c=[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],d=[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(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var o=0|t.words[0],r=0|e.words[0],a=o*r,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var u=1;u>>26,d=67108863&l,h=Math.min(u,e.length-1),f=Math.max(0,u-t.length+1);f<=h;f++){var p=u-f|0;c+=(a=(o=0|t.words[p])*(r=0|e.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}r.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var o=0,r=0,a=0;a>>24-o&16777215)||a!==this.length-1?u[6-l.length]+l+n:l+n,(o+=2)>=26&&(o-=26,a--)}for(0!==r&&(n=r.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},r.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},r.prototype.toArrayLike=function(t,e,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===e,u=new t(r),c=this.clone();if(l){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},r.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},r.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},r.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},r.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},r.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},r.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},r.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},r.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(t){return this.clone().inotn(t)},r.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var n=t/26|0,o=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;rt.length?this.clone().iadd(t):t.clone().iadd(this)},r.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=t):(n=t,i=this);for(var r=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==r&&a>26,this.words[a]=67108863&e;if(0===r&&a>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],_=8191&g,v=g>>>13,y=0|a[3],b=8191&y,w=y>>>13,x=0|a[4],C=8191&x,S=x>>>13,k=0|a[5],I=8191&k,T=k>>>13,E=0|a[6],O=8191&E,M=E>>>13,P=0|a[7],D=8191&P,A=P>>>13,R=0|a[8],B=8191&R,N=R>>>13,L=0|a[9],F=8191&L,V=L>>>13,z=0|s[0],j=8191&z,H=z>>>13,W=0|s[1],U=8191&W,G=W>>>13,K=0|s[2],q=8191&K,$=K>>>13,Y=0|s[3],Z=8191&Y,X=Y>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,it=et>>>13,ot=0|s[6],rt=8191&ot,at=ot>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],dt=8191&ct,ht=ct>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(u+(i=Math.imul(d,j))|0)+((8191&(o=(o=Math.imul(d,H))+Math.imul(h,j)|0))<<13)|0;u=((r=Math.imul(h,H))+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,j),o=(o=Math.imul(p,H))+Math.imul(m,j)|0,r=Math.imul(m,H);var _t=(u+(i=i+Math.imul(d,U)|0)|0)+((8191&(o=(o=o+Math.imul(d,G)|0)+Math.imul(h,U)|0))<<13)|0;u=((r=r+Math.imul(h,G)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(_,j),o=(o=Math.imul(_,H))+Math.imul(v,j)|0,r=Math.imul(v,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,G)|0)+Math.imul(m,U)|0,r=r+Math.imul(m,G)|0;var vt=(u+(i=i+Math.imul(d,q)|0)|0)+((8191&(o=(o=o+Math.imul(d,$)|0)+Math.imul(h,q)|0))<<13)|0;u=((r=r+Math.imul(h,$)|0)+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(b,j),o=(o=Math.imul(b,H))+Math.imul(w,j)|0,r=Math.imul(w,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,G)|0)+Math.imul(v,U)|0,r=r+Math.imul(v,G)|0,i=i+Math.imul(p,q)|0,o=(o=o+Math.imul(p,$)|0)+Math.imul(m,q)|0,r=r+Math.imul(m,$)|0;var yt=(u+(i=i+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,X)|0)+Math.imul(h,Z)|0))<<13)|0;u=((r=r+Math.imul(h,X)|0)+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(C,j),o=(o=Math.imul(C,H))+Math.imul(S,j)|0,r=Math.imul(S,H),i=i+Math.imul(b,U)|0,o=(o=o+Math.imul(b,G)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,G)|0,i=i+Math.imul(_,q)|0,o=(o=o+Math.imul(_,$)|0)+Math.imul(v,q)|0,r=r+Math.imul(v,$)|0,i=i+Math.imul(p,Z)|0,o=(o=o+Math.imul(p,X)|0)+Math.imul(m,Z)|0,r=r+Math.imul(m,X)|0;var bt=(u+(i=i+Math.imul(d,Q)|0)|0)+((8191&(o=(o=o+Math.imul(d,tt)|0)+Math.imul(h,Q)|0))<<13)|0;u=((r=r+Math.imul(h,tt)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(I,j),o=(o=Math.imul(I,H))+Math.imul(T,j)|0,r=Math.imul(T,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,G)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,G)|0,i=i+Math.imul(b,q)|0,o=(o=o+Math.imul(b,$)|0)+Math.imul(w,q)|0,r=r+Math.imul(w,$)|0,i=i+Math.imul(_,Z)|0,o=(o=o+Math.imul(_,X)|0)+Math.imul(v,Z)|0,r=r+Math.imul(v,X)|0,i=i+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,r=r+Math.imul(m,tt)|0;var wt=(u+(i=i+Math.imul(d,nt)|0)|0)+((8191&(o=(o=o+Math.imul(d,it)|0)+Math.imul(h,nt)|0))<<13)|0;u=((r=r+Math.imul(h,it)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(O,j),o=(o=Math.imul(O,H))+Math.imul(M,j)|0,r=Math.imul(M,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,G)|0)+Math.imul(T,U)|0,r=r+Math.imul(T,G)|0,i=i+Math.imul(C,q)|0,o=(o=o+Math.imul(C,$)|0)+Math.imul(S,q)|0,r=r+Math.imul(S,$)|0,i=i+Math.imul(b,Z)|0,o=(o=o+Math.imul(b,X)|0)+Math.imul(w,Z)|0,r=r+Math.imul(w,X)|0,i=i+Math.imul(_,Q)|0,o=(o=o+Math.imul(_,tt)|0)+Math.imul(v,Q)|0,r=r+Math.imul(v,tt)|0,i=i+Math.imul(p,nt)|0,o=(o=o+Math.imul(p,it)|0)+Math.imul(m,nt)|0,r=r+Math.imul(m,it)|0;var xt=(u+(i=i+Math.imul(d,rt)|0)|0)+((8191&(o=(o=o+Math.imul(d,at)|0)+Math.imul(h,rt)|0))<<13)|0;u=((r=r+Math.imul(h,at)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(D,j),o=(o=Math.imul(D,H))+Math.imul(A,j)|0,r=Math.imul(A,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,G)|0)+Math.imul(M,U)|0,r=r+Math.imul(M,G)|0,i=i+Math.imul(I,q)|0,o=(o=o+Math.imul(I,$)|0)+Math.imul(T,q)|0,r=r+Math.imul(T,$)|0,i=i+Math.imul(C,Z)|0,o=(o=o+Math.imul(C,X)|0)+Math.imul(S,Z)|0,r=r+Math.imul(S,X)|0,i=i+Math.imul(b,Q)|0,o=(o=o+Math.imul(b,tt)|0)+Math.imul(w,Q)|0,r=r+Math.imul(w,tt)|0,i=i+Math.imul(_,nt)|0,o=(o=o+Math.imul(_,it)|0)+Math.imul(v,nt)|0,r=r+Math.imul(v,it)|0,i=i+Math.imul(p,rt)|0,o=(o=o+Math.imul(p,at)|0)+Math.imul(m,rt)|0,r=r+Math.imul(m,at)|0;var Ct=(u+(i=i+Math.imul(d,lt)|0)|0)+((8191&(o=(o=o+Math.imul(d,ut)|0)+Math.imul(h,lt)|0))<<13)|0;u=((r=r+Math.imul(h,ut)|0)+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,j),o=(o=Math.imul(B,H))+Math.imul(N,j)|0,r=Math.imul(N,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,G)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,G)|0,i=i+Math.imul(O,q)|0,o=(o=o+Math.imul(O,$)|0)+Math.imul(M,q)|0,r=r+Math.imul(M,$)|0,i=i+Math.imul(I,Z)|0,o=(o=o+Math.imul(I,X)|0)+Math.imul(T,Z)|0,r=r+Math.imul(T,X)|0,i=i+Math.imul(C,Q)|0,o=(o=o+Math.imul(C,tt)|0)+Math.imul(S,Q)|0,r=r+Math.imul(S,tt)|0,i=i+Math.imul(b,nt)|0,o=(o=o+Math.imul(b,it)|0)+Math.imul(w,nt)|0,r=r+Math.imul(w,it)|0,i=i+Math.imul(_,rt)|0,o=(o=o+Math.imul(_,at)|0)+Math.imul(v,rt)|0,r=r+Math.imul(v,at)|0,i=i+Math.imul(p,lt)|0,o=(o=o+Math.imul(p,ut)|0)+Math.imul(m,lt)|0,r=r+Math.imul(m,ut)|0;var St=(u+(i=i+Math.imul(d,dt)|0)|0)+((8191&(o=(o=o+Math.imul(d,ht)|0)+Math.imul(h,dt)|0))<<13)|0;u=((r=r+Math.imul(h,ht)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(F,j),o=(o=Math.imul(F,H))+Math.imul(V,j)|0,r=Math.imul(V,H),i=i+Math.imul(B,U)|0,o=(o=o+Math.imul(B,G)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,G)|0,i=i+Math.imul(D,q)|0,o=(o=o+Math.imul(D,$)|0)+Math.imul(A,q)|0,r=r+Math.imul(A,$)|0,i=i+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,X)|0)+Math.imul(M,Z)|0,r=r+Math.imul(M,X)|0,i=i+Math.imul(I,Q)|0,o=(o=o+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,r=r+Math.imul(T,tt)|0,i=i+Math.imul(C,nt)|0,o=(o=o+Math.imul(C,it)|0)+Math.imul(S,nt)|0,r=r+Math.imul(S,it)|0,i=i+Math.imul(b,rt)|0,o=(o=o+Math.imul(b,at)|0)+Math.imul(w,rt)|0,r=r+Math.imul(w,at)|0,i=i+Math.imul(_,lt)|0,o=(o=o+Math.imul(_,ut)|0)+Math.imul(v,lt)|0,r=r+Math.imul(v,ut)|0,i=i+Math.imul(p,dt)|0,o=(o=o+Math.imul(p,ht)|0)+Math.imul(m,dt)|0,r=r+Math.imul(m,ht)|0;var kt=(u+(i=i+Math.imul(d,pt)|0)|0)+((8191&(o=(o=o+Math.imul(d,mt)|0)+Math.imul(h,pt)|0))<<13)|0;u=((r=r+Math.imul(h,mt)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(F,U),o=(o=Math.imul(F,G))+Math.imul(V,U)|0,r=Math.imul(V,G),i=i+Math.imul(B,q)|0,o=(o=o+Math.imul(B,$)|0)+Math.imul(N,q)|0,r=r+Math.imul(N,$)|0,i=i+Math.imul(D,Z)|0,o=(o=o+Math.imul(D,X)|0)+Math.imul(A,Z)|0,r=r+Math.imul(A,X)|0,i=i+Math.imul(O,Q)|0,o=(o=o+Math.imul(O,tt)|0)+Math.imul(M,Q)|0,r=r+Math.imul(M,tt)|0,i=i+Math.imul(I,nt)|0,o=(o=o+Math.imul(I,it)|0)+Math.imul(T,nt)|0,r=r+Math.imul(T,it)|0,i=i+Math.imul(C,rt)|0,o=(o=o+Math.imul(C,at)|0)+Math.imul(S,rt)|0,r=r+Math.imul(S,at)|0,i=i+Math.imul(b,lt)|0,o=(o=o+Math.imul(b,ut)|0)+Math.imul(w,lt)|0,r=r+Math.imul(w,ut)|0,i=i+Math.imul(_,dt)|0,o=(o=o+Math.imul(_,ht)|0)+Math.imul(v,dt)|0,r=r+Math.imul(v,ht)|0;var It=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(o=(o=o+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((r=r+Math.imul(m,mt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(F,q),o=(o=Math.imul(F,$))+Math.imul(V,q)|0,r=Math.imul(V,$),i=i+Math.imul(B,Z)|0,o=(o=o+Math.imul(B,X)|0)+Math.imul(N,Z)|0,r=r+Math.imul(N,X)|0,i=i+Math.imul(D,Q)|0,o=(o=o+Math.imul(D,tt)|0)+Math.imul(A,Q)|0,r=r+Math.imul(A,tt)|0,i=i+Math.imul(O,nt)|0,o=(o=o+Math.imul(O,it)|0)+Math.imul(M,nt)|0,r=r+Math.imul(M,it)|0,i=i+Math.imul(I,rt)|0,o=(o=o+Math.imul(I,at)|0)+Math.imul(T,rt)|0,r=r+Math.imul(T,at)|0,i=i+Math.imul(C,lt)|0,o=(o=o+Math.imul(C,ut)|0)+Math.imul(S,lt)|0,r=r+Math.imul(S,ut)|0,i=i+Math.imul(b,dt)|0,o=(o=o+Math.imul(b,ht)|0)+Math.imul(w,dt)|0,r=r+Math.imul(w,ht)|0;var Tt=(u+(i=i+Math.imul(_,pt)|0)|0)+((8191&(o=(o=o+Math.imul(_,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((r=r+Math.imul(v,mt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(F,Z),o=(o=Math.imul(F,X))+Math.imul(V,Z)|0,r=Math.imul(V,X),i=i+Math.imul(B,Q)|0,o=(o=o+Math.imul(B,tt)|0)+Math.imul(N,Q)|0,r=r+Math.imul(N,tt)|0,i=i+Math.imul(D,nt)|0,o=(o=o+Math.imul(D,it)|0)+Math.imul(A,nt)|0,r=r+Math.imul(A,it)|0,i=i+Math.imul(O,rt)|0,o=(o=o+Math.imul(O,at)|0)+Math.imul(M,rt)|0,r=r+Math.imul(M,at)|0,i=i+Math.imul(I,lt)|0,o=(o=o+Math.imul(I,ut)|0)+Math.imul(T,lt)|0,r=r+Math.imul(T,ut)|0,i=i+Math.imul(C,dt)|0,o=(o=o+Math.imul(C,ht)|0)+Math.imul(S,dt)|0,r=r+Math.imul(S,ht)|0;var Et=(u+(i=i+Math.imul(b,pt)|0)|0)+((8191&(o=(o=o+Math.imul(b,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((r=r+Math.imul(w,mt)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(F,Q),o=(o=Math.imul(F,tt))+Math.imul(V,Q)|0,r=Math.imul(V,tt),i=i+Math.imul(B,nt)|0,o=(o=o+Math.imul(B,it)|0)+Math.imul(N,nt)|0,r=r+Math.imul(N,it)|0,i=i+Math.imul(D,rt)|0,o=(o=o+Math.imul(D,at)|0)+Math.imul(A,rt)|0,r=r+Math.imul(A,at)|0,i=i+Math.imul(O,lt)|0,o=(o=o+Math.imul(O,ut)|0)+Math.imul(M,lt)|0,r=r+Math.imul(M,ut)|0,i=i+Math.imul(I,dt)|0,o=(o=o+Math.imul(I,ht)|0)+Math.imul(T,dt)|0,r=r+Math.imul(T,ht)|0;var Ot=(u+(i=i+Math.imul(C,pt)|0)|0)+((8191&(o=(o=o+Math.imul(C,mt)|0)+Math.imul(S,pt)|0))<<13)|0;u=((r=r+Math.imul(S,mt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(F,nt),o=(o=Math.imul(F,it))+Math.imul(V,nt)|0,r=Math.imul(V,it),i=i+Math.imul(B,rt)|0,o=(o=o+Math.imul(B,at)|0)+Math.imul(N,rt)|0,r=r+Math.imul(N,at)|0,i=i+Math.imul(D,lt)|0,o=(o=o+Math.imul(D,ut)|0)+Math.imul(A,lt)|0,r=r+Math.imul(A,ut)|0,i=i+Math.imul(O,dt)|0,o=(o=o+Math.imul(O,ht)|0)+Math.imul(M,dt)|0,r=r+Math.imul(M,ht)|0;var Mt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(o=(o=o+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((r=r+Math.imul(T,mt)|0)+(o>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(F,rt),o=(o=Math.imul(F,at))+Math.imul(V,rt)|0,r=Math.imul(V,at),i=i+Math.imul(B,lt)|0,o=(o=o+Math.imul(B,ut)|0)+Math.imul(N,lt)|0,r=r+Math.imul(N,ut)|0,i=i+Math.imul(D,dt)|0,o=(o=o+Math.imul(D,ht)|0)+Math.imul(A,dt)|0,r=r+Math.imul(A,ht)|0;var Pt=(u+(i=i+Math.imul(O,pt)|0)|0)+((8191&(o=(o=o+Math.imul(O,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((r=r+Math.imul(M,mt)|0)+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(F,lt),o=(o=Math.imul(F,ut))+Math.imul(V,lt)|0,r=Math.imul(V,ut),i=i+Math.imul(B,dt)|0,o=(o=o+Math.imul(B,ht)|0)+Math.imul(N,dt)|0,r=r+Math.imul(N,ht)|0;var Dt=(u+(i=i+Math.imul(D,pt)|0)|0)+((8191&(o=(o=o+Math.imul(D,mt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((r=r+Math.imul(A,mt)|0)+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,i=Math.imul(F,dt),o=(o=Math.imul(F,ht))+Math.imul(V,dt)|0,r=Math.imul(V,ht);var At=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(o=(o=o+Math.imul(B,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((r=r+Math.imul(N,mt)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863;var Rt=(u+(i=Math.imul(F,pt))|0)+((8191&(o=(o=Math.imul(F,mt))+Math.imul(V,pt)|0))<<13)|0;return u=((r=Math.imul(V,mt))+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l[0]=gt,l[1]=_t,l[2]=vt,l[3]=yt,l[4]=bt,l[5]=wt,l[6]=xt,l[7]=Ct,l[8]=St,l[9]=kt,l[10]=It,l[11]=Tt,l[12]=Et,l[13]=Ot,l[14]=Mt,l[15]=Pt,l[16]=Dt,l[17]=At,l[18]=Rt,0!==u&&(l[19]=u,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(f=h),r.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?f(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,a&=67108863}n.words[r]=s,i=a,a=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=r.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,n,i,o,r){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&r,r>>>=13;for(a=2*e;a>=26,e+=o/67108864|0,e+=r>>>26,this.words[n]=67108863&r}return 0!==e&&(this.words[n]=e,this.length++),this},r.prototype.muln=function(t){return this.clone().imuln(t)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>o}return e}(t);if(0===e.length)return new r(1);for(var n=this,i=0;i=0);var e,n=t%26,o=(t-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==o){for(e=this.length-1;e>=0;e--)this.words[e+o]=this.words[e];for(e=0;e=0),o=e?(e-e%26)/26:0;var r=t%26,a=Math.min((t-r)/26,this.length),s=67108863^67108863>>>r<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=o);u--){var d=0|this.words[u];this.words[u]=c<<26-r|d>>>r,c=d&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},r.prototype.shln=function(t){return this.clone().ishln(t)},r.prototype.ushln=function(t){return this.clone().iushln(t)},r.prototype.shrn=function(t){return this.clone().ishrn(t)},r.prototype.ushrn=function(t){return this.clone().iushrn(t)},r.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,o=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var o=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},r.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(i(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),o=t,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),i.iushln(n),a=0|o.words[o.length-1]);var s,l=i.length-o.length;if("mod"!==e){(s=new r(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var h=67108864*(0|i.words[o.length+d])+(0|i.words[o.length+d-1]);for(h=Math.min(h/a|0,67108863),i._ishlnsubmul(o,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(o,1,d),i.isZero()||(i.negative^=1);s&&(s.words[d]=h)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},r.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(o=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:o,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new r(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new r(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new r(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,a,s},r.prototype.div=function(t){return this.divmod(t,"div",!1).div},r.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},r.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},r.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),o=t.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},r.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(e*n+(0|this.words[o]))%t;return n},r.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*e;this.words[n]=o/t|0,e=o%t}return this.strip()},r.prototype.divn=function(t){return this.clone().idivn(t)},r.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new r(1),a=new r(0),s=new r(0),l=new r(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),d=e.clone();!e.isZero();){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.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(c),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s),a.isub(l)):(n.isub(e),s.isub(o),l.isub(a))}return{a:s,b:l,gcd:n.iushln(u)}},r.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,a=new r(1),s=new r(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0===(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,h=1;0===(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(o=0===e.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(t),o},r.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=e.cmp(n);if(o<0){var r=e;e=n,n=r}else if(0===o||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},r.prototype.invm=function(t){return this.egcd(t).a.umod(t)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(t){return this.words[0]&t},r.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,n=(t-e)/26,o=1<>>26,s&=67108863,this.words[a]=s}return 0!==r&&(this.words[a]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var o=0|this.words[0];e=o===t?0:ot.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|t.words[n];if(i!==o){io&&(e=1);break}}return e},r.prototype.gtn=function(t){return 1===this.cmpn(t)},r.prototype.gt=function(t){return 1===this.cmp(t)},r.prototype.gten=function(t){return this.cmpn(t)>=0},r.prototype.gte=function(t){return this.cmp(t)>=0},r.prototype.ltn=function(t){return-1===this.cmpn(t)},r.prototype.lt=function(t){return-1===this.cmp(t)},r.prototype.lten=function(t){return this.cmpn(t)<=0},r.prototype.lte=function(t){return this.cmp(t)<=0},r.prototype.eqn=function(t){return 0===this.cmpn(t)},r.prototype.eq=function(t){return 0===this.cmp(t)},r.red=function(t){return new x(t)},r.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(t){return this.red=t,this},r.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},r.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},r.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},r.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},r.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},r.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},r.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},r.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new r(e,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=r._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(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)}_.prototype._tmp=function(){var t=new r(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},o(v,_),v.prototype.split=function(t,e){for(var n=Math.min(t.length,9),i=0;i>>22,o=r}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=o,e=i}return 0!==e&&(t.words[t.length++]=e),t},r._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return g[t]=e,e},x.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var n=this.m.add(new r(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);i(!o.isZero());var s=new r(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var d=this.pow(c,o),h=this.pow(t,o.addn(1).iushrn(1)),f=this.pow(t,o),p=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var u=e.words[i],c=l-1;c>=0;c--){var d=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===i&&0===c)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}l=26}return o},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},r.mont=function(t){return new C(t)},o(C,x),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new r(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(127)(t))},function(t,e,n){"use strict";var i=u(n(3)),o=u(n(155)),r=u(n(106)),a=n(0),s=n(2),l=u(n(480));function u(t){return t&&t.__esModule?t:{default:t}}var c=null;t.exports=function(t,e,n){var u=(0,s.isPlainObject)(t)?t:{message:t},d=u.onHidden;(0,a.extend)(u,{type:e,displayTime:n,onHidden:function(t){(0,i.default)(t.element).remove(),new o.default(d,{context:t.model}).execute(arguments)}}),c=(0,i.default)("
").appendTo(r.default.value()),new l.default(c,u).show()},t.exports.default=t.exports},function(t,e,n){"use strict";t.exports=function(t){var e,n=function(){return e=t.apply(this,arguments),n=function(){return e},e};return function(){return n.apply(this,arguments)}}},function(t,e,n){"use strict";var i,o=n(5),r=n(354),a=(i=r)&&i.__esModule?i:{default:i};var s=function(t,e){var n={};"noBubble"in e&&(n.noBubble=e.noBubble),"bindType"in e&&(n.bindType=e.bindType),"delegateType"in e&&(n.delegateType=e.delegateType),(0,o.each)(["setup","teardown","add","remove","trigger","handle","_default","dispose"],(function(t,i){e[i]&&(n[i]=function(){var t=[].slice.call(arguments);return t.unshift(this),e[i].apply(e,t)})})),a.default.fire(t,n)};s.callbacks=a.default,t.exports=s},function(t,e,n){"use strict";var i=n(0).extend;e.registry={},e.register=function(t,n,o){var r=e.registry,a={};a[t]=r[t]?r[t]:{},a[t][n]=o,r=i(r,a)}},function(t,e,n){"use strict";t.exports=n(266),t.exports.default=t.exports},function(t,e,n){"use strict";var i={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},o=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]}},{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*\.*\d+)\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10),parseFloat(t[4])]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/^hsv\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){var e=parseInt(t[1],10),n=parseInt(t[2],10),i=parseInt(t[3],10),o=l(e,n,i);return[o[0],o[1],o[2],1,[e,n,i]]}},{re:/^hsl\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){var e=parseInt(t[1],10),n=parseInt(t[2],10),i=parseInt(t[3],10),o=d(e,n,i);return[o[0],o[1],o[2],1,null,[e,n,i]]}}],r=Math.round;function a(t){var e;this.baseColor=t,t&&(e=String(t).toLowerCase().replace(/ /g,""),e=function(t){if("transparent"===t)return[0,0,0,0];for(var e,n=0,i=o.length;n.5?c/(2-l):c/l,i=function(t,e,n,i){switch(Math.max(t,e,n)){case t:return(e-n)/i+(en?n:t}function l(t,e,n){var i,o,r,a=(100-e)*n/100,s=t%60/60*(n-a),l=a+s,u=n-s;switch(Math.floor(t%360/60)){case 0:i=n,o=l,r=a;break;case 1:i=u,o=n,r=a;break;case 2:i=a,o=n,r=l;break;case 3:i=a,o=u,r=n;break;case 4:i=l,o=a,r=n;break;case 5:i=n,o=a,r=u}return[Math.round(2.55*i),Math.round(2.55*o),Math.round(2.55*r)]}function u(t,e){var n=e;return"r"===t&&(n=e+1/3),"b"===t&&(n=e-1/3),n}function c(t,e,n){return(n=function(t){return t<0&&(t+=1),t>1&&(t-=1),t}(n))<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function d(t,e,n){var i,o,a;if(t=h(t,360),e=h(e,100),n=h(n,100),0===e)i=o=a=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;i=c(l,s,u("r",t)),o=c(l,s,u("g",t)),a=c(l,s,u("b",t))}return[r(255*i),r(255*o),r(255*a)]}function h(t,e){return t=Math.min(e,Math.max(0,parseFloat(t))),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function f(t,e,n){return e=e||0,n=n||255,!(t%1!==0||tn||"number"!==typeof t||isNaN(t))}a.prototype={constructor:a,highlight:function(t){return t=t||10,this.alter(t).toHex()},darken:function(t){return t=t||10,this.alter(-t).toHex()},alter:function(t){var e=new a;return e.r=s(this.r+t),e.g=s(this.g+t),e.b=s(this.b+t),e},blend:function(t,e){var n=t instanceof a?t:new a(t),i=new a;return i.r=s(r(this.r*(1-e)+n.r*e)),i.g=s(r(this.g*(1-e)+n.g*e)),i.b=s(r(this.b*(1-e)+n.b*e)),i},toHex:function(){return t=this.r,e=this.g,n=this.b,"#"+(16777216|t<<16|e<<8|n).toString(16).slice(1);var t,e,n},getPureColor:function(){return new a("rgb("+l(this.hsv.h,100,100).join(",")+")")},isValidHex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},isValidRGB:function(t,e,n){return!!(f(t)&&f(e)&&f(n))},isValidAlpha:function(t){return!(isNaN(t)||t<0||t>1||"number"!==typeof t)},colorIsInvalid:!1,fromHSL:function(t){var e=new a,n=d(t.h,t.s,t.l);return e.r=n[0],e.g=n[1],e.b=n[2],e}},t.exports=a},function(t,e,n){"use strict";var i=x(n(3)),o=n(4),r=n(10),a=x(n(15)),s=n(2),l=n(5),u=x(n(254)),c=x(n(213)),d=n(55),h=n(0),f=x(n(273)),p=x(n(97)),m=x(n(163)),g=n(13),_=n(704),v=x(n(274)),y=x(n(706)),b=x(n(18)),w=x(n(6));function x(t){return t&&t.__esModule?t:{default:t}}var C=Math.floor,S=p.default.prototype.option;function k(){return!0}function I(){return!1}function T(t){t.component._eventsStrategy.hasEvent("incidentOccurred")||_.log.apply(null,[t.target.id].concat(t.target.args||[]))}var E=function(t,e){return function(n,i){e("incidentOccurred",{target:{id:n,type:"E"===n[0]?"error":"warning",args:i,text:d.format.apply(null,[_.ERROR_MESSAGES[n]].concat(i||[])),widget:t,version:u.default}})}};function O(t){return t.reduce((function(t,e){return e>0&&!t?e:t}),0)}var M=!(0,r.hasWindow)();t.exports=M?function(){var t={_initTemplates:function(){},ctor:function(t,e){this.callBase(t,e);var n=a.default.createElement("div"),i=e&&(0,s.isNumeric)(e.width)?e.width+"px":"100%",o=e&&(0,s.isNumeric)(e.height)?e.height+"px":this._getDefaultSize().height+"px";a.default.setStyle(n,"width",i),a.default.setStyle(n,"height",o),a.default.setClass(n,"dx-sized-element"),a.default.insertElement(t,n)}},e=p.default.inherit(t),n=e.inherit;return e.inherit=function(t){for(var e in t)((0,s.isFunction)(t[e])&&"_"!==e.substr(0,1)&&"option"!==e||"_dispose"===e||"_optionChanged"===e)&&(t[e]=o.noop);return n.call(this,t)},e}():p.default.inherit({_eventsMap:{onIncidentOccurred:{name:"incidentOccurred"},onDrawn:{name:"drawn"}},_getDefaultOptions:function(){return(0,h.extend)(this.callBase(),{onIncidentOccurred:T})},_useLinks:!0,_init:function(){var t=this;t._$element.children(".dx-sized-element").remove(),t.callBase.apply(t,arguments),t._changesLocker=0,t._optionChangedLocker=0,t._changes=m.default.changes(),t._suspendChanges(),t._themeManager=t._createThemeManager(),t._themeManager.setCallback((function(){t._requestChange(t._themeDependentChanges)})),t._renderElementAttributes(),t._initRenderer();var e=t._useLinks&&t._renderer.root;e&&e.enableLinks().virtualLink("core").virtualLink("peripheral"),t._renderVisibilityChange(),t._attachVisibilityChangeHandlers(),t._toggleParentsScrollSubscription(this._isVisible()),t._initEventTrigger(),t._incidentOccurred=E(t.NAME,t._eventTrigger),t._layout=new y.default,e&&e.linkAfter("core"),t._initPlugins(),t._initCore(),e&&e.linkAfter(),t._change(t._initialChanges)},_createThemeManager:function(){return new f.default.BaseThemeManager(this._getThemeManagerOptions())},_getThemeManagerOptions:function(){return{themeSection:this._themeSection,fontFields:this._fontFields}},_initialChanges:["LAYOUT","RESIZE_HANDLER","THEME","DISABLED"],_initPlugins:function(){var t=this;(0,l.each)(t._plugins,(function(e,n){n.init.call(t)}))},_disposePlugins:function(){var t=this;(0,l.each)(t._plugins.slice().reverse(),(function(e,n){n.dispose.call(t)}))},_change:function(t){this._changes.add(t)},_suspendChanges:function(){++this._changesLocker},_resumeChanges:function(){0===--this._changesLocker&&this._changes.count()>0&&!this._applyingChanges&&(this._renderer.lock(),this._applyingChanges=!0,this._applyChanges(),this._changes.reset(),this._applyingChanges=!1,this._renderer.unlock(),this._optionsQueue&&this._applyQueuedOptions(),this._optionChangedLocker++,this._notify(),this._optionChangedLocker--)},_applyQueuedOptions:function(){var t=this._optionsQueue;this._optionsQueue=null,this.beginUpdate(),(0,l.each)(t,(function(t,e){e()})),this.endUpdate()},_requestChange:function(t){this._suspendChanges(),this._change(t),this._resumeChanges()},_applyChanges:function(){var t,e=this._changes,n=this._totalChangesOrder,i=n.length;for(t=0;t0||!(0,r.hasWindow)())return 0;var i,o=t._$element[n]();return o<=1?0:o},a=o(e,"width"),l=o(e,"height"),u={width:e.width<=0?0:C(O([e.width,a,i.width])),height:e.height<=0?0:C(O([e.height,l,i.height])),left:O([n.left,i.left]),top:O([n.top,i.top]),right:O([n.right,i.right]),bottom:O([n.bottom,i.bottom])};return(u.width-u.left-u.right<=0||u.height-u.top-u.bottom<=0)&&(u={width:0,height:0}),u},_updateSize:function(){var t,e,n=this._calculateCanvas();this._renderer.fixPlacement(),t=this._canvas,e=n,(t.width!==e.width||t.height!==e.height||t.left!==e.left||t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||this.__forceRender)&&(this._canvas=n,this._recreateSizeDependentObjects(!0),this._renderer.resize(n.width,n.height),this._change(["LAYOUT"]))},_recreateSizeDependentObjects:o.noop,_getMinSize:function(){return[0,0]},_getAlignmentRect:o.noop,_setContentSize:function(){var t=this._canvas,e=this._layout,n=t.width>0&&t.height>0?[t.left,t.top,t.width-t.right,t.height-t.bottom]:[0,0,0,0];n=e.forward(n,this._getMinSize());var i=this._applySize(n)||n;e.backward(i,this._getAlignmentRect()||i)},_getOption:function(t,e){var n=this._themeManager.theme(t),i=this.option(t);return e?void 0!==i?i:n:(0,h.extend)(!0,{},n,i)},_setupResizeHandler:function(){var t=this,e=(0,g.parseScalar)(this._getOption("redrawOnResize",!0),!0);t._resizeHandler&&t._removeResizeHandler(),t._resizeHandler=function(t){var e,n=function(){clearTimeout(e),e=setTimeout(t,100)};return n.dispose=function(){return clearTimeout(e),this},n}((function(){e?t._requestChange(["CONTAINER_SIZE"]):t._renderer.fixPlacement()})),c.default.add(t._resizeHandler)},_removeResizeHandler:function(){this._resizeHandler&&(c.default.remove(this._resizeHandler),this._resizeHandler.dispose(),this._resizeHandler=null)},_onBeginUpdate:o.noop,beginUpdate:function(){var t=this;return t._initialized&&t._isUpdateAllowed()&&(t._onBeginUpdate(),t._suspendChanges()),t.callBase.apply(t,arguments),t},endUpdate:function(){return this.callBase(),this._isUpdateAllowed()&&this._resumeChanges(),this},option:function(t){var e=this;if(!(e._initialized&&e._applyingChanges&&(arguments.length>1||(0,s.isObject)(t))))return S.apply(e,arguments);e._optionsQueue=e._optionsQueue||[],e._optionsQueue.push(e._getActionForUpdating(arguments))},_getActionForUpdating:function(t){var e=this;return function(){S.apply(e,t)}},_clean:o.noop,_render:o.noop,_optionChanged:function(t){var e=this;if(!e._optionChangedLocker){var n=e.getPartialChangeOptionsName(t),i=[];n.length>0?n.forEach((function(t){return i.push(e._partialOptionChangesMap[t])})):i.push(e._optionChangesMap[t.name]),i=i.filter((function(t){return!!t})),e._eventTrigger.change(t.name)?e._change(["EVENTS"]):i.length>0?e._change(i):e.callBase.apply(e,arguments)}},_notify:o.noop,_optionChangesMap:{size:"CONTAINER_SIZE",margin:"CONTAINER_SIZE",redrawOnResize:"RESIZE_HANDLER",theme:"THEME",rtlEnabled:"THEME",encodeHtml:"THEME",elementAttr:"ELEMENT_ATTR",disabled:"DISABLED"},_partialOptionChangesMap:{},_partialOptionChangesPath:{},getPartialChangeOptionsName:function(t){var e=this,n=t.fullName,i=n.split(/[.]/),o=t.name,r=t.value,a=this._partialOptionChangesPath[o],l=[];return a&&(!0===a?l.push(o):(a.forEach((function(t){n.indexOf(t)>=0&&l.push(t)})),1===i.length&&("object"===(0,s.type)(r)?e._addOptionsNameForPartialUpdate(r,a,l):"array"===(0,s.type)(r)&&r.length>0&&r.every((function(t){return e._checkOptionsForPartialUpdate(t,a)}))&&r.forEach((function(t){return e._addOptionsNameForPartialUpdate(t,a,l)}))))),l.filter((function(t,e,n){return n.indexOf(t)===e}))},_checkOptionsForPartialUpdate:function(t,e){return!Object.keys(t).some((function(t){return-1===e.indexOf(t)}))},_addOptionsNameForPartialUpdate:function(t,e,n){var i=Object.keys(t);this._checkOptionsForPartialUpdate(t,e)&&i.forEach((function(t){return e.indexOf(t)>-1&&n.push(t)}))},_visibilityChanged:function(){this.render()},_setThemeAndRtl:function(){this._themeManager.setTheme(this.option("theme"),this.option("rtlEnabled"))},_getRendererOptions:function(){return{rtl:this.option("rtlEnabled"),encodeHtml:this.option("encodeHtml"),animation:this._getAnimationOptions()}},_setRendererOptions:function(){this._renderer.setOptions(this._getRendererOptions())},svg:function(){return this._renderer.svg()},getSize:function(){var t=this._canvas||{};return{width:t.width,height:t.height}},isReady:I,_dataIsReady:k,_resetIsReady:function(){this.isReady=I},_drawn:function(){var t=this;t.isReady=I,t._dataIsReady()&&t._renderer.onEndAnimation((function(){t.isReady=k})),t._eventTrigger("drawn",{})}}),m.default.replaceInherit(t.exports)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.plugin=e.ExportMenu=e.combineMarkups=e.exportWidgets=e.getMarkup=e.exportFromMarkup=void 0;var i=n(0),o=n(10),r=n(13),a=f(n(278)),s=f(n(12)),l=n(2),u=f(n(82)),c=f(n(216)),d=f(n(28)),h=n(152);function f(t){return t&&t.__esModule?t:{default:t}}var p=a.default.image,m=a.default.svg,g=a.default.pdf,_=[d.default.down,d.default.move].join(" "),v=[[9,12,26,12,26,14,9,14],[9,17,26,17,26,19,9,19],[9,22,26,22,26,24,9,24]],y=["PNG","JPEG","GIF"],b=["PDF","SVG"],w=/data-backgroundcolor="([^"]*)"/;function x(){var t=p.testFormats(y);return{unsupported:t.unsupported,supported:t.supported.concat(b)}}function C(t,e,n){if(n=n||x(),t=String(t).toUpperCase(),-1!==n.supported.indexOf(t))return t;-1!==n.unsupported.indexOf(t)&&e&&e("W2108",[t])}function S(t){return"SVG"===t?m.getData:"PDF"===t?g.getData:p.getData}function k(t,e,n){var i={},o=n.type,a=n.format,s=function(t,e,n){var i=-85,o=40+30*n,r={rect:{width:118,height:30,x:-84,y:o},text:{x:i+(t.rtl?105:15),y:o+30-8}};return"printing"===e&&(r.separator={stroke:t.button.default.borderColor,"stroke-width":1,cursor:"pointer",sharp:"v",d:"M -85 "+(o+30-1)+" L 35 "+(o+30-1)}),r}(e,o,n.itemIndex),l=(0,r.patchFontOptions)(e.font);l["pointer-events"]="none";var u=t.g().attr({class:"dx-export-menu-list-item"});i["export-element-type"]=o,a&&(i["export-element-format"]=a);var d=t.rect();d.attr(s.rect).css({cursor:"pointer","pointer-events":"all"}).data(i),d.on(c.default.start+".export",(function(){return d.attr({fill:e.button.hover.backgroundColor})})).on(c.default.end+".export",(function(){return d.attr({fill:null})})),d.append(u);var h=t.text(n.text).css(l).attr(s.text).append(u);return"printing"===o&&t.path(null,"line").attr(s.separator).append(u),{g:u,rect:d,resetState:function(){return d.attr({fill:null})},fixPosition:function(){var t=h.getBBox();h.move(s.text.x-t.x-(e.rtl?t.width:0))}}}var I=e.exportFromMarkup=function(t,e){e.format=C(e.format)||"PNG",e.fileName=e.fileName||"file",e.exportingAction=e.onExporting,e.exportedAction=e.onExported,e.fileSavingAction=e.onFileSaving,e.margin=(0,l.isDefined)(e.margin)?e.margin:10,e.backgroundColor=(0,l.isDefined)(e.backgroundColor)?e.backgroundColor:function(t){var e=w.exec(t);return null===e||void 0===e?void 0:e[1]}(t)||u.default.getTheme().backgroundColor,a.default.export(t,e,S(e.format))},T=(e.getMarkup=function(t){return T(t).markup},e.exportWidgets=function(t,n){n=n||{};var i=e.combineMarkups(t,{gridLayout:n.gridLayout,verticalAlignment:n.verticalAlignment,horizontalAlignment:n.horizontalAlignment});n.width=i.width,n.height=i.height,I(i.markup,n)},e.combineMarkups=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Array.isArray(t)?Array.isArray(t[0])||(t=t.map((function(t){return[t]}))):t=[[t]];var n=!e.gridLayout,i=t.reduce((function(t,e,i){var o=e.reduce((function(t,e,n){var o=e.getSize(),r=e.option("backgroundColor")||u.default.getTheme(e.option("theme")).backgroundColor;return r&&-1===t.backgroundColors.indexOf(r)&&t.backgroundColors.push(r),t.hOffset=t.width,t.width+=o.width,t.height=Math.max(t.height,o.height),t.itemWidth=Math.max(t.itemWidth,o.width),t.items.push({markup:e.svg(),width:o.width,height:o.height,c:n,r:i,hOffset:t.hOffset}),t}),{items:[],height:0,itemWidth:0,hOffset:0,width:0,backgroundColors:t.backgroundColors});return t.rowOffsets.push(t.totalHeight),t.rowHeights.push(o.height),t.totalHeight+=o.height,t.items=t.items.concat(o.items),t.itemWidth=Math.max(t.itemWidth,o.itemWidth),t.maxItemLen=Math.max(t.maxItemLen,o.items.length),t.totalWidth=n?Math.max(t.totalWidth,o.width):t.maxItemLen*t.itemWidth,t}),{items:[],rowOffsets:[],rowHeights:[],itemWidth:0,totalHeight:0,maxItemLen:0,totalWidth:0,backgroundColors:[]}),o='data-backgroundcolor="'.concat(1===i.backgroundColors.length?i.backgroundColors[0]:"",'" '),r=function(t){var n=e.verticalAlignment,o=i.rowHeights[t.r]-t.height;return i.rowOffsets[t.r]+("bottom"===n?o:"center"===n?o/2:0)},a=function(t){if(n)return t.hOffset;var o=e.horizontalAlignment,r=i.itemWidth,a=r-t.width;return t.c*r+("right"===o?a:"center"===o?a/2:0)},s=i.totalHeight,l=i.totalWidth;return{markup:"'+i.items.map((function(t){return'').concat(t.markup,"")})).join("")+"",width:l,height:s}}),E=e.ExportMenu=function(t){var e=this._renderer=t.renderer;this._incidentOccurred=t.incidentOccurred,this._exportTo=t.exportTo,this._print=t.print,this._shadow=e.shadowFilter("-50%","-50%","200%","200%",2,6,3),this._shadow.attr({opacity:.8}),this._group=e.g().attr({class:"dx-export-menu","hidden-for-export":!0}).linkOn(e.root,{name:"export-menu",after:"peripheral"}),this._buttonGroup=e.g().attr({class:"dx-export-menu-button"}).append(this._group),this._listGroup=e.g().attr({class:"dx-export-menu-list"}).append(this._group),this._overlay=e.rect(-85,39,120,0),this._overlay.attr({"stroke-width":1,cursor:"pointer",rx:4,ry:4,filter:this._shadow.id}),this._overlay.data({"export-element-type":"list"}),this.validFormats=x(),this._subscribeEvents()};function O(t,e,n,i){return(i||e.format)&&(i=C(i||e.format,t._incidentOccurred)),{format:i||"PNG",fileName:n||e.fileName||"file",proxyUrl:e.proxyUrl,backgroundColor:e.backgroundColor,width:t._canvas.width,height:t._canvas.height,margin:e.margin,svgToCanvas:e.svgToCanvas,forceProxy:e.forceProxy,exportingAction:t._createActionByOption("onExporting"),exportedAction:t._createActionByOption("onExported"),fileSavingAction:t._createActionByOption("onFileSaving")}}(0,i.extend)(E.prototype,{getLayoutOptions:function(){if(this._hiddenDueToLayout)return{width:0,height:0,cutSide:"vertical",cutLayoutSide:"top"};var t=this._buttonGroup.getBBox();return t.cutSide="vertical",t.cutLayoutSide="top",t.height+=10,t.position={vertical:"top",horizontal:"right"},t.verticalAlignment="top",t.horizontalAlignment="right",t},shift:function(t,e){this._group.attr({translateY:this._group.attr("translateY")+e})},draw:function(t,e,n){this._group.move(t-35-2-3+n.left,Math.floor(e/2-17.5));var i=this.getLayoutOptions();return(i.width>t||i.height>e)&&this.freeSpace(),this},show:function(){this._group.linkAppend()},hide:function(){this._group.linkRemove()},setOptions:function(t){var e=this;this._options=t,t.formats?t.formats=t.formats.reduce((function(t,n){return(n=C(n,e._incidentOccurred,e.validFormats))&&t.push(n),t}),[]):t.formats=this.validFormats.supported.slice(),t.printingEnabled=void 0===t.printingEnabled||t.printingEnabled,t.enabled&&(t.formats.length||t.printingEnabled)?(this.show(),this._updateButton(),this._updateList(),this._hideList()):this.hide()},dispose:function(){this._unsubscribeEvents(),this._group.linkRemove().linkOff(),this._group.dispose(),this._shadow.dispose()},layoutOptions:function(){return this._options.enabled&&{horizontalAlignment:"right",verticalAlignment:"top",weak:!0}},measure:function(){this._fillSpace();var t=this._options.button.margin;return[35+t.left+t.right,35+t.top+t.bottom]},move:function(t){var e=this._options.button.margin;this._group.attr({translateX:Math.round(t[0])+e.left,translateY:Math.round(t[1])+e.top})},_fillSpace:function(){this._hiddenDueToLayout=!1,this.show()},freeSpace:function(){this._incidentOccurred("W2107"),this._hiddenDueToLayout=!0,this.hide()},_hideList:function(){this._listGroup.remove(),this._listShown=!1,this._setButtonState("default"),this._menuItems.forEach((function(t){return t.resetState()}))},_showList:function(){this._listGroup.append(this._group),this._listShown=!0,this._menuItems.forEach((function(t){return t.fixPosition()}))},_setButtonState:function(t){var e=this._options.button[t];this._button.attr({stroke:e.borderColor,fill:e.backgroundColor}),this._icon.attr({fill:e.color})},_subscribeEvents:function(){var t=this;this._renderer.root.on(d.default.up+".export",(function(e){var n=e.target["export-element-type"];n?"button"===n?t._listShown?(t._setButtonState("default"),t._hideList()):(t._setButtonState("focus"),t._showList()):"printing"===n?(t._print(),t._hideList()):"exporting"===n&&(t._exportTo(e.target["export-element-format"]),t._hideList()):t._button&&t._hideList()})),this._listGroup.on(_,(function(t){return t.stopPropagation()})),this._buttonGroup.on(d.default.enter,(function(){return t._setButtonState("hover")})),this._buttonGroup.on(d.default.leave,(function(){return t._setButtonState(t._listShown?"focus":"default")})),this._buttonGroup.on(d.default.down+".export",(function(){return t._setButtonState("active")}))},_unsubscribeEvents:function(){this._renderer.root.off(".export"),this._listGroup.off(),this._buttonGroup.off()},_updateButton:function(){var t=this._renderer,e=this._options,n={"export-element-type":"button"};this._button||(this._button=t.rect(0,0,35,35).append(this._buttonGroup),this._button.attr({rx:4,ry:4,fill:e.button.default.backgroundColor,stroke:e.button.default.borderColor,"stroke-width":1,cursor:"pointer"}),this._button.data(n),this._icon=t.path(v).append(this._buttonGroup),this._icon.attr({fill:e.button.default.color,cursor:"pointer"}),this._icon.data(n),this._buttonGroup.setTitle(s.default.format("vizExport-titleMenuText")))},_updateList:function(){var t=this._options,e=t.button.default,n=this._listGroup,i=function(t,e){var n=[];return e.printingEnabled&&n.push(k(t,e,{type:"printing",text:s.default.format("vizExport-printingButtonText"),itemIndex:n.length})),n=e.formats.reduce((function(n,i){return n.push(k(t,e,{type:"exporting",text:s.default.getFormatter("vizExport-exportButtonText")(i),format:i,itemIndex:n.length})),n}),n)}(this._renderer,t);this._shadow.attr({color:t.shadowColor}),this._overlay.attr({height:30*i.length+2,fill:e.backgroundColor,stroke:e.borderColor}),n.clear(),this._overlay.append(n),i.forEach((function(t){return t.g.append(n)})),this._menuItems=i}});e.plugin={name:"export",init:function(){var t=this;this._exportMenu=new e.ExportMenu({renderer:this._renderer,incidentOccurred:this._incidentOccurred,print:function(){return t.print()},exportTo:function(e){return t.exportTo(void 0,e)}}),this._layout.add(this._exportMenu)},dispose:function(){this._exportMenu.dispose()},members:{_getExportMenuOptions:function(){return(0,i.extend)({},this._getOption("export"),{rtl:this._getOption("rtlEnabled",!0)})},_disablePointerEvents:function(){var t=this._renderer.root.attr("pointer-events");return this._renderer.root.attr({"pointer-events":"none"}),t},exportTo:function(t,e){var n=this,i=this._exportMenu,o=O(this,this._getOption("export")||{},t,e);i&&i.hide();var r=this._disablePointerEvents(),s=a.default.export(this._renderer.root.element,o,S(o.format)).fail(h.logger.error).always((function(){n._renderer.root.attr({"pointer-events":r})}));return i&&i.show(),s},print:function(){var t=this,e=this._exportMenu,n=O(this,this._getOption("export")||{});n.exportingAction=null,n.exportedAction=null,n.margin=0,n.format="PNG",n.forceProxy=!0,n.fileSavingAction=function(t){!function(t,e){var n=(0,o.getWindow)().document,i=n.createElement("iframe");i.onload=function(t,e){return function(){var e=this,n=this.contentWindow,i=n.document.createElement("img");n.document.body.appendChild(i);var o=function(){e.parentElement.removeChild(e)};i.addEventListener("load",(function(){n.focus(),n.print(),o()})),i.addEventListener("error",o),i.src=t}}(t),i.style.visibility="hidden",i.style.position="fixed",i.style.right="0",i.style.bottom="0",n.body.appendChild(i)}("data:image/png;base64,".concat(t.data),n.__test),t.cancel=!0};var i=this._disablePointerEvents();e&&e.hide();var r=a.default.export(this._renderer.root.element,n,S(n.format)).fail(h.logger.error).always((function(){t._renderer.root.attr({"pointer-events":i})}));return e&&e.show(),r}},customize:function(t){var e=t.prototype;t.addChange({code:"EXPORT",handler:function(){this._exportMenu.setOptions(this._getExportMenuOptions()),this._change(["LAYOUT"])},isThemeDependent:!0,isOptionChange:!0,option:"export"}),e._optionChangesMap.onExporting="EXPORT",e._optionChangesMap.onExported="EXPORT",e._optionChangesMap.onFileSaving="EXPORT"},fontFields:["export.font"]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o={toXml:function(t,e,n){var o=["<",t];for(var r in e){var a=e[r];(0,i.isDefined)(a)&&o.push(" ",r,'="',a,'"')}return(0,i.isDefined)(n)&&""!==n?o.push(">",n,""):o.push(" />"),o.join("")}};e.default=o},function(t,e,n){"use strict";var i=n(2),o=n(0),r=n(13),a=Number,s=(0,r.enumParser)(["left","center","right"]),l=(0,r.enumParser)(["top","bottom"]);function u(t){return!!(t&&String(t).length>0)}function c(t,e,n,i,o){t.attr({text:e}).setMaxSize(n,o,i).textChanged&&t.setTitle(e)}function d(t){return t>=0?a(t):10}function h(t){this._params=t,this._group=t.renderer.g().attr({class:t.cssClass}).linkOn(t.root||t.renderer.root,"title"),this._hasText=!1}(0,o.extend)(h.prototype,n(279).LayoutElement.prototype,{dispose:function(){this._group.linkRemove(),this._group.linkOff(),this._titleElement&&(this._clipRect.dispose(),this._titleElement=this._subtitleElement=this._clipRect=null),this._params=this._group=this._options=null},_updateOptions:function(t){var e;this._options=t,this._options.horizontalAlignment=s(t.horizontalAlignment,"center"),this._options.verticalAlignment=l(t.verticalAlignment,"top"),this._options.margin=(e=t.margin)>=0?{left:a(e),top:a(e),right:a(e),bottom:a(e)}:{left:d((e=e||{}).left),top:d(e.top),right:d(e.right),bottom:d(e.bottom)}},_updateStructure:function(){var t=this._params.renderer,e=this._group,n=this._options,i=n.horizontalAlignment;this._titleElement||(this._titleElement=t.text().append(e),this._subtitleElement=t.text(),this._clipRect=t.clipRect(),e.attr({"clip-path":this._clipRect.id})),this._titleElement.attr({align:i,class:n.cssClass}),this._subtitleElement.attr({align:i,class:n.subtitle.cssClass}),e.linkAppend(),u(n.subtitle.text)?this._subtitleElement.append(e):this._subtitleElement.remove()},_updateTexts:function(){var t,e=this._options,n=e.subtitle,i=this._titleElement,o=this._subtitleElement;i.attr({text:"A",y:0}).css((0,r.patchFontOptions)(e.font)),t=i.getBBox(),this._baseLineCorrection=t.height+t.y,i.attr({text:e.text});var a=-(t=i.getBBox()).y;i.attr({y:a}),u(n.text)&&o.attr({text:n.text,y:0}).css((0,r.patchFontOptions)(n.font))},_shiftSubtitle:function(){var t=this._titleElement.getBBox(),e=this._subtitleElement,n=this._options.subtitle.offset;e.move(0,t.y+t.height-e.getBBox().y-n)},_updateBoundingRectAlignment:function(){var t=this._boundingRect,e=this._options;t.verticalAlignment=e.verticalAlignment,t.horizontalAlignment=e.horizontalAlignment,t.cutLayoutSide=e.verticalAlignment,t.cutSide="vertical",t.position={horizontal:e.horizontalAlignment,vertical:e.verticalAlignment}},hasText:function(){return this._hasText},update:function(t,e){var n=(0,o.extend)(!0,{},t,function(t){var e=(0,i.isString)(t)?{text:t}:t||{};return e.subtitle=(0,i.isString)(e.subtitle)?{text:e.subtitle}:e.subtitle||{},e}(e)),r=u(n.text),a=r||r!==this._hasText;return this._baseLineCorrection=0,this._updateOptions(n),this._boundingRect={},r?(this._updateStructure(),this._updateTexts()):this._group.linkRemove(),this._updateBoundingRect(),this._updateBoundingRectAlignment(),this._hasText=r,a},draw:function(t,e){return this._hasText&&(this._group.linkAppend(),this._correctTitleLength(t),this._group.getBBox().height>e&&this.freeSpace()),this},_correctTitleLength:function(t){var e=this._options,n=e.margin,i=t-n.left-n.right,o=e.placeholderSize;c(this._titleElement,e.text,i,e,o),this._subtitleElement&&(a(o)>0&&(o-=this._titleElement.getBBox().height),c(this._subtitleElement,e.subtitle.text,i,e.subtitle,o),this._shiftSubtitle()),this._updateBoundingRect();var r=this.getCorrectedLayoutOptions(),s=r.x,l=r.y,u=r.height;this._clipRect.attr({x:s,y:l,width:t,height:u})},getLayoutOptions:function(){return this._boundingRect||null},shift:function(t,e){var n=this.getLayoutOptions();return this._group.move(t-n.x,e-n.y),this},_updateBoundingRect:function(){var t=this._options,e=t.margin,n=this._boundingRect,i=this._hasText?this._group.getBBox():{width:0,height:0,x:0,y:0,isEmpty:!0};i.isEmpty||(i.height+=e.top+e.bottom-this._baseLineCorrection,i.width+=e.left+e.right,i.x-=e.left,i.y+=this._baseLineCorrection-e.top),t.placeholderSize>0&&(i.height=t.placeholderSize),n.height=i.height,n.width=i.width,n.x=i.x,n.y=i.y},getCorrectedLayoutOptions:function(){var t=this.getLayoutOptions(),e=this._baseLineCorrection;return(0,o.extend)({},t,{y:t.y-e,height:t.height+e})},layoutOptions:function(){return this._hasText?{horizontalAlignment:this._boundingRect.horizontalAlignment,verticalAlignment:this._boundingRect.verticalAlignment,priority:0}:null},measure:function(t){return this.draw(t[0],t[1]),[this._boundingRect.width,this._boundingRect.height]},move:function(t,e){!function(t,e){return t[2]-t[0]").css({position:"absolute",overflow:"hidden",pointerEvents:"none"}).addClass(t.cssClass),this._renderer=e=new s.default.Renderer({pathModified:t.pathModified,container:this._wrapper[0]}),e.root.attr({"pointer-events":"none"}),this._text=e.text(void 0,0,0),this._textGroupHtml=(0,a.default)("
").css({position:"absolute",padding:0,margin:0,border:"0px solid transparent"}).appendTo(this._wrapper),this._textHtml=(0,a.default)("
").css({position:"relative",display:"inline-block",padding:0,margin:0,border:"0px solid transparent"}).appendTo(this._textGroupHtml)}y.prototype={constructor:y,dispose:function(){this._wrapper.remove(),this._renderer.dispose(),this._options=this._widgetRoot=null},_getContainer:function(){var t=this._options,e=(0,a.default)(this._widgetRoot).closest(t.container);return 0===e.length&&(e=(0,a.default)(t.container)),(e.length?e:(0,a.default)("body")).get(0)},setTemplate:function(t){this._template=t?this._widget._getTemplate(t):null},setOptions:function(t){var e=this;t=t||{};var n=this;n._options=t,n._textFontStyles=c.default.patchFontOptions(t.font),n._textFontStyles.color=n._textFontStyles.fill,n._wrapper.css({zIndex:t.zIndex}),n._customizeTooltip=t.customizeTooltip;var i=n._textGroupHtml,o=n._textHtml;this.plaque&&this.plaque.clear(),this.setTemplate(t.contentTemplate);var r=t.interactive?"auto":"none";t.interactive&&this._renderer.root.css({"-ms-user-select":"auto","-moz-user-select":"auto","-webkit-user-select":"auto"});return this.plaque=new h.Plaque({opacity:n._options.opacity,color:n._options.color,border:n._options.border,paddingLeftRight:n._options.paddingLeftRight,paddingTopBottom:n._options.paddingTopBottom,arrowLength:n._options.arrowLength,arrowWidth:20,shadow:n._options.shadow,cornerRadius:n._options.cornerRadius},n,n._renderer.root,(function(a,s){var l=a._state,u=a._template,c=u&&!l.formatObject.skipTemplate;if(l.html||c){if(!l.isRendered){if(c){if(u.render({model:l.formatObject,container:o}),l.html=o.html(),!l.html)return void e.plaque.clear()}else n._text.attr({text:""}),o.html(l.html);i.css({color:l.textColor,width:3e3,pointerEvents:r}),l.isRendered=!0}}else n._text.css({fill:l.textColor}).attr({text:l.text,class:t.cssClass,"pointer-events":r}).append(s.attr({align:t.textAlignment}));a.plaque.customizeCloud({fill:l.color,stroke:l.borderColor,"pointer-events":r})}),!0,(function(t,e){if(t._state.html){var n,i=_.getComputedStyle;return i?(n=i(o.get(0)),n={x:0,y:0,width:p(parseFloat(n.width)),height:p(parseFloat(n.height))}):(n=o.get(0).getBoundingClientRect(),n={x:0,y:0,width:p(n.width?n.width:n.right-n.left),height:p(n.height?n.height:n.bottom-n.top)}),n}return e.getBBox()}),(function(t,e,i,o){t._state.html?n._textGroupHtml.css({left:i,top:o}):e.move(i,o)})),n},setRendererOptions:function(t){return this._renderer.setOptions(t),this._textGroupHtml.css({direction:t.rtl?"rtl":"ltr"}),this},render:function(){v(this._wrapper);var t={};for(var e in this._textFontStyles)t[r.default.camelize(e)]=this._textFontStyles[e];return this._textGroupHtml.css(t),this._text.css(this._textFontStyles),this._eventData=null,this},update:function(t){return this.setOptions(t).render()},_prepare:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._customizeTooltip,i=this._options,o={};return l.default.isFunction(n)&&(o=n.call(t,t),"text"in(o=l.default.isPlainObject(o)?o:{})&&(e.text=l.default.isDefined(o.text)?String(o.text):""),"html"in o&&(e.html=l.default.isDefined(o.html)?String(o.html):"")),"text"in e||"html"in e||(e.text=t.valueText||t.description||""),e.color=o.color||i.color,e.borderColor=o.borderColor||(i.border||{}).color,e.textColor=o.fontColor||(this._textFontStyles||{}).color,!!e.text||!!e.html||!!this._template},show:function(t,e,n,i){var o={formatObject:t};return!!this._prepare(t,o,i)&&(this._state=o,this._wrapper.appendTo(this._getContainer()),this._clear(),this.plaque.clear().draw((0,u.extend)({},this._options,{canvas:this._getCanvas()},o,{x:e.x,y:e.y,offset:e.offset})),this.moveWrapper(),this._eventData&&this._eventTrigger("tooltipHidden",this._eventData),this._eventData=n,this._eventTrigger("tooltipShown",this._eventData),!0)},hide:function(){v(this._wrapper),this._eventData&&(this._eventTrigger("tooltipHidden",this._eventData),this._clear(),this._eventData=null)},_clear:function(){this._textHtml.empty()},move:function(t,e,n){this.plaque.draw({x:t,y:e,offset:n,canvas:this._getCanvas()}),this.moveWrapper()},moveWrapper:function(){var t=this.plaque.getBBox();this._renderer.resize(t.width,t.height);var e=this._wrapper.css({left:0,top:0}).offset(),n=t.x,i=t.y;this._wrapper.css({left:n-e.left,top:i-e.top}),this.plaque.moveRoot(-n,-i),this._state.html&&(this._textHtml.css({left:-n,top:-i}),this._textGroupHtml.css({width:t.width}))},formatValue:function(t,e){var n=e?function(t,e){var n=t;switch(e){case"argument":n={format:t.argumentFormat};break;case"percent":n={format:{type:"percent",precision:t.format&&t.format.percentPrecision}}}return n}(this._options,e):this._options;return(0,d.format)(t,n.format)},getLocation:function(){return c.default.normalizeEnum(this._options.location)},isEnabled:function(){return!!this._options.enabled},isShared:function(){return!!this._options.shared},_getCanvas:function(){var t=this._getContainer(),e=t.getBoundingClientRect(),n=i.default.getDocumentElement(),o=i.default.getDocument(),r=_.pageXOffset||n.scrollLeft||0,a=_.pageYOffset||n.scrollTop||0,s={left:r,top:a,width:n.clientWidth+r||0,height:m(o.body.scrollHeight,n.scrollHeight,o.body.offsetHeight,n.offsetHeight,o.body.clientHeight,n.clientHeight)||0,right:0,bottom:0};return t!==i.default.getBody()&&(r=m(s.left,s.left+e.left),a=m(s.top,s.top+e.top),s.width=g(e.width,s.width)+r+s.left,s.height=g(e.height,s.height)+a+s.top,s.left=r,s.top=a),s}},e.Tooltip=y,e.plugin={name:"tooltip",init:function(){this._initTooltip()},dispose:function(){this._disposeTooltip()},members:{_initTooltip:function(){this._tooltip=new e.Tooltip({cssClass:this._rootClassPrefix+"-tooltip",eventTrigger:this._eventTrigger,pathModified:this.option("pathModified"),widgetRoot:this.element(),widget:this})},_disposeTooltip:function(){this._tooltip.dispose(),this._tooltip=null},_setTooltipRendererOptions:function(){this._tooltip.setRendererOptions(this._getRendererOptions())},_setTooltipOptions:function(){this._tooltip.update(this._getOption("tooltip"))}},extenders:{_stopCurrentHandling:function(){this._tooltip&&this._tooltip.hide()}},customize:function(t){var e=t.prototype;e._eventsMap.onTooltipShown={name:"tooltipShown"},e._eventsMap.onTooltipHidden={name:"tooltipHidden"},t.addChange({code:"TOOLTIP_RENDERER",handler:function(){this._setTooltipRendererOptions()},isThemeDependent:!0,isOptionChange:!0}),t.addChange({code:"TOOLTIP",handler:function(){this._setTooltipOptions()},isThemeDependent:!0,isOptionChange:!0,option:"tooltip"})},fontFields:["tooltip.font"]}},function(t,e,n){"use strict";var i=n(2),o=n(0).extend,r=i.isDefined,a=i.isDate,s=i.isFunction,l=n(13).unique;function u(t,e){return et}function d(t,e,n,i){var o=r(e);r(t)?o&&i(t,e)&&n(e):o&&n(e)}var h=e.Range=function(t){t&&o(this,t)};h.prototype={constructor:h,addRange:function(t){var e=this,n=e.categories,i=t.categories,o="discrete"===e.axisType,a=function(n,i){d(e[n],t[n],(function(t){e[n]=t}),i)},s=function(t,n,i){d(e[t],e[n],(function(n){r(e[t])&&(e[t]=n)}),i)},h=function(n){e[n]=e[n]||t[n]};return h("invert"),h("axisType"),h("dataType"),h("isSpacedMargin"),"logarithmic"===e.axisType?h("base"):e.base=void 0,a("min",u),a("max",c),o?(h("minVisible"),h("maxVisible")):(a("minVisible",u),a("maxVisible",c)),a("interval",u),o||(s("min","minVisible",u),s("min","maxVisible",u),s("max","maxVisible",c),s("max","minVisible",c)),e.categories=void 0===n?i:i?l(n.concat(i)):n,"logarithmic"===e.axisType&&(h("allowNegatives"),a("linearThreshold",u)),e},isEmpty:function(){return(!r(this.min)||!r(this.max))&&(!this.categories||0===this.categories.length)},correctValueZeroLevel:function(){var t=this;if("logarithmic"===t.axisType||a(t.max)||a(t.min))return t;function e(e,n){t[e]<0&&t[n]<0&&(t[n]=0),t[e]>0&&t[n]>0&&(t[e]=0)}return e("min","max"),e("minVisible","maxVisible"),t},sortCategories:function(t){if(!1!==t&&this.categories)if(Array.isArray(t)){var e=t.map((function(t){return t.valueOf()})),n=this.categories.filter((function(t){return-1===e.indexOf(t.valueOf())}));this.categories=t.concat(n)}else{var i=!s(t);i&&"string"!==this.dataType?t=function(t,e){return t.valueOf()-e.valueOf()}:i&&(t=!1),t&&this.categories.sort(t)}}}},function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(0).extend,r=n(16).inArray,a=n(5).each,s=n(230),l=n(2),u=n(13),c=n(4).noop,d=l.isDefined,h=l.isString,f=u.map,p=u.normalizeEnum,m=Math,g=m.abs,_=m.sqrt,v=m.max;function y(t){var e=0;return a(t,(function(t,n){e+=n})),e}function b(t,e){return y(f(t,(function(t){return(t-e)*(t-e)})))/t.length}function w(t){return function(e,n){var r=e.intervalStart,a=e.data,s=n.getValueFields()[0],l=a[0];return l=a.reduce((function(e,n){var i=n[s];return null===e[s]&&(e=n),null!==i&&t(i,e[s])?n:e}),l),o({},l,i({},n.getArgumentField(),r))}}e.chart={},e.polar={};var x={_defaultDuration:400,_defaultTrackerWidth:12,_applyStyle:c,_updateOptions:c,_parseStyle:c,_prepareSegment:c,_drawSegment:c,_appendInGroup:function(){this._group.append(this._extGroups.seriesGroup)},_createLegendState:function(t,e){return{fill:t.color||e,hatching:t.hatching?o({},t.hatching,{direction:"right"}):void 0}},_applyElementsClipRect:function(t){t["clip-path"]=this._paneClipRectID},_applyMarkerClipRect:function(t){t["clip-path"]=this._forceClipping?this._paneClipRectID:null},_createGroup:function(t,e,n,i){var o=e[t]=e[t]||this._renderer.g();n&&o.append(n),i&&o.attr(i)},_applyClearingSettings:function(t){t.opacity=null,t.scale=null,this._options.rotated?t.translateX=null:t.translateY=null},_createGroups:function(){this._createGroup("_markersGroup",this,this._group),this._createGroup("_labelsGroup",this)},_setMarkerGroupSettings:function(){var t=this._createPointStyles(this._getMarkerGroupOptions()).normal;t.class="dxc-markers",t.opacity=1,this._applyMarkerClipRect(t),this._markersGroup.attr(t)},getVisibleArea:function(){return this._visibleArea},areErrorBarsVisible:function(){var t,e=this._options.valueErrorBar;return e&&this._errorBarsEnabled()&&"none"!==e.displayMode&&(t=p(e.type),-1!==r(t,["fixed","percent","variance","stddeviation","stderror"])||d(e.lowValueField)||d(e.highValueField))},groupPointsByCoords:function(t){var e=[];return a(this.getVisiblePoints(),(function(n,i){var o=parseInt(t?i.vy:i.vx);e[o]?Array.isArray(e[o])?e[o].push(i):e[o]=[e[o],i]:e[o]=i})),e},_createErrorBarGroup:function(t){var e,n=this._options.valueErrorBar;this.areErrorBarsVisible()&&(e={class:"dxc-error-bars",stroke:n.color,"stroke-width":n.lineWidth,opacity:t?.001:n.opacity||1,"stroke-linecap":"square",sharp:!0,"clip-path":this._forceClipping?this._paneClipRectID:this._widePaneClipRectID},this._createGroup("_errorBarGroup",this,this._group,e))},_setGroupsSettings:function(t){this._setMarkerGroupSettings(),this._setLabelGroupSettings(t),this._createErrorBarGroup(t)},_getCreatingPointOptions:function(){var t,e,n=this._predefinedPointOptions;return n||(t=this._getPointOptions(),this._predefinedPointOptions=n=o(!0,{styles:{}},t),e=t.styles&&t.styles.normal||{},n.styles=n.styles||{},n.styles.normal={"stroke-width":e["stroke-width"],r:e.r,opacity:e.opacity}),n},_getPointOptions:function(){return this._parsePointOptions(this._preparePointOptions(),this._options.label)},_getOptionsForPoint:function(){return this._options.point},_parsePointStyle:function(t,e,n,i){var o=t.border||{},r=void 0!==t.size?t.size:i;return{fill:t.color||e,stroke:o.color||n,"stroke-width":o.visible?o.width:0,r:r/2+(o.visible&&0!==r&&~~(o.width/2)||0)}},_createPointStyles:function(t){var e=t.color||this._options.mainSeriesColor,n=this._options.containerBackgroundColor,i=this._parsePointStyle(t,e,e);return i.visibility=t.visible?"visible":"hidden",{normal:i,hover:this._parsePointStyle(t.hoverStyle,n,e,t.size),selection:this._parsePointStyle(t.selectionStyle,n,e,t.size)}},_checkData:function(t,e,n){return(n=n||{value:this.getValueFields()[0]}).argument=this.getArgumentField(),function(t,e,n){var i=!0;for(var o in e){var r="argument"===o;if(r||"size"===o?!d(t[o]):void 0===t[o]){var a=e[o];r||(n[a]=(n[a]||0)+1),i=!1}}return i}(t,n,e||{})&&t.value===t.value},getValueRangeInitialValue:function(){},_getRangeData:function(){return s.getRangeData(this)},_getPointDataSelector:function(){var t,e,n=this,i=this.getValueFields()[0],o=this.getArgumentField(),r=this.getTagField(),a=this.areErrorBarsVisible();if(a){var s=this._options.valueErrorBar;t=s.lowValueField||"lowError",e=s.highValueField||"highError"}return function(s){var l={value:n._processEmptyValue(s[i]),argument:s[o],tag:s[r],data:s};return a&&(l.lowError=s[t],l.highError=s[e]),l}},_errorBarsEnabled:function(){return"discrete"!==this.valueAxisType&&"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType},_drawPoint:function(t){var e=t.point;e.isInVisibleArea()?(e.clearVisibility(),e.draw(this._renderer,t.groups,t.hasAnimation,t.firstDrawing),this._drawnPoints.push(e)):e.setInvisibility()},_animateComplete:function(){var t={duration:this._defaultDuration};this._labelsGroup&&this._labelsGroup.animate({opacity:1},t),this._errorBarGroup&&this._errorBarGroup.animate({opacity:this._options.valueErrorBar.opacity||1},t)},_animate:function(){var t=this,e=t._drawnPoints.length-1;a(t._drawnPoints||[],(function(n,i){i.animate(n===e?function(){t._animateComplete()}:void 0,{translateX:i.x,translateY:i.y})}))},_defaultAggregator:"avg",_aggregators:{avg:function(t,e){var n,o=t.data,r=t.intervalStart;if(o.length){var a=e.getValueFields()[0],s=o.reduce((function(t,e){var n=e[a];return d(n)?(t[0]+=n,t[1]++):null===n&&t[2]++,t}),[0,0,0]);return function(t,e,n){var i=n.getOptions().valueErrorBar,o=n.getValueFields()[0],r=i.lowValueField||"lowError",a=i.highValueField||"highError";if(n.areErrorBarsVisible()&&void 0===i.type){var s=e.reduce((function(t,e){return d(e[r])&&(t[0]+=e[o]-e[r],t[1]++),d(e[a])&&(t[2]+=e[a]-e[o],t[3]++),t}),[0,0,0,0]);s[1]&&(t[r]=t[o]-s[0]/s[1]),s[2]&&(t[a]=t[o]+s[2]/s[3])}return t}((i(n={},a,s[2]===o.length?null:s[0]/s[1]),i(n,e.getArgumentField(),r),n),o,e)}},sum:function(t,e){var n,o=t.intervalStart,r=t.data;if(r.length){var a=e.getValueFields()[0],s=r.reduce((function(t,e){var n=e[a];return void 0!==n&&(t[0]+=n),null===n?t[1]++:void 0===n&&t[2]++,t}),[0,0,0]),l=s[0];if(s[1]===r.length&&(l=null),s[2]!==r.length)return function(t,e,n){var i=n.getOptions().valueErrorBar,o=i.lowValueField||"lowError",r=i.highValueField||"highError";return n.areErrorBarsVisible()&&void 0===i.type&&(t[o]=0,t[r]=0,t=e.reduce((function(t,e){return t[o]+=e[o],t[r]+=e[r],t}),t)),t}((i(n={},a,l),i(n,e.getArgumentField(),o),n),r,e)}},count:function(t,e){var n,o=t.data,r=t.intervalStart,a=e.getValueFields()[0];return i(n={},e.getArgumentField(),r),i(n,a,o.filter((function(t){return void 0!==t[a]})).length),n},min:w((function(t,e){return te}))},_endUpdateData:function(){delete this._predefinedPointOptions},getArgumentField:function(){return this._options.argumentField||"arg"},getValueFields:function(){var t,e,n=this._options,i=n.valueErrorBar,o=[n.valueField||"val"];return i&&(t=i.lowValueField,e=i.highValueField,h(t)&&o.push(t),h(e)&&o.push(e)),o},_calculateErrorBars:function(t){if(this.areErrorBarsVisible()){var e,n,i,o,r,s=this._options.valueErrorBar,l=p(s.type),u=parseFloat(s.value),c=this.getValueFields()[0],h=s.lowValueField||"lowError",m=s.highValueField||"highError",g=function(t,n){e=n.value,n.lowError=e-u,n.highError=e+u};switch(l){case"fixed":r=g;break;case"percent":r=function(t,n){var i=(e=n.value)*u/100;n.lowError=e-i,n.highError=e+i};break;case"undefined":r=function(t,e){e.lowError=e.data[h],e.highError=e.data[m]};break;default:switch(i=(n=f(t,(function(t){return d(t.data[c])?t.data[c]:null}))).length,u=u||1,l){case"variance":u=b(n,y(n)/i)*u,r=g;break;case"stddeviation":o=y(n)/i,u=_(b(n,o))*u,r=function(t,e){e.lowError=o-u,e.highError=o+u};break;case"stderror":u=_(b(n,y(n)/i)/i)*u,r=g}}r&&a(t,r)}},_patchMarginOptions:function(t){var e=this._getCreatingPointOptions(),n=e.styles,i=[n.normal,n.hover,n.selection].reduce((function(t,e){return v(t,2*e.r+e["stroke-width"])}),0);return t.size=e.visible?i:0,t.sizePointNormalState=e.visible?2*n.normal.r+n.normal["stroke-width"]:2,t},usePointsToDefineAutoHiding:function(){return!0}};e.chart=o({},x,{drawTrackers:function(){var t,e,n=this,i=n._segments||[],o=n._options.rotated;n.isVisible()&&(i.length&&(t=n._trackers=n._trackers||[],e=n._trackersGroup=(n._trackersGroup||n._renderer.g().attr({fill:"gray",opacity:.001,stroke:"gray",class:"dxc-trackers"})).attr({"clip-path":this._paneClipRectID||null}).append(n._group),a(i,(function(i,o){t[i]?n._updateTrackerElement(o,t[i]):t[i]=n._drawTrackerElement(o).data({"chart-data-series":n}).append(e)}))),n._trackersTranslator=n.groupPointsByCoords(o))},_checkAxisVisibleAreaCoord:function(t,e){var n=(t?this.getArgumentAxis():this.getValueAxis()).getVisibleArea();return d(e)&&n[0]<=e&&n[1]>=e},checkSeriesViewportCoord:function(t,e){return!0},getSeriesPairCoord:function(t,e){for(var n=null,i=!e&&!this._options.rotated||e&&this._options.rotated,o=i?"vy":"vx",r=i?"vx":"vy",a=this.getVisiblePoints(),s=0;s1?r.forEach((function(e,i){var l=r[i+1];l&&(e[o]<=t&&l[o]>=t||e[o]>=t&&l[o]<=t)&&s.push(n._getNearestPoints(e,l,a))})):s.push([r[0],r[0]]),s},getNeighborPoint:function(t,e){var n,i=this._options.rotated?e:t,o=i,r=this._trackersTranslator,s=null,l=this._options.rotated?t:e,u=this._options.rotated?"vx":"vy";if(this.isVisible()&&r){s=r[i];do{s=r[o]||r[i],i--,o++}while((i>=0||o=i&&(n=i,s=e)})))}return s},_applyVisibleArea:function(){var t=this._options.rotated,e=(t?this.getValueAxis():this.getArgumentAxis()).getVisibleArea(),n=(t?this.getArgumentAxis():this.getValueAxis()).getVisibleArea();this._visibleArea={minX:e[0],maxX:e[1],minY:n[0],maxY:n[1]}},getPointCenterByArg:function(t){var e=this.getPointsByArg(t)[0];return e?e.getCenterCoord():void 0}}),e.polar=o({},x,{drawTrackers:function(){e.chart.drawTrackers.call(this);var t,n=this._trackersTranslator;this.isVisible()&&(a(n,(function(e,n){if(n)return t=e,!1})),n[t+360]=n[t])},getNeighborPoint:function(t,n){var i=u.convertXYToPolar(this.getValueAxis().getCenter(),t,n);return e.chart.getNeighborPoint.call(this,i.phi,i.r)},_applyVisibleArea:function(){var t=this.getValueAxis().getCanvas();this._visibleArea={minX:t.left,maxX:t.width-t.right,minY:t.top,maxY:t.height-t.bottom}},getSeriesPairCoord:function(t,e){for(var n=null,i=e?"argument":"radius",o=this.getVisiblePoints(),r=0;r td"),h="".concat(".dx-treelist-rowsview .dx-row"," > td"),f={groupPanel:[".dx-datagrid-group-panel .dx-group-panel-item[tabindex]"],columnHeaders:[".dx-datagrid-headers .dx-header-row > td.dx-datagrid-action",".dx-treelist-headers .dx-header-row > td.dx-treelist-action"],filterRow:[".dx-datagrid-headers .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor-input",".dx-treelist-headers .dx-treelist-filter-row .dx-editor-cell .dx-texteditor-input"],rowsView:["".concat(".dx-row-focused"),"".concat(".dx-datagrid-rowsview .dx-row","[tabindex]"),"".concat(d,"[tabindex]"),"".concat(d),"".concat(".dx-treelist-rowsview .dx-row","[tabindex]"),"".concat(h,"[tabindex]"),"".concat(h)],footer:[".dx-datagrid-total-footer .dx-datagrid-summary-item",".dx-treelist-total-footer .dx-treelist-summary-item"],filterPanel:[".dx-datagrid-filter-panel .dx-icon-filter",".dx-treelist-filter-panel .dx-icon-filter"],pager:[".dx-datagrid-pager [tabindex]",".dx-treelist-pager [tabindex]"]},p=!1,m=!1,g=null;function _(e,n,i,r,l,u){if(!function(t,e,n){var i={event:e,handled:!1};n?n(i):t._createActionByOption("onKeyDown")(i);return i.handled}(n,i.originalEvent,u)){var c=a.normalizeKeyName(i);"enter"===c||"space"===c?(!function(t,e){var n=(0,o.default)(t),i=n.attr("aria-label"),r=v(i,e.element()).index(n);g=(0,s.extend)({},{ariaLabel:i,index:r},{viewInstance:e})}(i.target,n),r&&r({event:i})):"tab"===c?l.addClass("dx-state-focused"):t.exports.selectView(e,n,i)}}function v(t,e){var n=(0,o.default)(e);return t?n.find('[aria-label="'.concat(t,'"][tabindex]')):n.find("[tabindex]")}function y(t){for(var e in t){var n=t[e],i=(0,o.default)(n).first();if(i.length)return i}}function b(){m="visible"===l.default.getDocument().visibilityState}t.exports={subscribeVisibilityChange:function(){r.default.on(l.default.getDocument(),"visibilitychange",b)},unsubscribeVisibilityChange:function(){r.default.off(l.default.getDocument(),"visibilitychange",b)},hiddenFocus:function(t){m=!0,t.focus(),m=!1},registerKeyboardAction:function(t,e,n,i,a,s){if(!e.option("useLegacyKeyboardNavigation")){var l=(0,o.default)(e.element());r.default.on(n,"keydown",i,(function(n){return _(t,e,n,a,l,s)})),r.default.on(n,"mousedown",i,(function(){p=!0,l.removeClass("dx-state-focused")})),r.default.on(n,"focusin",i,(function(){!p&&!m&&l.addClass("dx-state-focused"),p=!1}))}},restoreFocus:function(t){if(!t.option("useLegacyKeyboardNavigation")&&g){var e=g.viewInstance;if(e){var n=v(g.ariaLabel,e.element()).eq(g.index);g=null,r.default.trigger(n,"focus")}}},selectView:function(t,e,n){var i=a.normalizeKeyName(n);if(n.ctrlKey&&("upArrow"===i||"downArrow"===i))for(var o=Object.keys(f),s=o.indexOf(t);s>=0&&sn;){var i=e[n];if(!1===t(i))break;e[n]===i&&n++}},_applyToEmitters:function(t,e){this._eachEmitter((function(n){n[t].call(n,e)}))},reset:function(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter:function(t){this._proxiedCancelHandler(t)},_pointerDownHandler:function(t){f.isMouseEvent(t)&&t.which>1||this._updateEmitters(t)},_updateEmitters:function(t){this._isSetChanged(t)&&(this._cleanEmitters(t),this._fetchEmitters(t))},_isSetChanged:function(t){var e=this._closestEmitter(t),n=this._emittersSet||[],i=e.length!==n.length;return d(e,(function(t,e){return!(i=i||n[t]!==e)})),this._emittersSet=e,i},_closestEmitter:function(t){var e=this,n=[],o=i(t.target);function r(i,o){o&&o.validatePointers(t)&&o.validate(t)&&(o.addCancelCallback(e._proxiedCancelHandler),o.addAcceptCallback(e._proxiedAcceptHandler),n.push(o))}for(;o.length;){var a=s.data(o.get(0),"dxEmitter")||[];d(a,r),o=o.parent()}return n},_acceptHandler:function(t,e){var n=this;this._eachEmitter((function(i){i!==t&&n._cancelEmitter(i,e)}))},_cancelHandler:function(t,e){this._cancelEmitter(t,e)},_cancelEmitter:function(t,e){var n=this._activeEmitters;e?t.cancel(e):t.reset(),t.removeCancelCallback(),t.removeAcceptCallback();var i=c(t,n);i>-1&&n.splice(i,1)},_cleanEmitters:function(t){this._applyToEmitters("end",t),this.reset(t)},_fetchEmitters:function(t){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",t)},_pointerMoveHandler:function(t){this._applyToEmitters("move",t)},_pointerUpHandler:function(t){this._updateEmitters(t)},_mouseWheelHandler:function(t){this._allowInterruptionByMouseWheel()&&(t.pointers=[null],this._pointerDownHandler(t),this._adjustWheelEvent(t),this._pointerMoveHandler(t),t.pointers=[],this._pointerUpHandler(t))},_allowInterruptionByMouseWheel:function(){var t=!0;return this._eachEmitter((function(e){return t=e.allowInterruptionByMouseWheel()&&t})),t},_adjustWheelEvent:function(t){var e=null;if(this._eachEmitter((function(n){if(n.gesture){var i=n.getDirection(t);return"horizontal"!==i&&!t.shiftKey||"vertical"!==i&&t.shiftKey?(e=n,!1):void 0}})),e){var n=e.getDirection(t),i="both"===n&&!t.shiftKey||"vertical"===n;t[i?"pageY":"pageX"]+=t.delta}},isActive:function(t){var e=!1;return this._eachEmitter((function(n){e=e||n.getElement().is(t)})),e}}));t.exports=function(t){var e=t.emitter,n=t.events[0],i=t.events;d(i,(function(o,r){h(r,{noBubble:!t.bubble,setup:function(t){var i=s.data(t,"dxEmitterSubscription")||{},o=s.data(t,"dxEmitter")||{},a=o[n]||new e(t);i[r]=!0,o[n]=a,s.data(t,"dxEmitter",o),s.data(t,"dxEmitterSubscription",i)},add:function(t,e){s.data(t,"dxEmitter")[n].configure(u({delegateSelector:e.selector},e.data),e.type)},teardown:function(t){var e=s.data(t,"dxEmitterSubscription"),o=s.data(t,"dxEmitter"),a=o[n];delete e[r];var l=!0;d(i,(function(t,n){return l=l&&!e[n]})),l&&(g.isActive(t)&&g.resetEmitter(a),a&&a.dispose(),delete o[n])}})}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FunctionTemplate=void 0;var i=n(156),o=n(17);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n1&&(t=t.select((function(t){return o({},t,{items:l(a(t.items),e.slice(1)).toArray()})}))),t}function u(t,e){var n=[];return r(t,(function(t,o){i(e,(function(t){return o.selector===t.selector})).length<1&&n.push(o)})),n.concat(e)}t.exports={multiLevelGroup:l,arrangeSortingInfo:u,queryByOptions:function(t,e,n){var i=(e=e||{}).filter;if(i&&(t=t.filter(i)),n)return t;var o=e.sort,a=e.select,c=e.group,d=e.skip,h=e.take;return c&&((c=s(c)).keepInitialKeyOrder=!!e.group.keepInitialKeyOrder),(o||c)&&(o=s(o||[]),c&&!c.keepInitialKeyOrder&&(o=u(c,o)),r(o,(function(e){t=t[e?"thenBy":"sortBy"](this.selector,this.desc,this.compare)}))),a&&(t=t.select(a)),c&&(t=l(t,c)),(h||d)&&(t=t.slice(d||0,h)),t}}},function(t,e,n){"use strict";var i=n(7).Deferred,o=n(15),r=n(636),a=n(10),s=a.getWindow(),l=n(0).extendFromObject,u=n(2).isDefined,c=n(93),d=n(89),h=function(t){var e=o.createElement("script");for(var n in t)e[n]=t[n];return e},f=function(t){t.parentNode.removeChild(t)},p=function(t){return o.getHead().appendChild(t)},m=function(t){var e=h({text:t});p(e),f(e)},g=function(t,e){var n=t.data,i="string"===typeof n,o=t.url||s.location.href;return i||t.cache||((n=n||{})._=Date.now()),n&&!t.upload&&(i||(n=function(t){var e=[];for(var n in t){var i=t[n];void 0!==i&&(null===i&&(i=""),e.push(encodeURIComponent(n)+"="+encodeURIComponent(i)))}return e.join("&")}(n)),"GET"===_(t)?(""!==n&&(o+=(o.indexOf("?")>-1?"&":"?")+n),n=null):e["Content-Type"]&&e["Content-Type"].indexOf("application/x-www-form-urlencoded")>-1&&(n=n.replace(/%20/g,"+"))),{url:o,parameters:n}};function _(t){return(t.method||"GET").toUpperCase()}var v=function(t){var e=t.headers||{};return e["Content-Type"]=e["Content-Type"]||function(t){var e;return t.data&&!t.upload&&"GET"!==_(t)&&(e="application/x-www-form-urlencoded;charset=utf-8"),t.contentType||e}(t),e.Accept=e.Accept||function(t){var e=t.dataType||"*",n="text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",i={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",jsonp:n,script:n};return l(i,t.accepts,!0),i[e]?i[e]+("*"!==e?", */*; q=0.01":""):i["*"]}(t),t.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e};t.exports=d({sendRequest:function(t){var e,n=r.getXhr(),l=new i,d=l.promise(),y=!u(t.async)||t.async,b=t.dataType,w=t.timeout||0;t.crossDomain=function(t){if(!a.hasWindow())return!0;var e=!1,n=o.createElement("a"),i=o.createElement("a");n.href=s.location.href;try{i.href=t,i.href=i.href,e=n.protocol+"//"+n.host!==i.protocol+"//"+i.host}catch(r){e=!0}return e}(t.url);var x="jsonp"===b||"script"===b;void 0===t.cache&&(t.cache=!x);var C=function(t){if("jsonp"===t.dataType){var e=Math.random().toString().replace(/\D/g,""),n=t.jsonpCallback||"dxCallback"+Date.now()+"_"+e,i=t.jsonp||"callback";return t.data=t.data||{},t.data[i]=n,n}}(t),S=v(t),k=g(t,S),I=k.url,T=k.parameters;if(C&&(s[C]=function(t){l.resolve(t,"success",n)}),t.crossDomain&&x){return function(t){var e=h({src:t});return new c((function(t,n){var i={load:t,error:n},r=function(t){i[t.type](),f(e)};for(var a in i)o.listen(e,a,r);p(e)}))}(I).then((function(){"jsonp"!==b&&l.resolve(null,"success",n)}),(function(){l.reject(n,"error")})),d}if(t.crossDomain&&!("withCredentials"in n))return l.reject(n,"error"),d;if(n.open(_(t),I,y,t.username,t.password),y&&(n.timeout=w,e=function(t,e){return t&&setTimeout((function(){e.customStatus="timeout",e.abort()}),t)}(w,n)),n.onreadystatechange=function(t){var i;4===n.readyState&&(clearTimeout(e),200<=(i=n.status)&&i<300?function(t){return 204!==t}(n.status)?function(e,n,i){var o=function(t){return t.responseType&&"text"!==t.responseType||"string"!==typeof t.responseText?t.response:t.responseText}(n);switch(i){case"jsonp":m(o);break;case"script":m(o),e.resolve(o,"success",n);break;case"json":try{e.resolve(JSON.parse(o),"success",n)}catch(t){e.reject(n,"parsererror",t)}break;default:e.resolve(o,"success",n)}}(l,n,b):l.resolve(null,"nocontent",n):l.reject(n,n.customStatus||"error"))},t.upload&&(n.upload.onprogress=t.upload.onprogress,n.upload.onloadstart=t.upload.onloadstart,n.upload.onabort=t.upload.onabort),t.xhrFields)for(var E in t.xhrFields)n[E]=t.xhrFields[E];for(var O in"arraybuffer"===t.responseType&&(n.responseType=t.responseType),S)Object.prototype.hasOwnProperty.call(S,O)&&u(S[O])&&n.setRequestHeader(O,S[O]);return t.beforeSend&&t.beforeSend(n),n.send(T),d.abort=function(){n.abort()},d}})},function(t,e,n){"use strict";var i=n(11),o=n(186),r=n(131),a=Math.abs;r({emitter:o.inherit({start:function(t){this._startEventData=i.eventData(t),this._startTimer(t)},_startTimer:function(t){var e="timeout"in this?this.timeout:750;this._holdTimer=setTimeout(function(){this._requestAccept(t),this._fireEvent("dxhold",t,{target:t.target}),this._forgetAccept()}.bind(this),e)},move:function(t){this._touchWasMoved(t)&&this._cancel(t)},_touchWasMoved:function(t){var e=i.eventDelta(this._startEventData,i.eventData(t));return a(e.x)>5||a(e.y)>5},end:function(){this._stopTimer()},_stopTimer:function(){clearTimeout(this._holdTimer)},cancel:function(){this._stopTimer()},dispose:function(){this._stopTimer()}}),bubble:!0,events:["dxhold"]}),t.exports={name:"dxhold"}},function(t,e,n){"use strict";var i=m(n(21)),o=n(0),r=n(16),a=n(5),s=n(153),l=m(n(38)),u=n(4),c=m(n(2)),d=m(n(74)),h=m(n(12)),f=m(n(93)),p=n(7);function m(t){return t&&t.__esModule?t:{default:t}}function g(t){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=w(t);if(e){var o=w(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function x(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){for(var n=0;n=r&&o<=a:o>=r;if(c.default.isDefined(a))return o<=a;throw l.default.Error("E0101")}}]),n}(E),D=function(t){_(n,t);var e=y(n);function n(){var t;return x(this,n),(t=e.call(this)).NAME="stringLength",t}return S(n,[{key:"_validate",value:function(t,e){return t=c.default.isDefined(t)?String(t):"",!e.trim&&c.default.isDefined(e.trim)||(t=t.trim()),!(!e.ignoreEmptyValue||!this._isValueEmpty(t))||F.range.validate(t.length,(0,o.extend)({},e))}}]),n}(E),A=function(t){_(n,t);var e=y(n);function n(){var t;return x(this,n),(t=e.call(this)).NAME="custom",t}return S(n,[{key:"validate",value:function(t,e){if(e.ignoreEmptyValue&&this._isValueEmpty(t))return!0;var n=e.validator,i=n&&c.default.isFunction(n.option)&&n.option("dataGetter"),r=c.default.isFunction(i)&&i(),a={value:t,validator:n,rule:e};return r&&(0,o.extend)(a,r),e.validationCallback(a)}}]),n}(E),R=function(t){_(n,t);var e=y(n);function n(){var t;return x(this,n),(t=e.call(this)).NAME="async",t}return S(n,[{key:"validate",value:function(t,e){if(c.default.isDefined(e.reevaluate)||(0,o.extend)(e,{reevaluate:!0}),e.ignoreEmptyValue&&this._isValueEmpty(t))return!0;var n=e.validator,i=n&&c.default.isFunction(n.option)&&n.option("dataGetter"),r=c.default.isFunction(i)&&i(),a={value:t,validator:n,rule:e};r&&(0,o.extend)(a,r);var s=e.validationCallback(a);if(!c.default.isPromise(s))throw l.default.Error("E0103");return this._getWrappedPromise((0,p.fromPromise)(s).promise())}},{key:"_getWrappedPromise",value:function(t){var e=new p.Deferred;return t.then((function(t){e.resolve(t)}),(function(t){var n={isValid:!1};c.default.isDefined(t)&&(c.default.isString(t)?n.message=t:c.default.isObject(t)&&c.default.isDefined(t.message)&&c.default.isString(t.message)&&(n.message=t.message)),e.resolve(n)})),e.promise()}}]),n}(A),B=function(t){_(n,t);var e=y(n);function n(){var t;return x(this,n),(t=e.call(this)).NAME="compare",t}return S(n,[{key:"_validate",value:function(t,e){if(!e.comparisonTarget)throw l.default.Error("E0102");if(e.ignoreEmptyValue&&this._isValueEmpty(t))return!0;(0,o.extend)(e,{reevaluate:!0});var n=e.comparisonTarget();switch(e.comparisonType||"=="){case"==":return t==n;case"!=":return t!=n;case"===":return t===n;case"!==":return t!==n;case">":return t>n;case">=":return t>=n;case"<":return t=0&&this._pendingValidators.splice(e,1)},_orderBrokenRules:function(t){var e=[];return(0,a.each)(this.validators,(function(n,i){var o=(0,u.grep)(t,(function(t){return t.validator===i}));o.length&&(e=e.concat(o))})),e},_updateBrokenRules:function(t){if(this._validationInfo.result){var e=this._validationInfo.result.brokenRules,n=(0,u.grep)(e,(function(e){return e.validator!==t.validator}));t.brokenRules&&(e=n.concat(t.brokenRules)),this._validationInfo.result.brokenRules=this._orderBrokenRules(e)}},_onValidatorStatusChanged:function(t){t.status!==T?this._resolveIfComplete(t):this._addPendingValidator(t.validator)},_resolveIfComplete:function(t){if(this._removePendingValidator(t.validator),this._updateBrokenRules(t),!this._pendingValidators.length){if(this._unsubscribeFromAllChangeEvents(),!this._validationInfo.result)return;this._validationInfo.result.status=0===this._validationInfo.result.brokenRules.length?k:I,this._validationInfo.result.isValid=this._validationInfo.result.status===k;var e=(0,o.extend)({},this._validationInfo.result,{complete:null}),n=this._validationInfo.deferred;this._resetValidationInfo(),this._raiseValidatedEvent(e),n&&setTimeout((function(){n.resolve(e)}))}},_raiseValidatedEvent:function(t){this._eventsStrategy.fireEvent("validated",[t])},_resetValidationInfo:function(){this._validationInfo={result:null,deferred:null}},_synchronizeValidationInfo:function(){this._validationInfo.result&&(this._validationInfo.result.validators=this.validators)},removeRegisteredValidator:function(t){var e=(0,r.inArray)(t,this.validators);e>-1&&(this.validators.splice(e,1),this._synchronizeValidationInfo(),this._resolveIfComplete({validator:t}))},registerValidator:function(t){(0,r.inArray)(t,this.validators)<0&&(this.validators.push(t),this._synchronizeValidationInfo())},reset:function(){(0,a.each)(this.validators,(function(t,e){e.reset()})),this._pendingValidators=[],this._resetValidationInfo()},on:function(t,e){return this._eventsStrategy.on(t,e),this},off:function(t,e){return this._eventsStrategy.off(t,e),this}}),z={groups:[],getGroupConfig:function(t){var e=(0,u.grep)(this.groups,(function(e){return e.group===t}));if(e.length)return e[0]},findGroup:function(t,e){var n=t.parents(".dx-validationgroup").first();return n.length?n.dxValidationGroup("instance"):e},initGroups:function(){this.groups=[],this.addGroup()},addGroup:function(t){var e=this.getGroupConfig(t);return e||(e=new V(t),this.groups.push(e)),e},removeGroup:function(t){var e=this.getGroupConfig(t),n=(0,r.inArray)(e,this.groups);return n>-1&&this.groups.splice(n,1),e},_setDefaultMessage:function(t){var e=t.rule,n=t.validator,i=t.name;c.default.isDefined(e.message)||(n.defaultFormattedMessage&&c.default.isDefined(i)?e.message=n.defaultFormattedMessage(i):e.message=n.defaultMessage())},_addBrokenRule:function(t){var e=t.result,n=t.rule;e.brokenRule||(e.brokenRule=n),e.brokenRules||(e.brokenRules=[]),e.brokenRules.push(n)},validate:function(t,e,n){var i=this,o={name:n,value:t,brokenRule:null,brokenRules:null,isValid:!0,validationRules:e,pendingRules:null,status:k,complete:null},r=[];return(0,a.each)(e||[],(function(e,a){var s,u=F[a.type];if(!u)throw l.default.Error("E0100");return c.default.isDefined(a.isValid)&&a.value===t&&!a.reevaluate?!!a.isValid||(o.isValid=!1,i._addBrokenRule({result:o,rule:a}),!1):(a.value=t,"async"===a.type?(r.push({rule:a,ruleValidator:u}),!0):(s=u.validate(t,a),a.isValid=s,s||(o.isValid=!1,i._setDefaultMessage({rule:a,validator:u,name:n}),i._addBrokenRule({result:o,rule:a})),!!a.isValid&&void 0))})),o.isValid&&!o.brokenRules&&r.length&&(o=this._validateAsyncRules({value:t,items:r,result:o,name:n})),o.status=o.pendingRules?T:o.isValid?k:I,o},_validateAsyncRules:function(t){var e=this,n=t.result,i=t.value,o=t.items,r=t.name,s=[];return(0,a.each)(o,(function(t,o){var a=o.ruleValidator.validate(i,o.rule);if(c.default.isPromise(a)){n.pendingRules||(n.pendingRules=[]),n.pendingRules.push(o.rule);var l=a.then((function(t){var n=e._getPatchedRuleResult(t);return e._updateRuleConfig({rule:o.rule,ruleResult:n,validator:o.ruleValidator,name:r}),n}));s.push(l)}else e._updateRuleConfig({rule:o.rule,ruleResult:e._getPatchedRuleResult(a),validator:o.ruleValidator,name:r})})),s.length&&(n.complete=f.default.all(s).then((function(t){return e._getAsyncRulesResult({result:n,values:t})}))),n},_updateRuleConfig:function(t){var e=t.rule,n=t.ruleResult,i=t.validator,o=t.name;e.isValid=n.isValid,n.isValid||(c.default.isDefined(n.message)&&c.default.isString(n.message)&&n.message.length?e.message=n.message:this._setDefaultMessage({rule:e,validator:i,name:o}))},_getPatchedRuleResult:function(t){var e;return c.default.isObject(t)?(e=(0,o.extend)({},t),c.default.isDefined(e.isValid)||(e.isValid=!0)):e={isValid:!c.default.isBoolean(t)||t},e},_getAsyncRulesResult:function(t){var e=this,n=t.values,i=t.result;return(0,a.each)(n,(function(t,n){if(!1===n.isValid){i.isValid=n.isValid;var o=i.pendingRules[t];e._addBrokenRule({result:i,rule:o})}})),i.pendingRules=null,i.complete=null,i.status=i.isValid?k:I,i},registerValidatorInGroup:function(t,e){var n=z.addGroup(t);n.registerValidator.call(n,e)},_shouldRemoveGroup:function(t,e){var n=void 0===t,i=t&&"dxValidationGroup"===t.NAME;return!n&&!i&&!e.length},removeRegisteredValidator:function(t,e){var n=z.getGroupConfig(t);if(n){n.removeRegisteredValidator.call(n,e);var i=n.validators;this._shouldRemoveGroup(t,i)&&this.removeGroup(t)}},initValidationOptions:function(t){var e=this,n={};if(t){["isValid","validationStatus","validationError","validationErrors"].forEach((function(i){i in t&&(0,o.extend)(n,e.synchronizeValidationOptions({name:i,value:t[i]},t))}))}return n},synchronizeValidationOptions:function(t,e){var n=t.name,i=t.value;switch(n){case"validationStatus":var o=i===k||i===T;return e.isValid!==o?{isValid:o}:{};case"isValid":var r=e.validationStatus,a=r;return i&&r===I?a=k:i||r===I||(a=I),a!==r?{validationStatus:a}:{};case"validationErrors":var s=i&&i.length?i[0]:null;return e.validationError!==s?{validationError:s}:{};case"validationError":var l=e.validationErrors;if(!i&&l)return{validationErrors:null};if(i&&!l)return{validationErrors:[i]};if(i&&l&&i!==l[0])return l[0]=i,{validationErrors:l.slice()}}return{}},validateGroup:function(t){var e=z.getGroupConfig(t);if(!e)throw l.default.Error("E0110");return e.validate()},resetGroup:function(t){var e=z.getGroupConfig(t);if(!e)throw l.default.Error("E0110");return e.reset()}};z.initGroups(),t.exports=z,t.exports.default=t.exports},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(3),r=n(10),a=r.getWindow(),s=n(17).getPublicElement,l=n(15),u=n(6),c=n(8),d=n(4),h=n(0).extend,f=n(33),p=n(90),m=n(2),g=n(37),_=n(11),v=n(48),y=n(24).getBoundingRect,b={left:"right",top:"bottom",right:"left",bottom:"top",center:"center"},w={left:-1,top:-1,center:0,right:1,bottom:1},x={top:{my:"bottom center",at:"top center",collision:"fit flip"},bottom:{my:"top center",at:"bottom center",collision:"fit flip"},right:{my:"left center",at:"right center",collision:"flip fit"},left:{my:"right center",at:"left center",collision:"flip fit"}},C={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},S=function(t){return m.isObject(t)?t.name:t},k=function(t,e){var n=t.option(e);return S(n)},I=function(t,e){var n=t.option("target"),i=m.isString(n),r=k(t,e+"Event");if(r&&!t.option("disabled")){var a=_.addNamespace(r,t.NAME),c=t._createAction(function(){var n=function(t,e){var n=t.option(e);return m.isObject(n)&&n.delay}(t,e+"Event");this._clearEventsTimeouts(),n?this._timeouts[e]=setTimeout((function(){t[e]()}),n):t[e]()}.bind(t),{validatingTargetName:"target"}),d=function(t){c({event:t,target:o(t.currentTarget)})},h="_"+e+"EventHandler";if(i)t[h]=d,u.on(l.getDocument(),a,n,d);else{var f=s(o(n));t[h]=void 0,u.on(f,a,d)}}},T=function(t,e,n,i){var r=i||k(t,n+"Event");if(r){r=_.addNamespace(r,t.NAME);var a="_"+n+"EventHandler";t[a]?u.off(l.getDocument(),r,e,t[a]):u.off(s(o(e)),r)}},E=v.inherit({_getDefaultOptions:function(){return h(this.callBase(),{target:a,shading:!1,position:"bottom",closeOnOutsideClick:!0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",to:0}},showTitle:!1,width:"auto",height:"auto",dragEnabled:!1,resizeEnabled:!1,fullScreen:!1,closeOnTargetScroll:!0,arrowPosition:"",arrowOffset:0,boundaryOffset:{h:10,v:10}})},_defaultOptionsRules:function(){return[{device:{platform:"ios"},options:{arrowPosition:{boundaryOffset:{h:20,v:-10},collision:"fit"}}},{device:function(){return!r.hasWindow()},options:{animation:null}}]},_init:function(){this.callBase(),this._renderArrow(),this._timeouts={},this.$element().addClass("dx-popover"),this._wrapper().addClass("dx-popover-wrapper")},_render:function(){this.callBase.apply(this,arguments),this._detachEvents(this.option("target")),this._attachEvents()},_detachEvents:function(t){T(this,t,"show"),T(this,t,"hide")},_attachEvents:function(){I(this,"show"),I(this,"hide")},_renderArrow:function(){this._$arrow=o("
").addClass("dx-popover-arrow").prependTo(this.overlayContent())},_documentDownHandler:function(t){return!this._isOutsideClick(t)||this.callBase(t)},_isOutsideClick:function(t){return!o(t.target).closest(this.option("target")).length},_animate:function(t){t&&t.to&&"object"===i(t.to)&&h(t.to,{position:this._getContainerPosition()}),this.callBase.apply(this,arguments)},_stopAnimation:function(){this.callBase.apply(this,arguments)},_renderTitle:function(){this._wrapper().toggleClass("dx-popover-without-title",!this.option("showTitle")),this.callBase()},_renderPosition:function(){this.callBase(),this._renderOverlayPosition()},_renderOverlayBoundaryOffset:d.noop,_renderOverlayPosition:function(){this._resetOverlayPosition(),this._updateContentSize();var t=this._getContainerPosition(),e=p.setup(this._$content,t),n=this._getSideByLocation(e);this._togglePositionClass("dx-position-"+n),this._toggleFlippedClass(e.h.flip,e.v.flip),(this._isHorizontalSide()||this._isVerticalSide())&&this._renderArrowPosition(n)},_resetOverlayPosition:function(){this._setContentHeight(!0),this._togglePositionClass("dx-position-"+this._positionSide),f.move(this._$content,{left:0,top:0}),this._$arrow.css({top:"auto",right:"auto",bottom:"auto",left:"auto"})},_updateContentSize:function(){if(this._$popupContent){var t=p.calculate(this._$content,this._getContainerPosition());if(t.h.oversize>0&&this._isHorizontalSide()&&!t.h.fit){var e=this._$content.width()-t.h.oversize;this._$content.width(e)}if(t.v.oversize>0&&this._isVerticalSide()&&!t.v.fit){var n=this._$content.height()-t.v.oversize,i=this._$popupContent.height()-t.v.oversize;this._$content.height(n),this._$popupContent.height(i)}}},_getContainerPosition:function(){var t=d.pairToObject(this._position.offset||""),e=t.h,n=t.v,i=this._isVerticalSide(),o=this._isHorizontalSide();if(i||o){var r=(this._isPopoverInside()?-1:1)*w[this._positionSide]*((i?this._$arrow.height():this._$arrow.width())-this._getContentBorderWidth(this._positionSide));i?n+=r:e+=r}return h({},this._position,{offset:e+" "+n})},_getContentBorderWidth:function(t){var e=this._$content.css(C[t]);return parseInt(e)||0},_getSideByLocation:function(t){var e=t.v.flip,n=t.h.flip;return this._isVerticalSide()&&e||this._isHorizontalSide()&&n||this._isPopoverInside()?b[this._positionSide]:this._positionSide},_togglePositionClass:function(t){this._$wrapper.removeClass("dx-position-left dx-position-right dx-position-top dx-position-bottom").addClass(t)},_toggleFlippedClass:function(t,e){this._$wrapper.toggleClass("dx-popover-flipped-horizontal",t).toggleClass("dx-popover-flipped-vertical",e)},_renderArrowPosition:function(t){var e=y(this._$arrow.get(0)),n=-(this._isVerticalSide(t)?e.height:e.width);this._$arrow.css(b[t],n);var i,r=this._isVerticalSide(t)?"left":"top",a=this._isVerticalSide(t)?"width":"height",s=o(this._position.of),l=p.offset(s)||{top:0,left:0},u=p.offset(this._$content),c=e[a],d=u[r],h=y(this._$content.get(0))[a],f=l[r],m=s.get(0).preventDefault?0:y(s.get(0))[a],_=Math.max(d,f),v=Math.min(d+h,f+m);i="start"===this.option("arrowPosition")?_-d:"end"===this.option("arrowPosition")?v-d-c:(_+v)/2-d-c/2;var w=this._getContentBorderWidth(t),x=g.fitIntoRange(i-w+this.option("arrowOffset"),w,h-c-2*w);this._$arrow.css(r,x)},_isPopoverInside:function(){var t=this._transformStringPosition(this.option("position"),x),e=p.setup.normalizeAlign(t.my),n=p.setup.normalizeAlign(t.at);return e.h===n.h&&e.v===n.v},_setContentHeight:function(t){t&&this.callBase()},_renderWrapperPosition:function(){this.option("shading")&&this._$wrapper.css({top:0,left:0})},_renderWrapperDimensions:function(){this.option("shading")&&this._$wrapper.css({width:"100%",height:"100%"})},_normalizePosition:function(){var t=h({},this._transformStringPosition(this.option("position"),x));t.of||(t.of=this.option("target")),t.collision||(t.collision="flip"),t.boundaryOffset||(t.boundaryOffset=this.option("boundaryOffset")),this._positionSide=this._getDisplaySide(t),this._position=t},_getDisplaySide:function(t){var e=p.setup.normalizeAlign(t.my),n=p.setup.normalizeAlign(t.at),i=w[e.h]===w[n.h]&&w[e.v]===w[n.v]?-1:1;return Math.abs(w[e.h]-i*w[n.h])>Math.abs(w[e.v]-i*w[n.v])?n.h:n.v},_isVerticalSide:function(t){return"top"===(t=t||this._positionSide)||"bottom"===t},_isHorizontalSide:function(t){return"left"===(t=t||this._positionSide)||"right"===t},_clearEventTimeout:function(t){clearTimeout(this._timeouts[t])},_clearEventsTimeouts:function(){this._clearEventTimeout("show"),this._clearEventTimeout("hide")},_clean:function(){this._detachEvents(this.option("target")),this.callBase.apply(this,arguments)},_optionChanged:function(t){switch(t.name){case"boundaryOffset":case"arrowPosition":case"arrowOffset":this._renderGeometry();break;case"fullScreen":t.value&&this.option("fullScreen",!1);break;case"target":t.previousValue&&this._detachEvents(t.previousValue),this.callBase(t);break;case"showEvent":case"hideEvent":var e=t.name.substring(0,4),n=S(t.previousValue);this.hide(),T(this,this.option("target"),e,n),I(this,e);break;case"visible":this._clearEventTimeout(t.value?"show":"hide"),this.callBase(t);break;default:this.callBase(t)}},show:function(t){return t&&this.option("target",t),this.callBase()}});c("dxPopover",E),t.exports=E,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(18),a=n(0).extend,s=n(79),l=n(62),u=n(8),c=n(11),d=n(25),h=l.inherit({_supportedKeys:function(){return a(this.callBase(),{space:function(t){t.preventDefault(),this._clickAction({event:t})}})},_getDefaultOptions:function(){return a(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,value:!1,text:"",useInkRipple:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return"desktop"===r.real().deviceType&&!r.isSimulator()},options:{focusStateEnabled:!0}}])},_canValueBeChangedByClick:function(){return!0},_feedbackHideTimeout:100,_initMarkup:function(){this._renderSubmitElement(),this._$container=i("
").addClass("dx-checkbox-container"),this.setAria("role","checkbox"),this.$element().addClass("dx-checkbox"),this._renderValue(),this._renderIcon(),this._renderText(),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().append(this._$container),this.callBase()},_render:function(){this._renderClick(),this.callBase()},_renderSubmitElement:function(){this._$submitElement=i("").attr("type","hidden").appendTo(this.$element())},_getSubmitElement:function(){return this._$submitElement},_renderInkRipple:function(){this._inkRipple=s.render({waveSizeCoefficient:2.5,useHoldAnimation:!1,wavesNumber:2,isCentered:!0})},_renderInkWave:function(t,e,n,i){if(this._inkRipple){var o={element:t,event:e,wave:i};n?this._inkRipple.showWave(o):this._inkRipple.hideWave(o)}},_updateFocusState:function(t,e){this.callBase.apply(this,arguments),this._renderInkWave(this._$icon,t,e,0)},_toggleActiveState:function(t,e,n){this.callBase.apply(this,arguments),this._renderInkWave(this._$icon,n,e,1)},_renderIcon:function(){this._$icon=i("").addClass("dx-checkbox-icon").prependTo(this._$container)},_renderText:function(){var t=this.option("text");t?(this._$text||(this._$text=i("").addClass("dx-checkbox-text")),this._$text.text(t),this._$container.append(this._$text),this.$element().addClass("dx-checkbox-has-text")):this._$text&&(this._$text.remove(),this.$element().removeClass("dx-checkbox-has-text"))},_renderClick:function(){var t=this,e=c.addNamespace(d.name,t.NAME);t._clickAction=t._createAction(t._clickHandler),o.off(t.$element(),e),o.on(t.$element(),e,(function(e){t._clickAction({event:e})}))},_clickHandler:function(t){var e=t.component;e._saveValueChangeEvent(t.event),e.option("value",!e.option("value"))},_renderValue:function(){var t=this.$element(),e=this.option("value"),n=void 0===e;t.toggleClass("dx-checkbox-checked",Boolean(e)),t.toggleClass("dx-checkbox-indeterminate",n),this._getSubmitElement().val(e),this.setAria("checked",n?"mixed":e||"false")},_optionChanged:function(t){switch(t.name){case"useInkRipple":this._invalidate();break;case"value":this._renderValue(),this.callBase(t);break;case"text":this._renderText(),this._renderDimensions();break;default:this.callBase(t)}},_clean:function(){delete this._inkRipple,this.callBase()}});u("dxCheckBox",h),t.exports=h,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(13).patchFontOptions;function o(t){var e=t.renderer;this._group=e.g().attr({class:"dx-loading-indicator"}).linkOn(e.root,{name:"loading-indicator",after:"peripheral"}),this._rect=e.rect().attr({opacity:0}).append(this._group),this._text=e.text().attr({align:"center"}).append(this._group),this._createStates(t.eventTrigger,this._group,e.root,t.notify)}o.prototype={constructor:o,_createStates:function(t,e,n,i){this._states=[{opacity:0,start:function(){i(!1)},complete:function(){e.linkRemove(),n.css({"pointer-events":""}),t("loadingIndicatorReady")}},{opacity:.85,start:function(){e.linkAppend(),n.css({"pointer-events":"none"}),i(!0)},complete:function(){t("loadingIndicatorReady")}}],this._state=0},setSize:function(t){var e=t.width,n=t.height;this._rect.attr({width:e,height:n}),this._text.attr({x:e/2,y:n/2})},setOptions:function(t){this._rect.attr({fill:t.backgroundColor}),this._text.css(i(t.font)).attr({text:t.text,class:t.cssClass}),this[t.show?"show":"hide"]()},dispose:function(){this._group.linkRemove().linkOff(),this._group=this._rect=this._text=this._states=null},_transit:function(t){var e;this._state!==t&&(this._state=t,this._isHiding=!1,e=this._states[t],this._rect.stopAnimation().animate({opacity:e.opacity},{complete:e.complete,easing:"linear",duration:400,unstoppable:!0}),this._noHiding=!0,e.start(),this._noHiding=!1)},show:function(){this._transit(1)},hide:function(){this._transit(0)},scheduleHiding:function(){this._noHiding||(this._isHiding=!0)},fulfillHiding:function(){this._isHiding&&this.hide()}},e.LoadingIndicator=o,e.plugin={name:"loading_indicator",init:function(){var t=this;t._loadingIndicator=new e.LoadingIndicator({eventTrigger:t._eventTrigger,renderer:t._renderer,notify:function(e){t._skipLoadingIndicatorOptions=!0,t.option("loadingIndicator",{show:e}),t._skipLoadingIndicatorOptions=!1,e&&t._stopCurrentHandling()}}),t._scheduleLoadingIndicatorHiding()},dispose:function(){this._loadingIndicator.dispose(),this._loadingIndicator=null},members:{_scheduleLoadingIndicatorHiding:function(){this._loadingIndicator.scheduleHiding()},_fulfillLoadingIndicatorHiding:function(){this._loadingIndicator.fulfillHiding()},showLoadingIndicator:function(){this._loadingIndicator.show()},hideLoadingIndicator:function(){this._loadingIndicator.hide()},_onBeginUpdate:function(){this._optionChangedLocker||this._scheduleLoadingIndicatorHiding()}},extenders:{_dataSourceLoadingChangedHandler:function(t){t&&(this._options.silent("loadingIndicator")||{}).enabled&&this._loadingIndicator.show()},_setContentSize:function(){this._loadingIndicator.setSize(this._canvas)},endUpdate:function(){this._initialized&&this._dataIsReady()&&this._fulfillLoadingIndicatorHiding()}},customize:function(t){var e=t.prototype;if(e._dataSourceChangedHandler){var n=e._dataSourceChangedHandler;e._dataSourceChangedHandler=function(){this._scheduleLoadingIndicatorHiding(),n.apply(this,arguments)}}t.addChange({code:"LOADING_INDICATOR",handler:function(){this._skipLoadingIndicatorOptions||this._loadingIndicator.setOptions(this._getOption("loadingIndicator")),this._scheduleLoadingIndicatorHiding()},isThemeDependent:!0,option:"loadingIndicator",isOptionChange:!0}),e._eventsMap.onLoadingIndicatorReady={name:"loadingIndicatorReady"};var i=e._drawn;e._drawn=function(){i.apply(this,arguments),this._dataIsReady()&&this._fulfillLoadingIndicatorHiding()}},fontFields:["loadingIndicator.font"]}},function(t,e,n){"use strict";t.exports={events:{mouseover:"mouseover",mouseout:"mouseout",mousemove:"mousemove",touchstart:"touchstart",touchmove:"touchmove",touchend:"touchend",mousedown:"mousedown",mouseup:"mouseup",click:"click",selectSeries:"selectseries",deselectSeries:"deselectseries",selectPoint:"selectpoint",deselectPoint:"deselectpoint",showPointTooltip:"showpointtooltip",hidePointTooltip:"hidepointtooltip"},states:{hover:"hover",normal:"normal",selection:"selection",normalMark:0,hoverMark:1,selectedMark:2,applyHover:"applyHover",applySelected:"applySelected",resetItem:"resetItem"},radialLabelIndent:30,pieLabelSpacing:10,pieSeriesSpacing:4}},function(t,e,n){"use strict";var i=n(0).extend,o=n(5).each,r=n(4).noop,a=n(10),s=a.getWindow(),l=n(289),u=i,c=n(2).isDefined,d=n(13).normalizeEnum,h=Math,f=h.round,p=h.floor,m=h.ceil;t.exports={deleteLabel:function(){this._label.dispose(),this._label=null},_hasGraphic:function(){return this.graphic},clearVisibility:function(){var t=this.graphic;t&&t.attr("visibility")&&t.attr({visibility:null})},isVisible:function(){return this.inVisibleArea&&this.series.isVisible()},setInvisibility:function(){var t=this.graphic;t&&"hidden"!==t.attr("visibility")&&t.attr({visibility:"hidden"}),this._errorBar&&this._errorBar.attr({visibility:"hidden"}),this._label.draw(!1)},clearMarker:function(){var t=this.graphic;t&&t.attr(this._emptySettings)},_createLabel:function(){this._label=new l.Label({renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this})},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_updateLabelOptions:function(){!this._label&&this._createLabel(),this._label.setOptions(this._options.label)},_checkImage:function(t){return c(t)&&("string"===typeof t||c(t.url))},_fillStyle:function(){this._styles=this._options.styles},_checkSymbol:function(t,e){var n=t.symbol,i=e.symbol,o="circle"===n&&"circle"!==i||"circle"!==n&&"circle"===i,r=this._checkImage(t.image)!==this._checkImage(e.image);return!(!o&&!r)},_populatePointShape:function(t,e){switch(t){case"square":return function(t){return[-t,-t,t,-t,t,t,-t,t,-t,-t]}(e);case"polygon":return function(t){var e=m(t);return[-e,0,0,-e,e,0,0,e,-e,0]}(e);case"triangle":case"triangleDown":return function(t){return[-t,-t,t,-t,0,t,-t,-t]}(e);case"triangleUp":return function(t){return[-t,t,t,t,0,-t,-t,t]}(e);case"cross":return function(t){var e=m(t),n=p(e/2),i=m(e/2);return[-e,-n,-n,-e,0,-i,n,-e,e,-n,i,0,e,n,n,e,0,i,-n,e,-e,n,-i,0]}(e)}},hasCoords:function(){return null!==this.x&&null!==this.y},correctValue:function(t){var e=this.series.getValueAxis();this.hasValue()&&(this.value=this.properValue=e.validateUnit(this.initialValue.valueOf()+t.valueOf()),this.minValue=e.validateUnit(t))},resetCorrection:function(){this.value=this.properValue=this.initialValue,this.minValue="canvas_position_default"},resetValue:function(){this.hasValue()&&(this.value=this.properValue=this.initialValue=0,this.minValue=0,this._label.setDataField("value",this.value))},_getTranslates:function(t){var e=this.x,n=this.y;return t&&(this._options.rotated?e=this.defaultX:n=this.defaultY),{x:e,y:n}},_createImageMarker:function(t,e,n){var i=n.width||20,o=n.height||20;return t.image(-f(.5*i),-f(.5*o),i,o,n.url?n.url.toString():n.toString(),"center").attr({translateX:e.translateX,translateY:e.translateY,visibility:e.visibility})},_createSymbolMarker:function(t,e){var n,i=this._options.symbol;return"circle"===i?(delete e.points,n=t.circle().attr(e)):"square"!==i&&"polygon"!==i&&"triangle"!==i&&"triangleDown"!==i&&"triangleUp"!==i&&"cross"!==i||(n=t.path([],"area").attr(e).sharp()),n},_createMarker:function(t,e,n,i){var o=this._checkImage(n)?this._createImageMarker(t,i,n):this._createSymbolMarker(t,i);return o&&o.data({"chart-data-point":this}).append(e),o},_getSymbolBBox:function(t,e,n){return{x:t-n,y:e-n,width:2*n,height:2*n}},_getImageBBox:function(t,e){var n=this._options.image,i=n.width||20,o=n.height||20;return{x:t-f(i/2),y:e-f(o/2),width:i,height:o}},_getGraphicBBox:function(){var t=this._options,e=this.x,n=this.y;return t.visible?this._checkImage(t.image)?this._getImageBBox(e,n):this._getSymbolBBox(e,n,t.styles.normal.r):{x:e,y:n,width:0,height:0}},hideInsideLabel:r,_getShiftLabelCoords:function(t){var e=this._addLabelAlignmentAndOffset(t,this._getLabelCoords(t));return this._checkLabelPosition(t,e)},_drawLabel:function(){var t=this._getCustomLabelVisibility(),e=this._label,n=this._showForZeroValues()&&this.hasValue()&&!1!==t&&(this.series.getLabelVisibility()||t);e.draw(!!n)},correctLabelPosition:function(t){var e=this._getShiftLabelCoords(t);this.hideInsideLabel(t,e)||(t.setFigureToDrawConnector(this._getLabelConnector(t.pointPosition)),t.shift(f(e.x),f(e.y)))},_showForZeroValues:function(){return!0},_getLabelConnector:function(t){var e=this._getGraphicBBox(t),n=e.width/2,i=e.height/2;return{x:e.x+n,y:e.y+i,r:this._options.visible?Math.max(n,i):0}},_getPositionFromLocation:function(){return{x:this.x,y:this.y}},_isPointInVisibleArea:function(t,e){return t.minX<=e.x+e.width&&t.maxX>=e.x&&t.minY<=e.y+e.height&&t.maxY>=e.y},_checkLabelPosition:function(t,e){var n=this._getVisibleArea(),i=t.getBoundingRect(),o=this._getGraphicBBox(t.pointPosition),r=this._getGraphicBBox(),a="inside"===t.getLayoutOptions().position;return this._isPointInVisibleArea(n,r)&&(this._options.rotated?(n.minX>e.x&&(e.x=a?n.minX:o.x+o.width+10),n.maxXe.y&&(e.y=n.minY),n.maxYe.x&&(e.x=n.minX),n.maxXe.y&&(e.y=a?n.minY:o.y+o.height+10),n.maxY0&&(v=this._getErrorBarBaseEdgeLength()*r.edgeLength),v=p(parseInt(v)/2),g&&(u=this._baseErrorBarPos),_&&(l=this._baseErrorBarPos),"none"!==h&&c(l)&&c(u)&&c(s)?(!_&&a.push([s-v,l,s+v,l]),a.push([s,l,s,u]),!g&&a.push([s+v,u,s-v,u]),i.rotated&&o(a,(function(t,e){e.reverse()})),n=this._getErrorBarSettings(r),this._errorBar?(n.points=a,this._errorBar.attr(n)):this._errorBar=t.path(a,"line").attr(n).append(e)):this._errorBar&&this._errorBar.attr({visibility:"hidden"})}},getTooltipParams:function(){var t=this.graphic;return{x:this.x,y:this.y,offset:t?t.getBBox().height/2:0}},setPercentValue:function(t,e,n,i){var o=this.value/t||0,r=this.minValue/t||0,a=o-r;this._label.setDataField("percent",a),this._label.setDataField("total",e),this.series.isFullStackedSeries()&&this.hasValue()&&(this.leftHole&&(this.leftHole/=t-n,this.minLeftHole/=t-n),this.rightHole&&(this.rightHole/=t-i,this.minRightHole/=t-i),this.value=this.properValue=o,this.minValue=r||this.minValue)},_storeTrackerR:function(){var t=s.navigator,e=this._options.styles.normal.r,n=a.hasProperty("ontouchstart")||t.msPointerEnabled&&t.msMaxTouchPoints||t.pointerEnabled&&t.maxTouchPoints?20:6;return this._options.trackerR=e0?t?"right":"top":t?"left":"bottom"},_getFormatObject:function(t){var e=this._label.getData();return u({},e,{argumentText:t.formatValue(this.initialArgument,"argument"),valueText:t.formatValue(this.initialValue)},c(e.percent)?{percentText:t.formatValue(e.percent,"percent")}:{},c(e.total)?{totalText:t.formatValue(e.total)}:{})},getMarkerVisibility:function(){return this._options.visible},coordsIn:function(t,e){var n=this._storeTrackerR();return t>=this.x-n&&t<=this.x+n&&e>=this.y-n&&e<=this.y+n},getMinValue:function(t){var e=this._options.errorBars;if(e&&!t){var n=e.displayMode,i="high"!==n&&c(this.lowError)?this.lowError:this.value,o="low"!==n&&c(this.highError)?this.highError:this.value;return io?i:o}return this.value}}},function(t,e,n){"use strict";t.exports=n(766),t.exports.default=t.exports},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(3),r=n(67),a=n(2).isDate,s=n(5).each,l=n(43),u={SUPPORTED_FORMATS:["date","time","datetime"],DATE_COMPONENT_TEXT_FORMATTER:function(t,e){var n=o("
").addClass("dx-dateview-formatter-container");return o("").text(t).addClass("dx-dateview-value-formatter").appendTo(n),o("").text(e).addClass("dx-dateview-name-formatter").appendTo(n),n},ONE_MINUTE:6e4,ONE_DAY:864e5,ONE_YEAR:31536e6,MIN_DATEVIEW_DEFAULT_DATE:new Date(1900,0,1),MAX_DATEVIEW_DEFAULT_DATE:function(){var t=new Date;return new Date(t.getFullYear()+50,t.getMonth(),t.getDate(),23,59,59)}(),FORMATS_INFO:{date:{getStandardPattern:function(){return"yyyy-MM-dd"},components:["year","day","month","day"]},time:{getStandardPattern:function(){return"HH:mm"},components:["hours","minutes","seconds","milliseconds"]},datetime:{getStandardPattern:function(){var t;return function(){var e=o("").attr("type","datetime");e.val("2000-01-01T01:01Z"),e.val()&&(t="yyyy-MM-ddTHH:mmZ")}(),t||(t="yyyy-MM-ddTHH:mm:ssZ"),u.FORMATS_INFO.datetime.getStandardPattern=function(){return t},t},components:["year","day","month","day"].concat(["hours","minutes","seconds","milliseconds"])},"datetime-local":{getStandardPattern:function(){return"yyyy-MM-ddTHH:mm:ss"},components:["year","day","month","day"].concat(["hours","minutes","seconds"])}},FORMATS_MAP:{date:"shortdate",time:"shorttime",datetime:"shortdateshorttime"},SUBMIT_FORMATS_MAP:{date:"date",time:"time",datetime:"datetime-local"},toStandardDateFormat:function(t,e){var n=u.FORMATS_INFO[e].getStandardPattern();return r.serializeDate(t,n)},fromStandardDateFormat:function(t){var e=r.dateParser(t);return a(e)?e:void 0},getMaxMonthDay:function(t,e){return new Date(t,e+1,0).getDate()},mergeDates:function(t,e,n){if(!e)return e||null;if(!t||isNaN(t.getTime())){var i=new Date(null);t=new Date(i.getFullYear(),i.getMonth(),i.getDate())}var o=new Date(t.valueOf()),r=u.FORMATS_INFO[n];return s(r.components,(function(){var t=u.DATE_COMPONENTS_INFO[this];o[t.setter](e[t.getter]())})),o},getLongestCaptionIndex:function(t){var e,n=0,i=0;for(e=0;ei&&(n=e,i=t[e].length);return n},formatUsesMonthName:function(t){return l.formatUsesMonthName(t)},formatUsesDayName:function(t){return l.formatUsesDayName(t)},getLongestDate:function(t,e,n){var o=function(t){var e=i(t);return"string"===e?"format":"object"===e&&void 0!==t.type?t.type:null}(t),r=9;o&&!u.formatUsesMonthName(o)||(r=u.getLongestCaptionIndex(e));var a=new Date(1888,r,21,23,59,59,999);if(!o||u.formatUsesDayName(o)){var s=a.getDate()-a.getDay()+u.getLongestCaptionIndex(n);a.setDate(s)}return a},normalizeTime:function(t){t.setSeconds(0),t.setMilliseconds(0)}};u.DATE_COMPONENTS_INFO={year:{getter:"getFullYear",setter:"setFullYear",formatter:function(t,e){var n=new Date(e.getTime());return n.setFullYear(t),l.format(n,"yyyy")},startValue:void 0,endValue:void 0},day:{getter:"getDate",setter:"setDate",formatter:function(t,e){var n=new Date(e.getTime());return n.setDate(t),l.format(n,"d")},startValue:1,endValue:void 0},month:{getter:"getMonth",setter:"setMonth",formatter:function(t){return l.getMonthNames()[t]},startValue:0,endValue:11},hours:{getter:"getHours",setter:"setHours",formatter:function(t){return l.format(new Date(0,0,0,t),"hour")},startValue:0,endValue:23},minutes:{getter:"getMinutes",setter:"setMinutes",formatter:function(t){return l.format(new Date(0,0,0,0,t),"minute")},startValue:0,endValue:59},seconds:{getter:"getSeconds",setter:"setSeconds",formatter:function(t){return l.format(new Date(0,0,0,0,0,t),"second")},startValue:0,endValue:59},milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",formatter:function(t){return l.format(new Date(0,0,0,0,0,0,t),"millisecond")},startValue:0,endValue:999}},t.exports=u},function(t,e,n){"use strict";var i,o=n(104),r=n(224),a=n(2),s=n(10),l=n(0),u=n(12),c=(i=u)&&i.__esModule?i:{default:i};var d={widget:"separator"},h="dx-diagram-sm-edit-item",f="dx-diagram-md-edit-item",p="dx-diagram-lg-edit-item",m="dx-diagram-image-dropdown-item",g="dx-diagram-color-edit-item",_="dx-diagram-lg-icon-item",v={SHOW_TOOLBOX_COMMAND_NAME:"toolbox",SHOW_PROPERTIES_PANEL_COMMAND_NAME:"propertiesPanel",getAllCommands:function(){var t=this,e=(0,o.getDiagram)().DiagramCommand;return this._allCommands||(this._allCommands={separator:d,exportSvg:{command:e.ExportSvg,text:c.default.format("dxDiagram-commandExportToSvg"),getParameter:function(e){return function(n){return t._exportTo(e,n,"SVG","image/svg+xml")}}},exportPng:{command:e.ExportPng,text:c.default.format("dxDiagram-commandExportToPng"),getParameter:function(e){return function(n){return t._exportTo(e,n,"PNG","image/png")}}},exportJpg:{command:e.ExportJpg,text:c.default.format("dxDiagram-commandExportToJpg"),getParameter:function(e){return function(n){return t._exportTo(e,n,"JPEG","image/jpeg")}}},undo:{command:e.Undo,hint:c.default.format("dxDiagram-commandUndo"),text:c.default.format("dxDiagram-commandUndo"),icon:"undo",menuIcon:"undo"},redo:{command:e.Redo,hint:c.default.format("dxDiagram-commandRedo"),text:c.default.format("dxDiagram-commandRedo"),icon:"redo",menuIcon:"redo"},cut:{command:e.Cut,hint:c.default.format("dxDiagram-commandCut"),text:c.default.format("dxDiagram-commandCut"),icon:"cut",menuIcon:"cut"},copy:{command:e.Copy,hint:c.default.format("dxDiagram-commandCopy"),text:c.default.format("dxDiagram-commandCopy"),icon:"copy",menuIcon:"copy"},paste:{command:e.PasteInPosition,hint:c.default.format("dxDiagram-commandPaste"),text:c.default.format("dxDiagram-commandPaste"),icon:"paste",menuIcon:"paste"},selectAll:{command:e.SelectAll,hint:c.default.format("dxDiagram-commandSelectAll"),text:c.default.format("dxDiagram-commandSelectAll"),icon:"dx-diagram-i-button-select-all dx-diagram-i",menuIcon:"dx-diagram-i-menu-select-all dx-diagram-i"},delete:{command:e.Delete,hint:c.default.format("dxDiagram-commandDelete"),text:c.default.format("dxDiagram-commandDelete"),icon:"remove",menuIcon:"remove"},fontName:{command:e.FontName,hint:c.default.format("dxDiagram-commandFontName"),text:c.default.format("dxDiagram-commandFontName"),widget:"dxSelectBox",items:["Arial","Arial Black","Helvetica","Times New Roman","Courier New","Courier","Verdana","Georgia","Comic Sans MS","Trebuchet MS"].map((function(t){return{text:t,value:t}})),cssClass:f},fontSize:{command:e.FontSize,hint:c.default.format("dxDiagram-commandFontSize"),text:c.default.format("dxDiagram-commandFontSize"),widget:"dxSelectBox",items:[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72].map((function(t){return{text:t+"pt",value:t+"pt"}})),cssClass:h},bold:{command:e.Bold,hint:c.default.format("dxDiagram-commandBold"),text:c.default.format("dxDiagram-commandBold"),icon:"bold",menuIcon:"bold"},italic:{command:e.Italic,hint:c.default.format("dxDiagram-commandItalic"),text:c.default.format("dxDiagram-commandItalic"),icon:"italic",menuIcon:"italic"},underline:{command:e.Underline,hint:c.default.format("dxDiagram-commandUnderline"),text:c.default.format("dxDiagram-commandUnderline"),icon:"underline",menuIcon:"underline"},fontColor:{command:e.FontColor,text:c.default.format("dxDiagram-commandTextColor"),hint:c.default.format("dxDiagram-commandTextColor"),widget:"dxColorBox",icon:"dx-icon dx-icon-color",menuIcon:"dx-icon dx-icon-color",cssClass:g},lineColor:{command:e.StrokeColor,text:c.default.format("dxDiagram-commandLineColor"),hint:c.default.format("dxDiagram-commandLineColor"),widget:"dxColorBox",icon:"dx-icon dx-icon-background",menuIcon:"dx-icon dx-icon-background",cssClass:g},lineWidth:{command:e.StrokeWidth,text:c.default.format("dxDiagram-commandLineWidth"),hint:c.default.format("dxDiagram-commandLineWidth"),widget:"dxSelectBox",items:[1,2,3,4,5,6,7,8].map((function(t){return{text:t+"px",value:t.toString()}})),cssClass:h},lineStyle:{command:e.StrokeStyle,text:c.default.format("dxDiagram-commandLineStyle"),hint:c.default.format("dxDiagram-commandLineStyle"),widget:"dxSelectBox",items:[{value:"",menuIcon:"dx-diagram-i-line-solid dx-diagram-i",hint:c.default.format("dxDiagram-commandLineStyleSolid")},{value:"2,2",menuIcon:"dx-diagram-i-line-dotted dx-diagram-i",hint:c.default.format("dxDiagram-commandLineStyleDotted")},{value:"6,2",menuIcon:"dx-diagram-i-line-dashed dx-diagram-i",hint:c.default.format("dxDiagram-commandLineStyleDashed")}],cssClass:m},fillColor:{command:e.FillColor,text:c.default.format("dxDiagram-commandFillColor"),hint:c.default.format("dxDiagram-commandFillColor"),widget:"dxColorBox",icon:"dx-diagram-i dx-diagram-i-button-fill",menuIcon:"dx-diagram-i dx-diagram-i-menu-fill",cssClass:g},textAlignLeft:{command:e.TextLeftAlign,hint:c.default.format("dxDiagram-commandAlignLeft"),text:c.default.format("dxDiagram-commandAlignLeft"),icon:"alignleft",menuIcon:"alignleft"},textAlignCenter:{command:e.TextCenterAlign,hint:c.default.format("dxDiagram-commandAlignCenter"),text:c.default.format("dxDiagram-commandAlignCenter"),icon:"aligncenter",menuIcon:"aligncenter"},textAlignRight:{command:e.TextRightAlign,hint:c.default.format("dxDiagram-commandAlignRight"),text:c.default.format("dxDiagram-commandAlignRight"),icon:"alignright",menu:"alignright"},lock:{command:e.Lock,hint:c.default.format("dxDiagram-commandLock"),text:c.default.format("dxDiagram-commandLock"),icon:"dx-diagram-i-button-lock dx-diagram-i",menuIcon:"dx-diagram-i-menu-lock dx-diagram-i"},unlock:{command:e.Unlock,hint:c.default.format("dxDiagram-commandUnlock"),text:c.default.format("dxDiagram-commandUnlock"),icon:"dx-diagram-i-button-unlock dx-diagram-i",menuIcon:"dx-diagram-i-menu-unlock dx-diagram-i"},bringToFront:{command:e.BringToFront,hint:c.default.format("dxDiagram-commandBringToFront"),text:c.default.format("dxDiagram-commandBringToFront"),icon:"dx-diagram-i-button-bring-to-front dx-diagram-i",menuIcon:"dx-diagram-i-menu-bring-to-front dx-diagram-i"},sendToBack:{command:e.SendToBack,hint:c.default.format("dxDiagram-commandSendToBack"),text:c.default.format("dxDiagram-commandSendToBack"),icon:"dx-diagram-i-button-send-to-back dx-diagram-i",menuIcon:"dx-diagram-i-menu-send-to-back dx-diagram-i"},insertShapeImage:{command:e.InsertShapeImage,text:c.default.format("dxDiagram-commandInsertShapeImage"),icon:"dx-diagram-i-button-image-insert dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-insert dx-diagram-i"},editShapeImage:{command:e.EditShapeImage,text:c.default.format("dxDiagram-commandEditShapeImage"),icon:"dx-diagram-i-button-image-edit dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-edit dx-diagram-i"},deleteShapeImage:{command:e.DeleteShapeImage,text:c.default.format("dxDiagram-commandDeleteShapeImage"),icon:"dx-diagram-i-button-image-delete dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-delete dx-diagram-i"},connectorLineType:{command:e.ConnectorLineOption,widget:"dxSelectBox",hint:c.default.format("dxDiagram-commandConnectorLineType"),items:[{value:0,menuIcon:"dx-diagram-i-connector-straight dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineStraight")},{value:1,menuIcon:"dx-diagram-i-connector-orthogonal dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineOrthogonal")}],cssClass:m},connectorLineStart:{command:e.ConnectorStartLineEnding,widget:"dxSelectBox",items:[{value:0,menuIcon:"dx-diagram-i-connector-begin-none dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineNone")},{value:1,menuIcon:"dx-diagram-i-connector-begin-arrow dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineArrow")},{value:2,menuIcon:"dx-diagram-i-connector-begin-outlined-triangle dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineArrow")},{value:3,menuIcon:"dx-diagram-i-connector-begin-filled-triangle dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineArrow")}],hint:c.default.format("dxDiagram-commandConnectorLineStart"),cssClass:m},connectorLineEnd:{command:e.ConnectorEndLineEnding,widget:"dxSelectBox",items:[{value:0,menuIcon:"dx-diagram-i-connector-end-none dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineNone")},{value:1,menuIcon:"dx-diagram-i-connector-end-arrow dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineArrow")},{value:2,menuIcon:"dx-diagram-i-connector-end-outlined-triangle dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineArrow")},{value:3,menuIcon:"dx-diagram-i-connector-end-filled-triangle dx-diagram-i",hint:c.default.format("dxDiagram-commandConnectorLineArrow")}],hint:c.default.format("dxDiagram-commandConnectorLineEnd"),cssClass:m},layoutTreeTopToBottom:{command:e.AutoLayoutTreeVertical,text:c.default.format("dxDiagram-commandLayoutTopToBottom"),hint:c.default.format("dxDiagram-commandLayoutTopToBottom"),icon:"dx-diagram-i-button-layout-tree-tb dx-diagram-i",cssClass:_},layoutTreeBottomToTop:{command:e.AutoLayoutTreeVerticalBottomToTop,text:c.default.format("dxDiagram-commandLayoutBottomToTop"),hint:c.default.format("dxDiagram-commandLayoutBottomToTop"),icon:"dx-diagram-i-button-layout-tree-bt dx-diagram-i",cssClass:_},layoutTreeLeftToRight:{command:e.AutoLayoutTreeHorizontal,text:c.default.format("dxDiagram-commandLayoutLeftToRight"),hint:c.default.format("dxDiagram-commandLayoutLeftToRight"),icon:"dx-diagram-i-button-layout-tree-lr dx-diagram-i",cssClass:_},layoutTreeRightToLeft:{command:e.AutoLayoutTreeHorizontalRightToLeft,text:c.default.format("dxDiagram-commandLayoutRightToLeft"),hint:c.default.format("dxDiagram-commandLayoutRightToLeft"),icon:"dx-diagram-i-button-layout-tree-rl dx-diagram-i",cssClass:_},layoutLayeredTopToBottom:{command:e.AutoLayoutLayeredVertical,text:c.default.format("dxDiagram-commandLayoutTopToBottom"),hint:c.default.format("dxDiagram-commandLayoutTopToBottom"),icon:"dx-diagram-i-button-layout-layered-tb dx-diagram-i",cssClass:_},layoutLayeredBottomToTop:{command:e.AutoLayoutLayeredVerticalBottomToTop,text:c.default.format("dxDiagram-commandLayoutBottomToTop"),hint:c.default.format("dxDiagram-commandLayoutBottomToTop"),icon:"dx-diagram-i-button-layout-layered-bt dx-diagram-i",cssClass:_},layoutLayeredLeftToRight:{command:e.AutoLayoutLayeredHorizontal,text:c.default.format("dxDiagram-commandLayoutLeftToRight"),hint:c.default.format("dxDiagram-commandLayoutLeftToRight"),icon:"dx-diagram-i-button-layout-layered-lr dx-diagram-i",cssClass:_},layoutLayeredRightToLeft:{command:e.AutoLayoutLayeredHorizontalRightToLeft,text:c.default.format("dxDiagram-commandLayoutRightToLeft"),hint:c.default.format("dxDiagram-commandLayoutRightToLeft"),icon:"dx-diagram-i-button-layout-layered-rl dx-diagram-i",cssClass:_},fullScreen:{command:e.Fullscreen,hint:c.default.format("dxDiagram-commandFullscreen"),text:c.default.format("dxDiagram-commandFullscreen"),icon:"dx-diagram-i dx-diagram-i-button-fullscreen",menuIcon:"dx-diagram-i dx-diagram-i-menu-fullscreen",cssClass:g},units:{command:e.ViewUnits,hint:c.default.format("dxDiagram-commandUnits"),text:c.default.format("dxDiagram-commandUnits"),widget:"dxSelectBox"},simpleView:{command:e.ToggleSimpleView,hint:c.default.format("dxDiagram-commandSimpleView"),text:c.default.format("dxDiagram-commandSimpleView"),widget:"dxCheckBox"},showGrid:{command:e.ShowGrid,hint:c.default.format("dxDiagram-commandShowGrid"),text:c.default.format("dxDiagram-commandShowGrid"),widget:"dxCheckBox"},snapToGrid:{command:e.SnapToGrid,hint:c.default.format("dxDiagram-commandSnapToGrid"),text:c.default.format("dxDiagram-commandSnapToGrid"),widget:"dxCheckBox"},gridSize:{command:e.GridSize,hint:c.default.format("dxDiagram-commandGridSize"),text:c.default.format("dxDiagram-commandGridSize"),widget:"dxSelectBox"},pageSize:{command:e.PageSize,hint:c.default.format("dxDiagram-commandPageSize"),text:c.default.format("dxDiagram-commandPageSize"),widget:"dxSelectBox",cssClass:p,getCommandValue:function(t){return JSON.parse(t)},getEditorValue:function(t){return JSON.stringify(t)}},pageOrientation:{command:e.PageLandscape,hint:c.default.format("dxDiagram-commandPageOrientation"),text:c.default.format("dxDiagram-commandPageOrientation"),widget:"dxSelectBox",items:[{value:!0,text:c.default.format("dxDiagram-commandPageOrientationLandscape")},{value:!1,text:c.default.format("dxDiagram-commandPageOrientationPortrait")}],cssClass:f},pageColor:{command:e.PageColor,hint:c.default.format("dxDiagram-commandPageColor"),text:c.default.format("dxDiagram-commandPageColor"),widget:"dxColorBox",icon:"dx-diagram-i dx-diagram-i-button-fill",menuIcon:"dx-diagram-i dx-diagram-i-menu-fill",cssClass:g},zoomLevel:{command:e.ZoomLevel,hint:c.default.format("dxDiagram-commandZoomLevel"),text:c.default.format("dxDiagram-commandZoomLevel"),widget:"dxTextBox",items:[d,{command:e.FitToScreen,hint:c.default.format("dxDiagram-commandFitToContent"),text:c.default.format("dxDiagram-commandFitToContent")},{command:e.FitToWidth,hint:c.default.format("dxDiagram-commandFitToWidth"),text:c.default.format("dxDiagram-commandFitToWidth")},d,{command:e.AutoZoomToContent,hint:c.default.format("dxDiagram-commandAutoZoomByContent"),text:c.default.format("dxDiagram-commandAutoZoomByContent")},{command:e.AutoZoomToWidth,hint:c.default.format("dxDiagram-commandAutoZoomByWidth"),text:c.default.format("dxDiagram-commandAutoZoomByWidth")}],getEditorDisplayValue:function(t){return Math.round(100*t)+"%"},cssClass:h},toolbox:{command:this.SHOW_TOOLBOX_COMMAND_NAME,iconChecked:"dx-diagram-i dx-diagram-i-button-toolbox-close",iconUnchecked:"dx-diagram-i dx-diagram-i-button-toolbox-open",hint:c.default.format("dxDiagram-uiShowToolbox"),text:c.default.format("dxDiagram-uiShowToolbox")},propertiesPanel:{command:this.SHOW_PROPERTIES_PANEL_COMMAND_NAME,iconChecked:"close",iconUnchecked:"dx-diagram-i dx-diagram-i-button-properties-panel-open",hint:c.default.format("dxDiagram-uiProperties"),text:c.default.format("dxDiagram-uiProperties")}})},getMainToolbarCommands:function(t,e){var n=this.getAllCommands(),i=t?this._getPreparedCommands(n,t):this._getDefaultMainToolbarCommands(n);return this._prepareToolbarCommands(i,e)},_getDefaultMainToolbarCommands:function(t){return this._defaultMainToolbarCommands||(this._defaultMainToolbarCommands=[t.undo,t.redo,t.separator,t.fontName,t.fontSize,t.bold,t.italic,t.underline,t.separator,t.lineWidth,t.lineStyle,t.separator,t.fontColor,t.lineColor,t.fillColor,t.separator,t.textAlignLeft,t.textAlignCenter,t.textAlignRight,t.separator,t.connectorLineType,t.connectorLineStart,t.connectorLineEnd,t.separator,{text:c.default.format("dxDiagram-uiLayout"),showText:"always",items:[{text:c.default.format("dxDiagram-uiLayoutTree"),items:[t.layoutTreeTopToBottom,t.layoutTreeBottomToTop,t.layoutTreeLeftToRight,t.layoutTreeRightToLeft]},{text:c.default.format("dxDiagram-uiLayoutLayered"),items:[t.layoutLayeredTopToBottom,t.layoutLayeredBottomToTop,t.layoutLayeredLeftToRight,t.layoutLayeredRightToLeft]}]}])},getHistoryToolbarCommands:function(t,e){var n=this.getAllCommands(),i=t?this._getPreparedCommands(n,t):this._getDefaultHistoryToolbarCommands(n);return this._prepareToolbarCommands(i,e)},_getDefaultHistoryToolbarCommands:function(t){return this._defaultHistoryToolbarCommands||(this._defaultHistoryToolbarCommands=[t.undo,t.redo,t.separator,t.toolbox])},getViewToolbarCommands:function(t,e){var n=this.getAllCommands(),i=t?this._getPreparedCommands(n,t):this._getDefaultViewToolbarCommands(n);return this._prepareToolbarCommands(i,e)},_getDefaultViewToolbarCommands:function(t){return this._defaultViewToolbarCommands||(this._defaultViewToolbarCommands=[t.zoomLevel,t.separator,t.fullScreen,t.separator,{widget:"dxButton",icon:"export",text:c.default.format("dxDiagram-uiExport"),hint:c.default.format("dxDiagram-uiExport"),items:[t.exportSvg,t.exportPng,t.exportJpg]},{icon:"preferences",hint:c.default.format("dxDiagram-uiSettings"),text:c.default.format("dxDiagram-uiSettings"),items:[t.units,t.separator,t.showGrid,t.snapToGrid,t.gridSize,t.separator,t.simpleView,t.toolbox]}])},getPropertiesToolbarCommands:function(t,e){var n=this.getAllCommands(),i=t?this._getPreparedCommands(n,t):this._getDefaultPropertiesToolbarCommands(n);return this._prepareToolbarCommands(i,e)},_getDefaultPropertiesToolbarCommands:function(t){return this._defaultPropertiesToolbarCommands||(this._defaultPropertiesToolbarCommands=[t.propertiesPanel])},_getDefaultPropertyPanelCommandGroups:function(){return this._defaultPropertyPanelCommandGroups||(this._defaultPropertyPanelCommandGroups=[{title:c.default.format("dxDiagram-uiStyle"),groups:[{title:c.default.format("dxDiagram-uiText"),commands:["fontName","fontSize","bold","italic","underline","textAlignLeft","textAlignCenter","textAlignRight","fontColor"]},{title:c.default.format("dxDiagram-uiObject"),commands:["lineStyle","lineWidth","lineColor","fillColor"]},{title:c.default.format("dxDiagram-uiConnector"),commands:["connectorLineType","connectorLineStart","connectorLineEnd"]}]},{title:c.default.format("dxDiagram-uiLayout"),groups:[{title:c.default.format("dxDiagram-uiLayoutLayered"),commands:["layoutLayeredTopToBottom","layoutLayeredBottomToTop","layoutLayeredLeftToRight","layoutLayeredRightToLeft"]},{title:c.default.format("dxDiagram-uiLayoutTree"),commands:["layoutTreeTopToBottom","layoutTreeBottomToTop","layoutTreeLeftToRight","layoutTreeRightToLeft"]}]},{title:c.default.format("dxDiagram-uiDiagram"),groups:[{title:c.default.format("dxDiagram-uiPage"),commands:["pageSize","pageOrientation","pageColor"]}]}])},_preparePropertyPanelGroups:function(t){var e=this,n=this.getAllCommands(),i=[];return t.forEach((function(t){var o,r=t.commands;r&&(r=e._getPreparedCommands(n,r),r=e._prepareToolbarCommands(r)),t.groups&&(o=[],t.groups.forEach((function(t){var i=t.commands;i&&(i=e._getPreparedCommands(n,i),i=e._prepareToolbarCommands(i)),o.push({title:t.title,commands:i})}))),i.push({title:t.title,commands:r,groups:o})})),i},getPropertyPanelCommandTabs:function(t){return t=t||this._getDefaultPropertyPanelCommandGroups(),this._preparePropertyPanelGroups(t)},getContextMenuCommands:function(t){var e=this.getAllCommands(),n=t?this._getPreparedCommands(e,t):this._getDefaultContextMenuCommands(e);return this._prepareContextMenuCommands(n)},_getDefaultContextMenuCommands:function(t){return this._defaultContextMenuCommands||(this._defaultContextMenuCommands=[t.cut,t.copy,t.paste,t.delete,t.separator,t.selectAll,t.separator,t.bringToFront,t.sendToBack,t.separator,t.lock,t.unlock,t.separator,t.insertShapeImage,t.editShapeImage,t.deleteShapeImage])},_getPreparedCommands:function(t,e){var n=this;return e.map((function(e){if(t[e])return t[e];if(e.text||e.icon||e.name){var i=e.name&&t[e.name],o={command:i&&i.command,name:e.name,text:e.text||i&&i.text,hint:e.text||i&&i.hint,icon:e.icon||i&&i.icon,menuIcon:e.icon||i&&i.menuIcon,widget:i&&i.widget,cssClass:i&&i.cssClass,getParameter:i&&i.getParameter};return Array.isArray(e.items)?o.items=n._getPreparedCommands(t,e.items):o.items=i&&i.items,o}})).filter((function(t){return t}))},_prepareContextMenuCommands:function(t,e,n){var i=this,o=!1;return t.map((function(t){if(i._isValidCommand(t,e)){if(t!==d){var r=i._cloneCommand(t,e);return r.icon=r.menuIcon,r.beginGroup=o,r.rootCommand=r.command?void 0:n&&n.command,o=!1,r}o=!0}})).filter((function(t){return t}))},_prepareToolbarCommands:function(t,e){var n=this;return t.map((function(t){if(n._isValidCommand(t,e))return n._cloneCommand(t,e)})).filter((function(t){return t})).filter((function(t,e,n){return("separator"!==t.widget||e!==n.length-1)&&t}))},_cloneCommand:function(t,e){var n=(0,l.extend)({},t);return Array.isArray(t.items)&&(n.items=this._prepareContextMenuCommands(t.items,e,n)),n},_isValidCommand:function(t,e){return-1===(e=e||[]).indexOf(t.command)},_exportTo:function(t,e,n,i){var o=(0,s.getWindow)();if(o&&o.atob&&(0,a.isFunction)(o.Blob)){var l=this._getBlobByDataURI(o,e,i),u=t.option("export");r.fileSaver.saveAs(u.fileName||"foo",n,l,u.proxyURL)}},_getBlobByDataURI:function(t,e,n){for(var i=t.atob(e.split(",")[1]),o=new Uint8Array(i.length),r=0;r0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=h.bind(i);return o.listener=n,i.wrapFn=o,o}function p(t,e,n){var i=t._events;if(void 0===i)return[];var o=i[e];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"===typeof l)r(l,this,e);else{var u=l.length,c=g(l,u);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){a=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){"use strict";var i=n(30).Buffer,o=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(i.isEncoding===o||!o(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=d,e=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(t.lastNeed=o-1),o;if(--i=0)return o>0&&(t.lastNeed=o-2),o;if(--i=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var i=n(242),o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=d;var r=Object.create(n(205));r.inherits=n(22);var a=n(536),s=n(320);r.inherits(d,a);for(var l=o(s.prototype),u=0;u1&&void 0!==arguments[1]?arguments[1]:0;return 0===e?-t:-30*t}};(0,r.default)("dxmousewheel",l),e.name="dxmousewheel"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=u(n(3)),o=u(n(51)),r=n(10),a=n(2),s=n(5),l=u(n(38));function u(t){return t&&t.__esModule?t:{default:t}}function c(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},i=n.namespace;o.default.on(t,l("dxresize",i),e)},off:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.namespace;o.default.off(t,l("dxresize",n))}},e.hover={on:function(t,e,n,i){var r=i.selector,a=i.namespace;o.default.on(t,l("dxhoverend",a),r,(function(t){return n(t)})),o.default.on(t,l("dxhoverstart",a),r,(function(t){e.execute({element:t.target,event:t})}))},off:function(t,e){var n=e.selector,i=e.namespace;o.default.off(t,l("dxhoverstart",i),n),o.default.off(t,l("dxhoverend",i),n)}},e.visibility={on:function(t,e,n,i){var r=i.namespace;o.default.on(t,l("dxhiding",r),n),o.default.on(t,l("dxshown",r),e)},off:function(t,e){var n=e.namespace;o.default.off(t,l("dxhiding",n)),o.default.off(t,l("dxshown",n))}},e.focus={on:function(t,e,n,r){var a=r.namespace,s=r.isFocusable;o.default.on(t,l("focusin",a),e),o.default.on(t,l("focusout",a),n),i.default.hasDocumentProperty("onbeforeactivate")&&o.default.on(t,l("beforeactivate",a),(function(t){return s(t.target)||t.preventDefault()}))},off:function(t,e){var n=e.namespace;o.default.off(t,l("focusin",n)),o.default.off(t,l("focusout",n)),i.default.hasDocumentProperty("onbeforeactivate")&&o.default.off(t,l("beforeactivate",n))},trigger:function(t){return o.default.trigger(t,"focus")}},e.dxClick={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.namespace;o.default.on(t,l("dxclick",i),e)},off:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.namespace;o.default.off(t,l("dxclick",n))}},e.click={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.namespace;o.default.on(t,l("click",i),e)},off:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.namespace;o.default.off(t,l("click",n))}};var u=0,c={};e.keyboard={on:function(t,e,n){var i="keyboardProcessorId".concat(u++);return c[i]=new r.default({element:t,focusTarget:e,handler:n}),i},off:function(t){t&&c[t]&&(c[t].dispose(),delete c[t])},_getProcessor:function(t){return c[t]}}},function(t,e,n){"use strict";var i,o=n(21),r=n(4),a=n(17).contains,s=n(18),l=n(11),u=n(28),c=n(186),d=n(131),h=o.inherit({ctor:function(t,e){this._timeout=t,this._fire=e},start:function(){var t=this;this._schedule((function(){t.force()}))},_schedule:function(t){this.stop(),this._timer=setTimeout(t,this._timeout)},stop:function(){clearTimeout(this._timer)},force:function(){this._fired||(this.stop(),this._fire(),this._fired=!0)},fired:function(){return this._fired}}),f=c.inherit({ctor:function(){this.callBase.apply(this,arguments),this._active=new h(0,r.noop),this._inactive=new h(0,r.noop)},configure:function(t,e){switch(e){case"dxactive":t.activeTimeout=t.timeout;break;case"dxinactive":t.inactiveTimeout=t.timeout}this.callBase(t)},start:function(t){if(i){var e=a(this.getElement().get(0),i.getElement().get(0)),n=!i._active.fired();if(e&&n)return void this._cancel();i._inactive.force()}i=this,this._initEvents(t),this._active.start()},_initEvents:function(t){var e=this,n=this._getEmitterTarget(t),o=l.isMouseEvent(t),a=s.isSimulator()||!o,u=r.ensureDefined(this.activeTimeout,30),c=r.ensureDefined(this.inactiveTimeout,400);this._active=new h(a?u:0,(function(){e._fireEvent("dxactive",t,{target:n})})),this._inactive=new h(a?c:0,(function(){e._fireEvent("dxinactive",t,{target:n}),i=null}))},cancel:function(t){this.end(t)},end:function(t){var e=t.type!==u.up;e?this._active.stop():this._active.force(),this._inactive.start(),e&&this._inactive.force()},dispose:function(){this._active.stop(),this._inactive.stop(),this.callBase()},lockInactive:function(){return this._active.force(),this._inactive.stop(),i=null,this._cancel(),this._inactive.force.bind(this._inactive)}});f.lock=function(t){var e=i?i.lockInactive():r.noop;t.done(e)},d({emitter:f,events:["dxactive","dxinactive"]}),e.lock=f.lock,e.active="dxactive",e.inactive="dxinactive"},function(t,e,n){"use strict";var i=n(3),o=n(21),r=n(5).each,a=n(188),s=o.inherit({ctor:function(t,e,n){this._$element=t,this._options=e,this._rawData=n,a.attachInstanceToElement(t,this,this._dispose),this._render()},_render:function(){var t=i("
").addClass("dx-item-content-placeholder");this._$element.append(t),this._watchers=[],this._renderWatchers()},_renderWatchers:function(){this._startWatcher("disabled",this._renderDisabled.bind(this)),this._startWatcher("visible",this._renderVisible.bind(this))},_startWatcher:function(t,e){var n=this._rawData,i=this._options.fieldGetter(t),o=function(t,e,n){var i=function(){var t;return function(e){t!==e&&(n(e,t),t=e)}}();return{dispose:t(e,i),force:function(){i(e())}}}(this._options.watchMethod(),(function(){return i(n)}),function(t,n){this._dirty=!0,e(t,n)}.bind(this));this._watchers.push(o)},setDataField:function(){if(this._dirty=!1,r(this._watchers,(function(t,e){e.force()})),this._dirty)return!0},_renderDisabled:function(t,e){this._$element.toggleClass("dx-state-disabled",!!t),this._updateOwnerFocus(t)},_updateOwnerFocus:function(t){var e=this._options.owner;e&&t&&e._resetItemFocus(this._$element)},_renderVisible:function(t,e){this._$element.toggleClass("dx-state-invisible",void 0!==t&&!t)},_dispose:function(){r(this._watchers,(function(t,e){e.dispose()}))}});s.getInstance=function(t){return a.getInstanceByElement(t,this)},t.exports=s},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(4).noop,a=n(21),s=n(264),l=n(11),u=l.addNamespace(s.start,"dxListEditDecorator"),c=l.addNamespace(s.swipe,"dxListEditDecorator"),d=l.addNamespace(s.end,"dxListEditDecorator"),h=a.inherit({ctor:function(t){this._list=t,this._init()},_init:r,_shouldHandleSwipe:!1,_attachSwipeEvent:function(t){var e={itemSizeFunc:function(){return this._clearSwipeCache&&(this._itemWidthCache=this._list.$element().width(),this._clearSwipeCache=!1),this._itemWidthCache}.bind(this)};o.on(t.$itemElement,u,e,this._itemSwipeStartHandler.bind(this)),o.on(t.$itemElement,c,this._itemSwipeUpdateHandler.bind(this)),o.on(t.$itemElement,d,this._itemSwipeEndHandler.bind(this))},_itemSwipeStartHandler:function(t){var e=i(t.currentTarget);e.is(".dx-state-disabled, .dx-state-disabled *")?t.cancel=!0:(clearTimeout(this._list._inkRippleTimer),this._swipeStartHandler(e,t))},_itemSwipeUpdateHandler:function(t){var e=i(t.currentTarget);this._swipeUpdateHandler(e,t)},_itemSwipeEndHandler:function(t){var e=i(t.currentTarget);this._swipeEndHandler(e,t),this._clearSwipeCache=!0},beforeBag:r,afterBag:r,_commonOptions:function(){return{activeStateEnabled:this._list.option("activeStateEnabled"),hoverStateEnabled:this._list.option("hoverStateEnabled"),focusStateEnabled:this._list.option("focusStateEnabled")}},modifyElement:function(t){this._shouldHandleSwipe&&(this._attachSwipeEvent(t),this._clearSwipeCache=!0)},afterRender:r,handleClick:r,handleKeyboardEvents:r,handleEnterPressing:r,handleContextMenu:r,_swipeStartHandler:r,_swipeUpdateHandler:r,_swipeEndHandler:r,visibilityChange:r,getExcludedSelectors:r,dispose:r});t.exports=h},function(t,e,n){"use strict";var i=Number,o=n(13).getAppropriateFormat,r=n(0).extend,a=n(384),s=r,l=n(118),u=n(707),c=n(708),d=l.inherit({_rootClassPrefix:"dxg",_themeSection:"gauge",_createThemeManager:function(){return new u.ThemeManager(this._getThemeManagerOptions())},_initCore:function(){var t=this._renderer.root;this._valueChangingLocker=0,this._translator=this._factory.createTranslator(),this._tracker=this._factory.createTracker({renderer:this._renderer,container:t}),this._setTrackerCallbacks()},_beginValueChanging:function(){this._resetIsReady(),this._onBeginUpdate(),++this._valueChangingLocker},_endValueChanging:function(){0===--this._valueChangingLocker&&this._drawn()},_setTrackerCallbacks:function(){var t=this._renderer,e=this._tooltip;this._tracker.setCallbacks({"tooltip-show":function(n,i){var o=n.getTooltipParameters(),r=t.getRootOffset(),a=s({value:o.value,valueText:e.formatValue(o.value),color:o.color},i);return e.show(a,{x:o.x+r.left,y:o.y+r.top,offset:o.offset},{target:i})},"tooltip-hide":function(){return e.hide()}})},_dispose:function(){this._cleanCore(),this.callBase.apply(this,arguments)},_disposeCore:function(){this._themeManager.dispose(),this._tracker.dispose(),this._translator=this._tracker=null},_cleanCore:function(){this._tracker.deactivate(),this._cleanContent()},_renderCore:function(){this._isValidDomain&&(this._renderContent(),this._tracker.setTooltipState(this._tooltip.isEnabled()),this._tracker.activate(),this._noAnimation=!1)},_applyChanges:function(){this.callBase.apply(this,arguments),this._resizing=this._noAnimation=!1},_setContentSize:function(){var t=this;t._resizing=t._noAnimation=2===t._changes.count(),t.callBase.apply(t,arguments)},_applySize:function(t){this._innerRect={left:t[0],top:t[1],right:t[2],bottom:t[3]};var e=this._layout._cache;return this._cleanCore(),this._renderCore(),this._layout._cache=this._layout._cache||e,[t[0],this._innerRect.top,t[2],this._innerRect.bottom]},_initialChanges:["DOMAIN"],_themeDependentChanges:["DOMAIN"],_optionChangesMap:{subtitle:"MOSTLY_TOTAL",indicator:"MOSTLY_TOTAL",geometry:"MOSTLY_TOTAL",animation:"MOSTLY_TOTAL",startValue:"DOMAIN",endValue:"DOMAIN"},_optionChangesOrder:["DOMAIN","MOSTLY_TOTAL"],_change_DOMAIN:function(){this._setupDomain()},_change_MOSTLY_TOTAL:function(){this._applyMostlyTotalChange()},_setupDomain:function(){this._setupDomainCore(),this._isValidDomain=isFinite(1/(this._translator.getDomain()[1]-this._translator.getDomain()[0])),this._isValidDomain||this._incidentOccurred("W2301"),this._change(["MOSTLY_TOTAL"])},_applyMostlyTotalChange:function(){this._setupCodomain(),this._setupAnimationSettings(),this._setupDefaultFormat(),this._change(["LAYOUT"])},_setupAnimationSettings:function(){var t=this.option("animation");this._animationSettings=null,(void 0===t||t)&&(t=s({enabled:!0,duration:1e3,easing:"easeOutCubic"},t)).enabled&&t.duration>0&&(this._animationSettings={duration:i(t.duration),easing:t.easing}),this._containerBackgroundColor=this.option("containerBackgroundColor")||this._themeManager.theme().containerBackgroundColor},_setupDefaultFormat:function(){var t=this._translator.getDomain();this._defaultFormatOptions=o(t[0],t[1],this._getApproximateScreenRange())},_setupDomainCore:null,_calculateSize:null,_cleanContent:null,_renderContent:null,_setupCodomain:null,_getApproximateScreenRange:null,_factory:{createTranslator:function(){return new a.Translator1D},createTracker:function(t){return new c(t)}}});e.dxBaseGauge=d;var h=n(94).format,f=function(t,e,n){var i,o=h(t,(e=e||{}).format);return"function"===typeof e.customizeText?(i=s({value:t,valueText:o},n),String(e.customizeText.call(i,i))):o};e.formatValue=f,e.getSampleText=function(t,e){var n=f(t.getDomainStart(),e),i=f(t.getDomainEnd(),e);return n.length>=i.length?n:i},e.compareArrays=function(t,e){return t&&e&&t.length===e.length&&function(t,e){var n,i,o,r=t.length;for(n=0;n0},count:function(){return this._k},reset:function(){this._flags={},this._k=0}},e.replaceInherit=a?function(t){var e=t.inherit;t.inherit=function(){var t=e.apply(this,arguments),n=t.prototype;return["_plugins","_eventsMap","_initialChanges","_themeDependentChanges","_optionChangesMap","_optionChangesOrder","_layoutChangesOrder","_customChangesOrder","_totalChangesOrder"].forEach((function(t){n[t]={}})),t.addPlugin=r,t},t.addChange=r,t.addPlugin=r}:function(t){var e=t.inherit;t.inherit=function(){var t=this.prototype,n=t._plugins,i=t._fontFields,o=t._eventsMap,r=t._initialChanges,a=t._themeDependentChanges,s=t._optionChangesMap,d=t._partialOptionChangesMap,h=t._partialOptionChangesPath,f=t._optionChangesOrder,m=t._layoutChangesOrder,g=t._customChangesOrder,_=e.apply(this,arguments);return(t=_.prototype)._plugins=u(n,t._plugins),t._fontFields=u(i,t._fontFields),t._eventsMap=l(o,t._eventsMap),t._initialChanges=u(r,t._initialChanges),t._themeDependentChanges=u(a,t._themeDependentChanges),t._optionChangesMap=l(s,t._optionChangesMap),t._partialOptionChangesMap=l(d,t._partialOptionChangesMap),t._partialOptionChangesPath=l(h,t._partialOptionChangesPath),t._optionChangesOrder=u(f,t._optionChangesOrder),t._layoutChangesOrder=u(m,t._layoutChangesOrder),t._customChangesOrder=u(g,t._customChangesOrder),c(t),_.addPlugin=p,_},t.prototype._plugins=[],t.prototype._fontFields=[],t.addChange=d,t.addPlugin=p},e.changes=function(){return new s},e.expand=f},function(t,e,n){"use strict";var i=n(264),o=n(6),r=n(97),a=n(5).each,s=n(11),l=n(0).extend,u=n(188),c={onStart:i.start,onUpdated:i.swipe,onEnd:i.end,onCancel:"dxswipecancel"},d=r.inherit({_getDefaultOptions:function(){return l(this.callBase(),{elastic:!0,immediate:!1,direction:"horizontal",itemSizeFunc:null,onStart:null,onUpdated:null,onEnd:null,onCancel:null})},_render:function(){this.callBase(),this.$element().addClass("dx-swipeable"),this._attachEventHandlers()},_attachEventHandlers:function(){if(this._detachEventHandlers(),!this.option("disabled")){var t=this.NAME;this._createEventData(),a(c,function(e,n){var i=this._createActionByOption(e,{context:this});n=s.addNamespace(n,t),o.on(this.$element(),n,this._eventData,(function(t){return i({event:t})}))}.bind(this))}},_createEventData:function(){this._eventData={elastic:this.option("elastic"),itemSizeFunc:this.option("itemSizeFunc"),direction:this.option("direction"),immediate:this.option("immediate")}},_detachEventHandlers:function(){o.off(this.$element(),".dxSwipeable")},_optionChanged:function(t){switch(t.name){case"disabled":case"onStart":case"onUpdated":case"onEnd":case"onCancel":case"elastic":case"immediate":case"itemSizeFunc":case"direction":this._detachEventHandlers(),this._attachEventHandlers();break;case"rtlEnabled":break;default:this.callBase(t)}},_useTemplates:function(){return!1}});u.name(d,"dxSwipeable"),t.exports=d},function(t,e,n){"use strict";var i=n(0).extend,o=n(5).each,r=n(124),a=n(196).chart.area,s=n(13),l=r.chart,u=r.polar,c=n(2).isDefined,d=i,h=o;e.chart={},e.polar={};var f={_createLegendState:function(t,e){return{fill:t.color||e,hatching:t.hatching}},_parsePointStyle:function(t,e,n){var i=t.color||e,o=l._parsePointStyle.call(this,t,i,n);return o.fill=i,o.hatching=t.hatching,o.dashStyle=t.border&&t.border.dashStyle||"solid",delete o.r,o},_applyMarkerClipRect:function(t){t["clip-path"]=null},_setGroupsSettings:function(t,e){var n=this,i={};l._setGroupsSettings.apply(n,arguments),t&&e?i=this._getAffineCoordOptions():t||(i={scaleX:1,scaleY:1,translateX:0,translateY:0}),n._markersGroup.attr(i)},_drawPoint:function(t){t.hasAnimation=t.hasAnimation&&!t.firstDrawing,t.firstDrawing=!1,l._drawPoint.call(this,t)},_getMainColor:function(){return this._options.mainSeriesColor},_createPointStyles:function(t){var e=t.color||this._getMainColor();return{normal:this._parsePointStyle(t,e,e),hover:this._parsePointStyle(t.hoverStyle||{},e,e),selection:this._parsePointStyle(t.selectionStyle||{},e,e)}},_updatePointsVisibility:function(){var t=this._options.visible;o(this._points,(function(e,n){n._options.visible=t}))},_getOptionsForPoint:function(){return this._options},_animate:function(t){var e=this;e._animatePoints(t,(function(){e._animateComplete()}),(function(t,e){var n=t.length-1;h(t||[],(function(t,i){i.animate(t===n?e:void 0,i.getMarkerCoords())}))}))},getValueRangeInitialValue:a.getValueRangeInitialValue,_patchMarginOptions:function(t){return t.checkInterval=!0,t},_defaultAggregator:"sum",_defineDrawingState:function(){},usePointsToDefineAutoHiding:function(){return!1}};e.chart.bar=d({},l,f,{_getAffineCoordOptions:function(){var t=this._options.rotated,e={scaleX:t?.001:1,scaleY:t?1:.001};return e["translate"+(t?"X":"Y")]=this.getValueAxis().getTranslator().translate("canvas_position_default"),e},_animatePoints:function(t,e,n){this._markersGroup.animate({scaleX:1,scaleY:1,translateY:0,translateX:0},void 0,e),t||n(this._drawnPoints,e)},checkSeriesViewportCoord:function(t,e){if(0===this._points.length)return!1;if(t.isArgumentAxis)return!0;var n=t.getTranslator(),i=this.getViewport(),o=n.translate(i.categories?i.categories[0]:i.min),r=n.translate(i.categories?i.categories[i.categories.length-1]:i.max),a=this.getOptions().rotated,s=t.getOptions().inverted;return a&&!s||!a&&s?e>=o&&e<=r:e>=r&&e<=o},getSeriesPairCoord:function(t,e){for(var n=null,i=this._options.rotated,o=!e&&!i||e&&i,r=o?"vy":"vx",a=o?"vx":"vy",s=this.getPoints(),l=0;l").addClass("dx-toolbar-item-auto-hide").append(r)}},n)}));return l.merge(o,e)},_getToolbarItems:function(){var t=this;return a(this.option("items")||[],(function(e){return!t._isMenuItem(e)}))},_renderMenu:function(){this._renderMenuStrategy(),this._menuStrategy.render()},_renderMenuStrategy:function(){var t=this.option("submenuType");this._requireDropDownStrategy()&&(t="dropDownMenu");var e=p[t];this._menuStrategy&&this._menuStrategy.NAME===t||(this._menuStrategy=new e(this))},_requireDropDownStrategy:function(){var t=this.option("items")||[],e=!1;return u.each(t,(function(t,n){("auto"===n.locateInMenu||"always"===n.locateInMenu&&n.widget)&&(e=!0)})),e},_arrangeItems:function(){if(!this.$element().is(":hidden")){this._$centerSection.css({margin:"0 auto",float:"none"}),u.each(this._restoreItems||[],(function(t,e){i(e.container).append(e.item)})),this._restoreItems=[];var t=this.$element().width();this._hideOverflowItems(t),this.callBase(t)}},_itemOptionChanged:function(t,e,n){this._isMenuItem(t)?this._menuStrategy.renderMenuItems():this._isToolbarItem(t)?this.callBase(t,e,n):(this.callBase(t,e,n),this._menuStrategy.renderMenuItems()),"location"===e&&this.repaint()},_isMenuItem:function(t){return"menu"===t.location||"always"===t.locateInMenu},_isToolbarItem:function(t){return void 0===t.location||"never"===t.locateInMenu},_optionChanged:function(t){var e=t.name,n=t.value;switch(e){case"submenuType":this._invalidate();break;case"visible":this.callBase.apply(this,arguments),this._menuStrategy.handleToolbarVisibilityChange(n);break;case"menuItemTemplate":this._changeMenuOption("itemTemplate",this._getTemplate(n));break;case"onItemClick":this._changeMenuOption(e,n),this.callBase.apply(this,arguments);break;case"menuContainer":this._changeMenuOption("container",n);break;default:this.callBase.apply(this,arguments)}},_changeMenuOption:function(t,e){this._menuStrategy.widgetOption(t,e)}});r("dxToolbar",m),t.exports=m,t.exports.default=t.exports},function(t,e,n){"use strict";t.exports=n(435),t.exports.default=t.exports},function(t,e,n){"use strict";t.exports=n(812),t.exports.default=t.exports},function(t,e,n){"use strict";var i,o=n(7),r=n(0),a=n(4),s=n(2),l=(i=s)&&i.__esModule?i:{default:i};t.exports=function(t,e,n){e=e||a.noop,n=n||a.noop,Array.isArray(t)||(t=[t]);var i=t.map((function(t,i){return(0,o.when)(t).then((function(n){return l.default.isFunction(e)&&e({item:t,index:i,result:n}),n}),(function(t){return t||(t={}),t.index=i,l.default.isFunction(n)&&n(t),(new o.Deferred).resolve().promise()}))}));return o.when.apply(null,i)},t.exports.getDisplayFileSize=function(t){for(var e=["B","KB","MB","GB","TB"],n=0,i=t;i>=1024&&n<=e.length-1;)i/=1024,n++;return i=Math.round(10*i)/10,"".concat(i," ").concat(e[n])},t.exports.extendAttributes=function(t,e,n){return n.forEach((function(n){(0,r.extend)(!0,t,l.default.isDefined(e[n])?function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,e[n]):{})})),t},t.exports.findItemsByKeys=function(t,e){var n={};e.forEach((function(t){n[t]=null})),t.forEach((function(t){var e=t.fileItem.key;Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=t)}));var i=[];return e.forEach((function(t){var e=n[t];e&&i.push(e)})),i}},function(t,e,n){"use strict";var i=n(38),o=n(0).extend,r=n(5).each,a=n(16).inArray,s=n(2).isDefined,l=n(26),u=l.dateToMilliseconds,c=["freq","interval","byday","byweekno","byyearday","bymonth","bymonthday","count","until","byhour","byminute","bysecond","bysetpos","wkst"],d=["DAILY","WEEKLY","MONTHLY","YEARLY","SECONDLY","MINUTELY","HOURLY"],h={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},f={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},p={secondly:"seconds",minutely:"minutes",hourly:"hours",daily:"days",weekly:"weeks",monthly:"months",yearly:"years"},m={},g={bysecond:function(t,e){t.setSeconds(e)},byminute:function(t,e){t.setMinutes(e)},byhour:function(t,e){t.setHours(e)},bymonth:function(t,e){t.setMonth(e)},bymonthday:function(t,e){if(e<0){var n=new Date(t);_(n,1,-1),n.getDate()>=Math.abs(e)?_(t,1,e):_(t,2,e)}else e<=l.getLastMonthDay(t)?t.setDate(e):function(t){t.isWrongDate=!0}(t)},byday:function(t,e,n,i,o){var r=t.getDay(),a=h[n];e+=e>=a===a>r?7:0,t.setDate(t.getDate()-r+e)},byweekno:function(t,e,n){var i=new Date(t),o=new Date(i.setMonth(0,1)),r=o.getDay()-h[n],a=o.getTime()-r*u("day");r+1>4?t.setTime(a+7*e*u("day")):t.setTime(a+7*(e-1)*u("day"));var s=(t.getTimezoneOffset()-o.getTimezoneOffset())*u("minute");s&&t.setTime(t.getTime()+s)},byyearday:function(t,e){t.setMonth(0,1),t.setDate(e)}};function _(t,e,n){var i=new Date(t);t.setMonth(t.getMonth()+e),t.getMonth()-i.getMonth()>e&&t.setDate(n+1),t.setDate(n+1)}var v={bysecond:function(t){return t.getSeconds()},byminute:function(t){return t.getMinutes()},byhour:function(t){return t.getHours()},bymonth:function(t){return t.getMonth()},bymonthday:function(t){return t.getDate()},byday:function(t){return t.getDay()},byweekno:function(t,e){var n=new Date(t),i=4-n.getDay()+h[e]-1,o=u("day");t.getDay()t?n:t}(t.max,o);if(!n.isValid||!o.freq)return e;o.interval=function(t){var e=t.interval,n=t.freq,i={},o=p[n.toLowerCase()];return"MONTHLY"===n&&t.byday&&(o=p.daily),i[o]=e,i}(o);var c=O(o,t.firstDayOfWeek),d=t.end?t.end.getTime()-t.start.getTime():u("day"),h={exception:t.exception,min:t.min,dateRules:c,rule:o,recurrenceStartDate:a,recurrenceEndDate:t.end,duration:d};if(c.length&&o.count){var f=0;(function(t,e,n,i){var o=[],r=i.count,a=0,s=R(e,t,i.wkst),u=function(){var e=A(t,s,i),u=[];e.forEach((function(t){B(t)||t.getTime()>=n.getTime()&&u.push(t)}));var c=u.length,d=(a+=c)-r;a>r&&u.splice(c-d,d),u.forEach((function(t){return o.push(t)}));var h=i.interval;"days"===Object.keys(h)[0]&&(h={weeks:1}),s=l.addInterval(s,h)};for(;a0?e-1:t.length+e;t[i]&&n.push(t[i])})),n}(e,o.bysetpos)})),r(i,(function(t,n){e=e.concat(n)})),(e=e.filter((function(e){return e<=t.max}))).sort((function(t,e){return t-e})),e}function x(t,e,n,i,o,r){return e[t]||(e[t]=[]),function(t,e,n,i){if(!y(t,n.exception)){var o=l.sameDate(t,n.recurrenceEndDate)&&n.recurrenceEndDate.getTime()>t.getTime()?n.recurrenceEndDate.getTime()-t.getTime():n.duration;if(t.getTime()>=n.recurrenceStartDate.getTime()&&t.getTime()+o>n.min.getTime())return i||function(t,e,n){for(var i=!1,o=0;o1&&void 0!==arguments[1]?arguments[1]:null,n=[];if(s(e)&&(t.fdow=e),t.wkst||(t.wkst=s(e)?f[e]:"MO"),t.byweekno&&!t.byday){for(var i=Object.keys(h),o=0;o4&&void 0!==arguments[4]&&arguments[4],r=(t.getTimezoneOffset()-e.getTimezoneOffset())/60;return i?r=c(e,t,i):n&&(r=c(e,t,n)),new Date(t.getTime()+(o?-1:1)*r*a("hour"))}};t.exports=d},function(t,e,n){"use strict";var i=n(83).prototype,o=n(203).prototype,r=n(0).extend;function a(t,e){var n=t.ctx;n.suspend(),n.change(e),n.resume()}i._eventsMap.onNodesInitialized={name:"nodesInitialized"},i._eventsMap.onNodesRendering={name:"nodesRendering"},i._createProxyType=function(){var t,e=this;function n(t){t.proxy=this,this._id=t._id,this.level=t.level,this.index=t.index,this.data=t.data}n.prototype={constructor:n,getParent:function(){return t[this._id].parent.proxy||null},getChild:function(e){var n=t[this._id].nodes;return n?n[e].proxy:null},getChildrenCount:function(){var e=t[this._id].nodes;return e?e.length:0},getAllChildren:function(){var e,n=t[this._id].nodes,i=n&&n.length,o=[];for(e=0;e0?Number(e):0),a(i,["TILING"]),n=this):n=i.value,n},label:function(e){var n,i=t[this._id];return void 0!==e?(i.customLabel=e?String(e):null,a(i,["LABELS"]),n=this):n=i.customLabel||i.label,n},customize:function(e){var n=t[this._id];return e&&(n._custom=n._custom||{},r(!0,n._custom,e),n._partialState=n._partialLabelState=null),a(n,["TILES","LABELS"]),this},resetCustomization:function(){var e=t[this._id];return e._custom=e._partialState=e._partialLabelState=null,a(e,["TILES","LABELS"]),this}},e._extendProxyType(n.prototype),e._handlers.beginBuildNodes=function(){t=e._nodes,new n(e._root)},e._handlers.buildNode=function(t){new n(t)},e._handlers.endBuildNodes=function(){e._eventTrigger("nodesInitialized",{root:e._root.proxy})}},i._extendProxyType=n(4).noop;var s=i._resetNodes;i._resetNodes=function(){s.call(this),this._eventTrigger("nodesRendering",{node:this._topNode.proxy})};var l=o.updateStyles;o.updateStyles=function(){l.call(this),this._custom&&(this._partialState=!this.ctx.forceReset&&this._partialState||this.ctx.calculateState(this._custom),r(!0,this.state,this._partialState))};var u=o.updateLabelStyle;o.updateLabelStyle=function(){var t=this._custom;u.call(this),t&&t.label&&(this._partialLabelState=!this.ctx.forceReset&&this._partialLabelState||function(t,e){var n=t.ctx.calculateLabelState(e);"visible"in e&&(n.visible=!!e.visible);return n}(this,t.label),this.labelState=r(!0,{},this.labelState,this._partialLabelState))},i.getRootNode=function(){return this._root.proxy},i.resetNodes=function(){var t=this._context;return t.suspend(),t.change(["NODES_CREATE"]),t.resume(),this}},function(t,e,n){"use strict";(function(e,i){var o=n(30).Buffer,r=e.crypto||e.msCrypto;r&&r.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var n=o.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;a2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}o("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,o,a,s;if("string"===typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var l=function(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(l," ").concat(i," ").concat(r(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,n){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=u;var o=n(528),r=n(532);n(22)(u,o);for(var a=i(r.prototype),s=0;s=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 i=(4294967295&n)>>>0,o=(n-i)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var r=this._hash();return t?r.toString(t):r},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=o},function(t,e,n){"use strict";var i={};function o(t,e,n){n||(n=Error);var o=function(t){var n,i;function o(n,i,o){return t.call(this,function(t,n,i){return"string"===typeof e?e:e(t,n,i)}(n,i,o))||this}return i=t,(n=o).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,o}(n);o.prototype.name=n.name,o.prototype.code=t,i[t]=o}function r(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}o("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,o,a,s;if("string"===typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var l=function(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(l," ").concat(i," ").concat(r(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,n){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=u;var o=n(558),r=n(562);n(22)(u,o);for(var a=i(r.prototype),s=0;s>>2]>>>24-r%4*8&255)<<16|(e[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|e[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s>>6*(3-s)&63));var l=i.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(t){var n=t.length,i=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var r=0;r>>6-a%4*2,u=s|l;o[r>>>2]|=u<<24-r%4*8,r++}return e.create(o,r)}(t,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),o.enc.Base64)}()},function(t,e,n){!function(e,i){var o;t.exports=(o=n(35),function(t){var e=o,n=e.lib,i=n.WordArray,r=n.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=a.MD5=r.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var i=e+n,o=t[i];t[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r=this._hash.words,a=t[e+0],l=t[e+1],f=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],_=t[e+6],v=t[e+7],y=t[e+8],b=t[e+9],w=t[e+10],x=t[e+11],C=t[e+12],S=t[e+13],k=t[e+14],I=t[e+15],T=r[0],E=r[1],O=r[2],M=r[3];T=u(T,E,O,M,a,7,s[0]),M=u(M,T,E,O,l,12,s[1]),O=u(O,M,T,E,f,17,s[2]),E=u(E,O,M,T,p,22,s[3]),T=u(T,E,O,M,m,7,s[4]),M=u(M,T,E,O,g,12,s[5]),O=u(O,M,T,E,_,17,s[6]),E=u(E,O,M,T,v,22,s[7]),T=u(T,E,O,M,y,7,s[8]),M=u(M,T,E,O,b,12,s[9]),O=u(O,M,T,E,w,17,s[10]),E=u(E,O,M,T,x,22,s[11]),T=u(T,E,O,M,C,7,s[12]),M=u(M,T,E,O,S,12,s[13]),O=u(O,M,T,E,k,17,s[14]),T=c(T,E=u(E,O,M,T,I,22,s[15]),O,M,l,5,s[16]),M=c(M,T,E,O,_,9,s[17]),O=c(O,M,T,E,x,14,s[18]),E=c(E,O,M,T,a,20,s[19]),T=c(T,E,O,M,g,5,s[20]),M=c(M,T,E,O,w,9,s[21]),O=c(O,M,T,E,I,14,s[22]),E=c(E,O,M,T,m,20,s[23]),T=c(T,E,O,M,b,5,s[24]),M=c(M,T,E,O,k,9,s[25]),O=c(O,M,T,E,p,14,s[26]),E=c(E,O,M,T,y,20,s[27]),T=c(T,E,O,M,S,5,s[28]),M=c(M,T,E,O,f,9,s[29]),O=c(O,M,T,E,v,14,s[30]),T=d(T,E=c(E,O,M,T,C,20,s[31]),O,M,g,4,s[32]),M=d(M,T,E,O,y,11,s[33]),O=d(O,M,T,E,x,16,s[34]),E=d(E,O,M,T,k,23,s[35]),T=d(T,E,O,M,l,4,s[36]),M=d(M,T,E,O,m,11,s[37]),O=d(O,M,T,E,v,16,s[38]),E=d(E,O,M,T,w,23,s[39]),T=d(T,E,O,M,S,4,s[40]),M=d(M,T,E,O,a,11,s[41]),O=d(O,M,T,E,p,16,s[42]),E=d(E,O,M,T,_,23,s[43]),T=d(T,E,O,M,b,4,s[44]),M=d(M,T,E,O,C,11,s[45]),O=d(O,M,T,E,I,16,s[46]),T=h(T,E=d(E,O,M,T,f,23,s[47]),O,M,a,6,s[48]),M=h(M,T,E,O,v,10,s[49]),O=h(O,M,T,E,k,15,s[50]),E=h(E,O,M,T,g,21,s[51]),T=h(T,E,O,M,C,6,s[52]),M=h(M,T,E,O,p,10,s[53]),O=h(O,M,T,E,w,15,s[54]),E=h(E,O,M,T,l,21,s[55]),T=h(T,E,O,M,y,6,s[56]),M=h(M,T,E,O,I,10,s[57]),O=h(O,M,T,E,_,15,s[58]),E=h(E,O,M,T,S,21,s[59]),T=h(T,E,O,M,m,6,s[60]),M=h(M,T,E,O,x,10,s[61]),O=h(O,M,T,E,f,15,s[62]),E=h(E,O,M,T,b,21,s[63]),r[0]=r[0]+T|0,r[1]=r[1]+E|0,r[2]=r[2]+O|0,r[3]=r[3]+M|0},_doFinalize:function(){var e=this._data,n=e.words,i=8*this._nDataBytes,o=8*e.sigBytes;n[o>>>5]|=128<<24-o%32;var r=t.floor(i/4294967296),a=i;n[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,u=0;u<4;u++){var c=l[u];l[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function u(t,e,n,i,o,r,a){var s=t+(e&n|~e&i)+o+a;return(s<>>32-r)+e}function c(t,e,n,i,o,r,a){var s=t+(e&i|n&~i)+o+a;return(s<>>32-r)+e}function d(t,e,n,i,o,r,a){var s=t+(e^n^i)+o+a;return(s<>>32-r)+e}function h(t,e,n,i,o,r,a){var s=t+(n^(e|~i))+o+a;return(s<>>32-r)+e}e.MD5=r._createHelper(l),e.HmacMD5=r._createHmacHelper(l)}(Math),o.MD5)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return s}));var i=n(340),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},r={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function a(t){if("object"!==typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function s(t,e,n){var o;if("function"===typeof e&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"===typeof e&&"undefined"===typeof n&&(n=e,e=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(t,e)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var l=t,u=e,c=[],d=c,h=!1;function f(){d===c&&(d=c.slice())}function p(){if(h)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function m(t){if("function"!==typeof t)throw new Error("Expected the listener to be a function.");if(h)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return f(),d.push(t),function(){if(e){if(h)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,f();var n=d.indexOf(t);d.splice(n,1),c=null}}}function g(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw new Error("Reducers may not dispatch actions.");try{h=!0,u=l(u,t)}finally{h=!1}for(var e=c=d,n=0;ns)return 1}return 0}},function(t,e,n){"use strict";var i=n(57),o=n(6),r=n(253),a=n(2).isDefined,s=n(185),l=new r,u=0,c=e.name=function(t,e){if(!a(e)){if(!l.has(t)){var n="dxPrivateComponent"+u++;return l.set(t,n),n}return l.get(t)}l.set(t,e)};e.attachInstanceToElement=function(t,e,n){var r=i.data(t.get(0)),a=c(e.constructor);r[a]=e,n&&o.one(t,s,(function(){n.call(e)})),r.dxComponents||(r.dxComponents=[]),r.dxComponents.push(a)},e.getInstanceByElement=function(t,e){var n=c(e);return i.data(t.get(0),n)}},function(t,e,n){"use strict";var i=g(n(51)),o=n(0),r=n(625),a=n(256),s=g(n(21)),l=g(n(155)),u=g(n(38)),c=g(n(39)),d=n(153),h=g(n(188)),f=n(628),p=n(2),m=n(4);function g(t){return t&&t.__esModule?t:{default:t}}var _=function(t){return t.charAt(2).toLowerCase()+t.substr(3)},v=s.default.inherit({_setDeprecatedOptions:function(){this._deprecatedOptions={}},_getDeprecatedOptions:function(){return this._deprecatedOptions},_getDefaultOptions:function(){return{onInitialized:null,onOptionChanged:null,onDisposing:null,defaultOptionsRules:null}},_defaultOptionsRules:function(){return[]},_setOptionsByDevice:function(t){this._options.applyRules(t)},_convertRulesToOptions:function(t){return(0,a.convertRulesToOptions)(t)},_isInitialOptionValue:function(t){return this._options.isInitial(t)},_setOptionsByReference:function(){this._optionsByReference={}},_getOptionsByReference:function(){return this._optionsByReference},ctor:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t._optionChangedCallbacks,n=t._disposingCallbacks;this.NAME=h.default.name(this.constructor),this._eventsStrategy=d.EventsStrategy.create(this,t.eventsStrategy),this._updateLockCount=0,this._optionChangedCallbacks=e||(0,c.default)(),this._disposingCallbacks=n||(0,c.default)(),this.postponedOperations=new f.PostponedOperations,this._createOptions(t)},_createOptions:function(t){var e=this;this.beginUpdate();try{this._setOptionsByReference(),this._setDeprecatedOptions(),this._options=new r.Options(this._getDefaultOptions(),this._getDefaultOptions(),this._getOptionsByReference(),this._getDeprecatedOptions()),this._options.onChanging((function(t,n,i){return e._initialized&&e._optionChanging(t,n,i)})),this._options.onDeprecated((function(t,n){return e._logDeprecatedOptionWarning(t,n)})),this._options.onChanged((function(t,n,i){return e._notifyOptionChanged(t,n,i)})),this._options.onStartChange((function(){return e.beginUpdate()})),this._options.onEndChange((function(){return e.endUpdate()})),this._options.addRules(this._defaultOptionsRules()),t&&t.onInitializing&&t.onInitializing.apply(this,[t]),this._setOptionsByDevice(t.defaultOptionsRules),this._initOptions(t)}finally{this.endUpdate()}},_initOptions:function(t){this.option(t)},_init:function(){var t=this;this._createOptionChangedAction(),this.on("disposing",(function(e){t._disposingCallbacks.fireWith(t,[e])}))},_logDeprecatedOptionWarning:function(t,e){var n=e.message||"Use the '".concat(e.alias,"' option instead");u.default.log("W0001",this.NAME,t,e.since,n)},_logDeprecatedComponentWarning:function(t,e){u.default.log("W0000",this.NAME,t,"Use the '".concat(e,"' widget instead"))},_createOptionChangedAction:function(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled","readOnly"]})},_createDisposingAction:function(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled","readOnly"]})},_optionChanged:function(t){switch(t.name){case"onDisposing":case"onInitialized":break;case"onOptionChanged":this._createOptionChangedAction()}},_dispose:function(){this._optionChangedCallbacks.empty(),this._createDisposingAction(),this._disposingAction(),this._eventsStrategy.dispose(),this._options.dispose(),this._disposed=!0},_lockUpdate:function(){this._updateLockCount++},_unlockUpdate:function(){this._updateLockCount=Math.max(this._updateLockCount-1,0)},_isUpdateAllowed:function(){return 0===this._updateLockCount},_isInitializingRequired:function(){return!this._initializing&&!this._initialized},_commitUpdate:function(){this.postponedOperations.callPostponedOperations(),this._isInitializingRequired()&&this._initializeComponent()},_initializeComponent:function(){this._initializing=!0;try{this._init()}finally{this._initializing=!1,this._lockUpdate(),this._createActionByOption("onInitialized",{excludeValidators:["disabled","readOnly"]})(),this._unlockUpdate(),this._initialized=!0}},instance:function(){return this},beginUpdate:function(){this._lockUpdate()},endUpdate:function(){this._unlockUpdate(),this._isUpdateAllowed()&&this._commitUpdate()},_optionChanging:m.noop,_notifyOptionChanged:function(t,e,n){if(this._initialized)for(var i=[t].concat(this._options.getAliasesByName(t)),r=0;r=0)return n}(t,e,n,i)||[]:e}function f(t,e,n,i,r){var a,c=t.key();if(c){if(function(t,e){for(var n="string"===typeof e?e.split():e.slice();n.length;)if(n.shift()in t)return!0;return!1}(i,c)&&!(0,u.keysEqual)(c,n,t.keyOf(i)))return!r&&(0,u.rejectedPromise)(s.errors.Error("E4017"));if(!(a=function(t,e){if(t._dataByKeyMap)return t._dataByKeyMap[JSON.stringify(e)]}(e,n))){var d=g(t,e,n);if(d<0)return!r&&(0,u.rejectedPromise)(s.errors.Error("E4009"));a=e[d]}}else a=n;if(l.default.deepExtendArraySafe(a,i,!0),!r)return(0,o.default)().useLegacyStoreResult?(0,u.trivialPromise)(n,i):(0,u.trivialPromise)(a,n)}function p(t,e,n,l,c){var h,f=t.key(),p=(0,i.isPlainObject)(n)?(0,a.extend)({},n):n;if(f){if(void 0===(h=t.keyOf(p))||"object"===d(h)&&(0,i.isEmptyObject)(h)){if(Array.isArray(f))throw s.errors.Error("E4007");h=p[f]=String(new r.default)}else if(void 0!==e[g(t,e,h)])return!c&&(0,u.rejectedPromise)(s.errors.Error("E4008"))}else h=p;if(l>=0?e.splice(l,0,p):e.push(p),function(t,e,n){t._dataByKeyMap&&(t._dataByKeyMap[JSON.stringify(e)]=n)}(e,h,p),!c)return(0,u.trivialPromise)((0,o.default)().useLegacyStoreResult?n:p,h)}function m(t,e,n,i){var o=g(t,e,n);if(o>-1&&e.splice(o,1),!i)return(0,u.trivialPromise)(n)}function g(t,e,n){var i=t.key();if(!function(t,e){return!t._dataByKeyMap||t._dataByKeyMap[JSON.stringify(e)]}(e,n))return-1;for(var o=0,r=e.length;o").addClass(a).appendTo(n)),s}}},function(t,e,n){"use strict";var i=n(3),o=n(4).noop,r=n(12),a=n(8),s=n(0).extend,l=n(81),u=n(80),c=n(7).Deferred,d=n(36),h=u.inherit({_supportedKeys:function(){return s(this.callBase(),{escape:o})},_getDefaultOptions:function(){return s(this.callBase(),{message:r.format("Loading"),width:222,height:90,animation:null,showIndicator:!0,indicatorSrc:"",showPane:!0,delay:0,templatesRenderAsynchronously:!1,hideTopOverlayHandler:null,resizeEnabled:!1,focusStateEnabled:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"generic"},options:{shadingColor:"transparent"}},{device:function(){return d.isMaterial()},options:{message:"",width:60,height:60,maxHeight:60,maxWidth:60}}])},_init:function(){this.callBase.apply(this,arguments)},_render:function(){this.callBase(),this.$element().addClass("dx-loadpanel"),this._wrapper().addClass("dx-loadpanel-wrapper")},_renderContentImpl:function(){this.callBase(),this.$content().addClass("dx-loadpanel-content"),this._$contentWrapper=i("
").addClass("dx-loadpanel-content-wrapper"),this._$contentWrapper.appendTo(this._$content),this._togglePaneVisible(),this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage()},_show:function(){var t=this.option("delay");if(!t)return this.callBase();var e=new c,n=this.callBase.bind(this);return this._clearShowTimeout(),this._showTimeout=setTimeout((function(){n().done((function(){e.resolve()}))}),t),e.promise()},_hide:function(){return this._clearShowTimeout(),this.callBase()},_clearShowTimeout:function(){clearTimeout(this._showTimeout)},_renderMessage:function(){if(this._$contentWrapper){var t=this.option("message");if(t){var e=i("
").addClass("dx-loadpanel-message").text(t);this._$contentWrapper.append(e)}}},_renderLoadIndicator:function(){this._$contentWrapper&&this.option("showIndicator")&&(this._$indicator=i("
").addClass("dx-loadpanel-indicator").appendTo(this._$contentWrapper),this._createComponent(this._$indicator,l,{indicatorSrc:this.option("indicatorSrc")}))},_cleanPreviousContent:function(){this.$content().find(".dx-loadpanel-message").remove(),this.$content().find(".dx-loadpanel-indicator").remove()},_togglePaneVisible:function(){this.$content().toggleClass("dx-loadpanel-pane-hidden",!this.option("showPane"))},_optionChanged:function(t){switch(t.name){case"delay":break;case"message":case"showIndicator":this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage();break;case"showPane":this._togglePaneVisible();break;case"indicatorSrc":this._$indicator&&this._createComponent(this._$indicator,l,{indicatorSrc:this.option("indicatorSrc")});break;default:this.callBase(t)}},_dispose:function(){this._clearShowTimeout(),this.callBase()}});a("dxLoadPanel",h),t.exports=h,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(54),o=n(0).extend,r=n(124).chart,a=n(231),s=a.chart.line,l=a.polar.line,u=n(13).map,c=o,d=a.chart.spline._calculateBezierPoints;e.chart={},e.polar={};var h={_createBorderElement:s._createMainElement,_createLegendState:function(t,e){return{fill:t.color||e,opacity:t.opacity,hatching:t.hatching}},getValueRangeInitialValue:function(){return"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType&&!1!==this.showZero?0:r.getValueRangeInitialValue.call(this)},_getDefaultSegment:function(t){var e=s._getDefaultSegment(t);return e.area=e.line.concat(e.line.slice().reverse()),e},_updateElement:function(t,e,n,i){var o={points:e.line},r={points:e.area},a=t.line;n?(a&&a.animate(o),t.area.animate(r,{},i)):(a&&a.attr(o),t.area.attr(r))},_removeElement:function(t){t.line&&t.line.remove(),t.area.remove()},_drawElement:function(t){return{line:this._bordersGroup&&this._createBorderElement(t.line,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),area:this._createMainElement(t.area).append(this._elementsGroup)}},_applyStyle:function(t){this._elementsGroup&&this._elementsGroup.smartAttr(t.elements),this._bordersGroup&&this._bordersGroup.attr(t.border),(this._graphics||[]).forEach((function(e){e.line&&e.line.attr({"stroke-width":t.border["stroke-width"]}).sharp()}))},_parseStyle:function(t,e,n){var i=t.border||{},o=s._parseLineOptions(i,n);return o.stroke=i.visible&&o["stroke-width"]?o.stroke:"none",o["stroke-width"]=o["stroke-width"]||1,{border:o,elements:{stroke:"none",fill:t.color||e,hatching:t.hatching,opacity:t.opacity}}},_areBordersVisible:function(){var t=this._options;return t.border.visible||t.hoverStyle.border.visible||t.selectionStyle.border.visible},_createMainElement:function(t,e){return this._renderer.path(t,"area").attr(e)},_getTrackerSettings:function(t){return{"stroke-width":t.singlePointSegment?this._defaultTrackerWidth:0}},_getMainPointsFromSegment:function(t){return t.area}};var f=e.chart.area=c({},s,h,{_prepareSegment:function(t,e){var n=this._processSinglePointsAreaSegment(t,e),i=function(t){return u(t,(function(t){return t.getCoords()})).concat(u(t.slice().reverse(),(function(t){return t.getCoords(!0)})))}(n),o=this.getArgumentAxis();if(o.getAxisPosition){var r=o.getAxisPosition(),a=o.getOptions(),s=(e?1:-1)*Math.round(a.width/2);a.visible&&i.forEach((function(n,a){if(n){var l=1===t.length?0:a=",t[0]],s=[u,"<=",t[1]],n(this.dataType)&&(l=t[1]).getHours()+l.getMinutes()+l.getSeconds()+l.getMilliseconds()<1&&(r=new Date(t[1].getTime()),"date"===this.dataType&&r.setDate(t[1].getDate()+1),s=[u,"<",r]),[a,"and",s]},u=function(n,o,a){var s,l,u,c,d=(c=n,i.isDate(c)?[c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds()]:r.map((""+c).split("/"),(function(t,e){return 1===e?Number(t)-1:Number(t)}))),h=e(this,a);switch("headerFilter"===a?u=t.exports.getGroupInterval(this)[d.length-1]:"datetime"===this.dataType&&(u="minute"),u){case"year":s=new Date(d[0],0,1),l=new Date(d[0]+1,0,1);break;case"month":s=new Date(d[0],d[1],1),l=new Date(d[0],d[1]+1,1);break;case"quarter":s=new Date(d[0],3*d[1],1),l=new Date(d[0],3*d[1]+3,1);break;case"hour":s=new Date(d[0],d[1],d[2],d[3]),l=new Date(d[0],d[1],d[2],d[3]+1);break;case"minute":s=new Date(d[0],d[1],d[2],d[3],d[4]),l=new Date(d[0],d[1],d[2],d[3],d[4]+1);break;case"second":s=new Date(d[0],d[1],d[2],d[3],d[4],d[5]),l=new Date(d[0],d[1],d[2],d[3],d[4],d[5]+1);break;default:s=new Date(d[0],d[1],d[2]),l=new Date(d[0],d[1],d[2]+1)}switch(o){case"<":return[h,"<",s];case"<=":return[h,"<",l];case">":return[h,">=",l];case">=":return[h,">=",s];case"<>":return[[h,"<",s],"or",[h,">=",l]];default:return[[h,">=",s],"and",[h,"<",l]]}},c=function(n,o,r){var a=e(this,r),s=t.exports.getGroupInterval(this);if("headerFilter"===r&&s&&i.isDefined(n)){var l=(""+n).split("/"),u=Number(l[l.length-1]);return[[a,">=",u],"and",[a,"<",u+s[l.length-1]]]}return[a,o||"=",n]};return{defaultCalculateFilterExpression:function(t,o,r){var a=this,s=e(a,r),d=a.calculateDisplayValue&&"search"===r,h=d&&a.lookup&&a.lookup.dataType||a.dataType,f=null;if("headerFilter"!==r&&"filterBuilder"!==r||null!==t)if("string"!==h||a.lookup&&!d){if("between"===o)return l.apply(a,[t,r]);if(n(h)&&i.isDefined(t))return u.apply(a,arguments);if("number"===h)return c.apply(a,arguments);"object"!==h&&(f=[s,o||"=",t])}else f=[s,o||"contains",t];else f=[s,o||"=",null],"string"===h&&(f=[f,"="===o?"or":"and",[s,o||"=",""]]);return f},getGroupInterval:function(t){var e,r=[],l=["year","month","day","hour","minute","second"],u=t.headerFilter&&t.headerFilter.groupInterval,c="quarter"===u?"month":u;return n(t.dataType)&&null!==u?(r="datetime"===t.dataType?s:a,(e=o(c,l))>=0?((r=l.slice(0,e)).push(u),r):r):i.isDefined(u)?Array.isArray(u)?u:[u]:void 0}}}()},function(t,e,n){"use strict";var i=C(n(3)),o=C(n(15)),r=n(10),a=C(n(6)),s=C(n(57)),l=C(n(28)),u=C(n(25)),c=C(n(199)),d=C(n(31)),h=n(4),f=C(n(130)),p=n(17),m=C(n(2)),g=n(24),_=C(n(5)),v=n(0),y=C(n(44)),b=n(40),w=C(n(419)),x=n(7);function C(t){return t&&t.__esModule?t:{default:t}}var S={render:function(t){t.container.append(t.content)}},k=function(t){return"auto"===t?"":m.default.isNumeric(t)?t+"px":t},I=function(t,e,n){t.style.width=t.style.maxWidth="auto"===e.width?"":n};e.ColumnsView=y.default.View.inherit(w.default).inherit({_createScrollableOptions:function(){var t=this.option("scrolling"),e=this.option("scrolling.useNative"),n=(0,v.extend)({pushBackValue:0},t,{direction:"both",bounceEnabled:!1,useKeyboard:!1});return void 0===e&&(e=!0),"auto"===e?(delete n.useNative,delete n.useSimulatedScrollbar):(n.useNative=!!e,n.useSimulatedScrollbar=!e),n},_updateCell:function(t,e){e.rowType&&this._cellPrepared(t,e)},_createCell:function(t){var e=t.column,n=e.alignment||(0,g.getDefaultAlignment)(this.option("rtlEnabled")),r=o.default.createElement("td");r.style.textAlign=n;var a=(0,i.default)(r);return"data"===t.rowType&&e.headerId&&!e.type&&this.component.option("showColumnHeaders")&&this.setAria("describedby",e.headerId,a),e.cssClass&&a.addClass(e.cssClass),"expand"===e.command&&(a.addClass(e.cssClass),a.addClass(this.addWidgetPrefix("group-space"))),e.colspan>1?a.attr("colSpan",e.colspan):e.isBand||"auto"===e.visibleWidth||this.option("legacyRendering")||!this.option("columnAutoWidth")||((e.width||e.minWidth)&&(r.style.minWidth=k(e.minWidth||e.width)),e.width&&I(r,e,k(e.width))),a},_createRow:function(t){var e=(0,i.default)("").addClass("dx-row");return this.setAria("role","row",e),e},_isAltRow:function(t){return t&&t.dataIndex%2===1},_createTable:function(t,e){var n=this,o=(0,i.default)("").addClass(n.addWidgetPrefix("table")).addClass(n.addWidgetPrefix("table-fixed"));if(t&&!e?(o.append(n._createColGroup(t)),d.default.safari&&o.append((0,i.default)("").append("")),n.setAria("role","presentation",o)):n.setAria("hidden",!0,o),this.setAria("role","presentation",(0,i.default)("").appendTo(o)),e)return o;d.default.mozilla&&a.default.on(o,"mousedown","td",(function(t){t.ctrlKey&&t.preventDefault()})),n.option("cellHintEnabled")&&a.default.on(o,"mousemove",".dx-row > td",this.createAction((function(t){var e=t.event,o=(0,i.default)(e.target),r=(0,i.default)(e.currentTarget),a=r.parent(),s=a.hasClass("dx-data-row"),l=a.hasClass("dx-header-row"),u=a.hasClass("dx-group-row"),c=a.hasClass("dx-master-detail-row"),h=a.hasClass(n.addWidgetPrefix("filter-row")),f=n._columnsController.getVisibleColumns(),p=a.data("options"),g=r.index(),_=p&&p.cells&&p.cells[g],v=_?_.column:f[g],y=d.default.msie?1:0;c||h||s&&(!s||!v||v.cellTemplate)||l&&(!l||!v||v.headerCellTemplate)||u&&(!u||!v||void 0!==v.groupIndex&&v.groupCellTemplate)||(o.data("dxCellHintVisible")&&(o.removeAttr("title"),o.data("dxCellHintVisible",!1)),o[0].scrollWidth-o[0].clientWidth-y>0&&!m.default.isDefined(o.attr("title"))&&(o.attr("title",o.text()),o.data("dxCellHintVisible",!0)))})));var r=function(t){var e=(0,i.default)(t.currentTarget),o=(0,i.default)(t.target).closest(".dx-field-item-content"),r=e.parent().data("options"),a=r&&r.cells&&r.cells[e.index()];if(e.closest("table").is(t.delegateTarget)){var s=(0,v.extend)({},a,{cellElement:(0,p.getPublicElement)(e),event:t,eventType:t.type});if(o.length){var l=o.data("dx-form-item");l.column&&(s.column=l.column,s.columnIndex=n._columnsController.getVisibleIndex(s.column.index))}return s}};return a.default.on(o,"mouseover",".dx-row > td",(function(t){var e=r(t);e&&n.executeAction("onCellHoverChanged",e)})),a.default.on(o,"mouseout",".dx-row > td",(function(t){var e=r(t);e&&n.executeAction("onCellHoverChanged",e)})),a.default.on(o,u.default.name,".dx-row > td",(function(t){var e=r(t);e&&n.executeAction("onCellClick",e)})),a.default.on(o,c.default.name,".dx-row > td",(function(t){var e=r(t);e&&n.executeAction("onCellDblClick",e)})),function(t,e){var n,o,r;function s(t){return setTimeout((function(){n=o=null}),t)}a.default.on(e,"touchstart touchend",".dx-row",(function(t){clearTimeout(r),"touchstart"===t.type?(n=t.target,o=t.currentTarget,r=s(1e3)):r=s()})),a.default.on(e,[u.default.name,c.default.name,l.default.down].join(" "),".dx-row",{useNative:t._isNativeClick()},t.createAction((function(e){var r=e.event;n&&(r.target=n,r.currentTarget=o),(0,i.default)(r.target).closest("a").length||(e.rowIndex=t.getRowIndex(r.currentTarget),e.rowIndex>=0&&(e.rowElement=(0,p.getPublicElement)((0,i.default)(r.currentTarget)),e.columns=t.getColumns(),r.type===l.default.down?t._rowPointerDown(e):r.type===u.default.name?t._rowClick(e):t._rowDblClick(e)))})))}(n,o),o},_isNativeClick:h.noop,_rowPointerDown:h.noop,_rowClick:h.noop,_rowDblClick:h.noop,_createColGroup:function(t){for(var e=(0,i.default)(""),n=0;n");return f.default.setWidth(n,e),n},renderDelayedTemplates:function(){var t=this._delayedTemplates,e=t.filter((function(t){return!t.async})),n=t.filter((function(t){return t.async}));this._delayedTemplates=[],this._renderDelayedTemplatesCore(e),this._renderDelayedTemplatesCoreAsync(n)},_renderDelayedTemplatesCoreAsync:function(t){var e=this;t.length&&(0,r.getWindow)().setTimeout((function(){e._renderDelayedTemplatesCore(t,!0)}))},_renderDelayedTemplatesCore:function(t,e){for(var n=new Date;t.length;){var r=t.shift(),a=r.options,s=o.default.getDocument();if(e&&!(0,i.default)(a.container).closest(s).length||r.template.render(a),e&&new Date-n>30){this._renderDelayedTemplatesCoreAsync(t);break}}!t.length&&this._delayedTemplates.length&&this.renderDelayedTemplates()},_processTemplate:function(t){var e;if(t&&t.render&&!m.default.isRenderer(t))e={allowRenderToDetachedContainer:t.allowRenderToDetachedContainer,render:function(e){t.render(e.container,e.model),e.deferred&&e.deferred.resolve()}};else if(m.default.isFunction(t))e={render:function(e){var n=t((0,p.getPublicElement)(e.container),e.model);n&&(n.nodeType||m.default.isRenderer(n))&&e.container.append(n),e.deferred&&e.deferred.resolve()}};else{var n=m.default.isString(t)?t:(0,i.default)(t).attr("id");n?(this._templatesCache[n]||(this._templatesCache[n]=this.getTemplate(t)),e=this._templatesCache[n]):e=this.getTemplate(t)}return e},renderTemplate:function(t,e,n,i){var o=this._processTemplate(e,n),r=n.column,a="data"===n.rowType,s=new x.Deferred,l={container:t,model:n,deferred:s,onRendered:function(){s.resolve()}};if(o){n.component=this.component;var u=r&&(r.renderAsync&&a||this.option("renderAsync")&&(!1!==r.renderAsync&&(r.command||r.showEditorAlways)&&a||"filter"===n.rowType));!o.allowRenderToDetachedContainer&&!i||u?this._delayedTemplates.push({template:o,options:l,async:u}):o.render(l)}else s.reject();return s.promise()},_getBodies:function(t){return(0,i.default)(t).children("tbody").not(".dx-header").not(".dx-footer")},_wrapRowIfNeed:function(t,e){var n=this.option("rowTemplate")&&this._getBodies(this._tableElement||t);if(n&&n.filter(".dx-row").length){var o=(0,i.default)("").addClass(e.attr("class"));return this.setAria("role","presentation",o),o.append(e)}return e},_appendRow:function(t,e,n){(n=n||S).render({content:e,container:t})},_resizeCore:function(){var t=this._scrollLeft;t>=0&&(this._scrollLeft=0,this.scrollTo({left:t}))},_renderCore:function(t){var e=this.element().parent();e&&!e.parent().length||this.renderDelayedTemplates(t)},_renderTable:function(t){(t=t||{}).columns=this._columnsController.getVisibleColumns();var e=t.change&&t.change.changeType,n=this._createTable(t.columns,"append"===e||"prepend"===e||"update"===e);return this._renderRows(n,t),n},_renderRows:function(t,e){for(var n=this._getRows(e.change),i=e.change&&e.change.columnIndices||[],o=e.change&&e.change.changeTypes||[],r=0;r=0},_renderCells:function(t,e){for(var n=0,i=e.row,o=e.columns,r=0;r1?n+=o[r].colspan:n++},_updateCells:function(t,e,n){var i=t.children(),o=e.children(),r=this.option("highlightChanges"),a=this.addWidgetPrefix("cell-updated-animation");n.forEach((function(t,e){var n=i.eq(t),s=o.eq(e);n.replaceWith(s),r&&!s.hasClass("dx-command-expand")&&s.addClass(a)})),function(t,e){if(t&&e){var n,i=t.attributes,o=e.attributes;for(n=0;n=0&&n.splice(t,1)}},e.update=e.update||function(e){e&&(this.data=t.data=e.data,this.rowIndex=t.rowIndex=e.rowIndex,this.dataIndex=t.dataIndex=e.dataIndex,this.isExpanded=t.isExpanded=e.isExpanded,t.row&&(t.row=e)),n.forEach((function(t){t(e)}))},e!==t&&(t.watch=e.watch.bind(e)),t}},_cellPrepared:function(t,e){e.cellElement=(0,p.getPublicElement)((0,i.default)(t)),this.executeAction("onCellPrepared",e)},_rowPrepared:function(t,e){s.default.data(t.get(0),"options",e),e.rowElement=(0,p.getPublicElement)(t),this.executeAction("onRowPrepared",e)},_columnOptionChanged:function(t){var e=t.optionNames;if((0,b.checkChanges)(e,["width","visibleWidth"])){var n=this._columnsController.getVisibleColumns(),i=_.default.map(n,(function(t){var e=t.visibleWidth||t.width;return m.default.isDefined(e)?e:"auto"}));this.setColumnWidths({widths:i,optionNames:e})}else this._requireReady||this.render()},getCellIndex:function(t){return t.length?t[0].cellIndex:-1},getTableElements:function(){return this._tableElement||(0,i.default)()},_getTableElement:function(){return this._tableElement},_setTableElement:function(t){this._tableElement=t},optionChanged:function(t){switch(this.callBase(t),t.name){case"cellHintEnabled":case"onCellPrepared":case"onRowPrepared":case"onCellHoverChanged":this._invalidate(!0,!0),t.handled=!0}},init:function(){var t=this;t._scrollLeft=-1,t._columnsController=t.getController("columns"),t._dataController=t.getController("data"),t._delayedTemplates=[],t._templatesCache={},t.createAction("onCellClick"),t.createAction("onRowClick"),t.createAction("onCellDblClick"),t.createAction("onRowDblClick"),t.createAction("onCellHoverChanged",{excludeValidators:["disabled","readOnly"]}),t.createAction("onCellPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),t.createAction("onRowPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering",afterExecute:function(e){t._afterRowPrepared(e)}}),t._columnsController.columnsChanged.add(t._columnOptionChanged.bind(t)),t._dataController&&t._dataController.changed.add(t._handleDataChanged.bind(t))},_afterRowPrepared:h.noop,_handleDataChanged:function(){},callbackNames:function(){return["scrollChanged"]},scrollTo:function(t){var e=this.element(),n=e&&e.children("."+this.addWidgetPrefix("scroll-container")).not("."+this.addWidgetPrefix("content-fixed"));m.default.isDefined(t)&&m.default.isDefined(t.left)&&this._scrollLeft!==t.left&&(this._scrollLeft=t.left,n&&n.scrollLeft(t.left))},_wrapTableInScrollContainer:function(t){var e=this,n=(0,i.default)("
");return a.default.on(n,"scroll",(function(){var t=n.scrollLeft();t!==e._scrollLeft&&e.scrollChanged.fire({left:t},e.name)})),n.addClass(this.addWidgetPrefix("content")).addClass(this.addWidgetPrefix("scroll-container")).append(t).appendTo(this.element()),this.setAria("role","presentation",n),n},_updateContent:function(t){this._setTableElement(t),this._wrapTableInScrollContainer(t)},_findContentElement:h.noop,_getWidths:function(t){var e,n=[],i=this.option("legacyRendering");return t&&_.default.each(t,(function(t,o){if(e=o.offsetWidth,o.getBoundingClientRect){var r=(0,g.getBoundingRect)(o);r.width>e-1&&(e=i?Math.ceil(r.width):r.width)}n.push(e)})),n},getColumnWidths:function(t){var e,n,i=[];if((this.option("forceApplyBindings")||h.noop)(),t=t||this._getTableElement()){e=t.children("tbody").children();for(var o=0;o=0&&(n=i.eq(o)),n&&n.length)return n},_getRowElement:function(t){var e=this,n=(0,i.default)(),o=e.getTableElements();if(_.default.each(o,(function(o,r){n=n.add(e._getRowElements((0,i.default)(r)).eq(t))})),n.length)return n},getCellElement:function(t,e){return(0,p.getPublicElement)(this._getCellElement(t,e))},getRowElement:function(t){var e=this._getRowElement(t),n=[];if(e&&!(0,p.getPublicElement)(e).get)for(var i=0;i0&&t.rowIndex>=0&&("virtual"!==this.option("scrolling.mode")&&(t.rowIndex=t.rowIndex0))return n.eq(n.length>t.columnIndex?t.columnIndex:n.length-1)},getRowsCount:function(){var t=this._getTableElement();return t&&1===t.length?t[0].rows.length:0},_getRowElementsCore:function(t){if(t=t||this._getTableElement()){var e=this.option("rowTemplate")&&t.find("> tbody.dx-row");return e&&e.length?e:t.find("> tbody > .dx-row, > .dx-row")}return(0,i.default)()},_getRowElements:function(t){return this._getRowElementsCore(t)},getRowIndex:function(t){return this._getRowElements().index(t)},getBoundingRect:function(){},getName:function(){},setScrollerSpacing:function(t){var e=this.element(),n=this.option("rtlEnabled");e&&e.css({paddingLeft:n?t:"",paddingRight:n?"":t})},isScrollbarVisible:function(t){var e=this.element(),n=this._tableElement;return!(!e||!n)&&(t?n.outerWidth()-e.width()>0:n.outerHeight()-e.height()>0)}})},function(t,e,n){"use strict";var i=n(6),o=n(17),r=n(15),a=n(21),s=n(114),l=n(25),u=n(11),c=u.addNamespace(l.name,"dxDblClick");s("dxdblclick",new(a.inherit({ctor:function(){this._handlerCount=0,this._forgetLastClick()},_forgetLastClick:function(){this._firstClickTarget=null,this._lastClickTimeStamp=-300},add:function(){this._handlerCount<=0&&i.on(r.getDocument(),c,this._clickHandler.bind(this)),this._handlerCount++},_clickHandler:function(t){var e=t.timeStamp||Date.now();e-this._lastClickTimeStamp<300?(u.fireEvent({type:"dxdblclick",target:o.closestCommonParent(this._firstClickTarget,t.target),originalEvent:t}),this._forgetLastClick()):(this._firstClickTarget=t.target,this._lastClickTimeStamp=e)},remove:function(){this._handlerCount--,this._handlerCount<=0&&(this._forgetLastClick(),i.off(r.getDocument(),c))}}))),e.name="dxdblclick"},function(t,e,n){"use strict";t.exports=n(450),t.exports.show=n(295).show,t.exports.hide=n(295).hide,t.exports.default=t.exports},function(t,e,n){"use strict";var i=h(n(3)),o=h(n(167)),r=h(n(109)),a=h(n(297)),s=n(0),l=n(10),u=h(n(474)),c=h(n(475)),d=n(104);function h(t){return t&&t.__esModule?t:{default:t}}function f(t){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var n=0;n").addClass("dx-diagram-toolbar").appendTo(this._$element)}},{key:"_getCommands",value:function(){return this.option("commands")||[]}},{key:"_renderToolbar",value:function(t){var e=this._commands.filter((function(t){return-1===["after","center"].indexOf(t.position)})),n=this._commands.filter((function(t){return"center"===t.position})),i=this._commands.filter((function(t){return"after"===t.position})),r=[].concat(this._prepareToolbarItems(e,"before",this._executeCommand)).concat(this._prepareToolbarItems(n,"center",this._executeCommand)).concat(this._prepareToolbarItems(i,"after",this._executeCommand));this._toolbarInstance=this._createComponent(t,o.default,{dataSource:r})}},{key:"_prepareToolbarItems",value:function(t,e,n){var i=this;return t.map((function(t){return(0,s.extend)(!0,{location:e,locateInMenu:i.option("locateInMenu")},i._createItem(t,e,n),i._createItemOptions(t),i._createItemActionOptions(t,n))}))}},{key:"_createItem",value:function(t,e,n){var o=this;return(t.getCommandValue||t.getEditorValue||t.getEditorDisplayValue)&&(this._valueConverters[t.command]={getCommandValue:t.getCommandValue,getEditorValue:t.getEditorValue,getEditorDisplayValue:t.getEditorDisplayValue}),"separator"===t.widget?{template:function(t,e,n){(0,i.default)(n).addClass("dx-diagram-toolbar-separator")},menuItemTemplate:function(t,e,n){(0,i.default)(n).addClass("dx-diagram-toolbar-menu-separator")}}:{widget:t.widget||"dxButton",cssClass:t.cssClass,options:{stylingMode:this.option("buttonStylingMode"),type:this.option("buttonType"),text:t.text,hint:t.hint,icon:t.icon||t.iconUnchecked||t.iconChecked,iconChecked:t.iconChecked,iconUnchecked:t.iconUnchecked,onInitialized:function(e){return o._onItemInitialized(e.component,t)},onContentReady:function(e){return o._onItemContentReady(e.component,t,n)}}}}},{key:"_createItemOptions",value:function(t){var e=t.widget,n=t.command,i=t.items,o=t.valueExpr,r=t.displayExpr,a=t.showText,s=t.hint,l=t.icon;return"dxSelectBox"===e?this._createSelectBoxItemOptions(n,s,i,o,r):"dxTextBox"===e?this._createTextBoxItemOptions(n,s):"dxColorBox"===e?this._createColorBoxItemOptions(n,s,l):e&&"dxButton"!==e?void 0:{showText:a||"inMenu"}}},{key:"_createSelectBoxItemOptions",value:function(t,e,n,o,r){var a=this._createTextEditorItemOptions(e);return a=(0,s.extend)(!0,a,{options:{dataSource:n,displayExpr:r||"text",valueExpr:o||"value"}}),n&&n.every((function(t){return void 0!==t.icon}))&&(a=(0,s.extend)(!0,a,{options:{fieldTemplate:function(t,e){(0,i.default)("").addClass(t&&t.icon).appendTo(e),(0,i.default)("
").dxTextBox({readOnly:!0,stylingMode:"outlined"}).appendTo(e)},itemTemplate:function(t,e,n){return(0,i.default)(n).attr("title",t.hint),'')}}})),a}},{key:"_createTextBoxItemOptions",value:function(t,e){var n=this,i=this._createTextEditorItemOptions(e);return i=(0,s.extend)(!0,i,{options:{readOnly:!0,focusStateEnabled:!1,hoverStateEnabled:!1,buttons:[{name:"dropDown",location:"after",options:{icon:"spindown",disabled:!1,stylingMode:"text",onClick:function(e){var i=n._commandContextMenus[t];i&&n._toggleContextMenu(i)}}}]}})}},{key:"_createColorBoxItemOptions",value:function(t,e,n){var o=this,r=this._createTextEditorItemOptions(e);return n&&(r=(0,s.extend)(!0,r,{options:{openOnFieldClick:!0,fieldTemplate:function(t,e){(0,i.default)("").addClass(n).css("borderBottomColor",t).appendTo(e),(0,i.default)("
").dxTextBox({readOnly:!0,stylingMode:"outlined"}).appendTo(e)}}})),r=(0,s.extend)(!0,r,{options:{onOpened:function(){o.option("isMobileView")&&(0,i.default)("body").addClass("dx-diagram-mobile-toolbar-color-box-opened")},onClosed:function(){(0,i.default)("body").removeClass("dx-diagram-mobile-toolbar-color-box-opened")}}})}},{key:"_createTextEditorItemOptions",value:function(t){return{options:{stylingMode:this.option("editorStylingMode"),hint:t}}}},{key:"_createItemActionOptions",value:function(t,e){var n=this;switch(t.widget){case"dxSelectBox":case"dxColorBox":case"dxCheckBox":return{options:{onValueChanged:function(i){var o=c.default.getItemCommandParameter(n,t,i.component.option("value"));e.call(n,t.command,t.name,o)}}};case"dxTextBox":return{};default:return{options:{onClick:function(i){if(t.items){var o=i.component._contextMenu;o&&n._toggleContextMenu(o)}else{var r=c.default.getItemCommandParameter(n,t);e.call(n,t.command,t.name,r)}}}}}}},{key:"_toggleContextMenu",value:function(t){this._contextMenuList.forEach((function(e){t!==e&&e.hide()})),t.toggle()}},{key:"_onItemInitialized",value:function(t,e){this._addItemHelper(e.command,new k(t))}},{key:"_onItemContentReady",value:function(t,e,n){var o=this,a=(0,d.getDiagram)().Browser;if(("dxButton"===t.NAME||"dxTextBox"===t.NAME)&&e.items){var s=(0,i.default)("
").appendTo(this.$element());t._contextMenu=this._createComponent(s,r.default,{items:e.items,target:t.$element(),cssClass:c.default.getContextMenuCssClass(),showEvent:"",closeOnOutsideClick:!a.TouchUI,focusStateEnabled:!1,position:{at:"left bottom"},itemTemplate:function(t,e,n){c.default.getContextMenuItemTemplate(this,t,e,n)},onItemClick:function(t){var e=t.component,i=t.itemData;c.default.onContextMenuItemClick(o,i,n.bind(o)),i.items&&i.items.length||e.hide()},onShowing:function(t){o._showingSubMenu||(o._showingSubMenu=t.component,o._onSubMenuVisibilityChangingAction({visible:!0,component:o}),t.component.option("items",t.component.option("items")),delete o._showingSubMenu)},onInitialized:function(n){var i=n.component;return o._onContextMenuInitialized(i,e,t)},onDisposing:function(t){var n=t.component;return o._onContextMenuDisposing(n,e)}})}}},{key:"_onContextMenuInitialized",value:function(t,e,n){this._contextMenuList.push(t),e.command&&(this._commandContextMenus[e.command]=t),this._addContextMenuHelper(e,t,[],n)}},{key:"_addItemHelper",value:function(t,e){if(void 0!==t){if(this._itemHelpers[t])throw new Error("Toolbar cannot contain duplicated commands.");this._itemHelpers[t]=e}}},{key:"_addContextMenuHelper",value:function(t,e,n,i){var o=this;t.items&&t.items.forEach((function(t,r){var a=n.concat(r);o._addItemHelper(t.command,new I(e,a,t.command,i)),o._addContextMenuHelper(t,e,a,i)}))}},{key:"_onContextMenuDisposing",value:function(t,e){this._contextMenuList.splice(this._contextMenuList.indexOf(t),1),delete this._commandContextMenus[e.command]}},{key:"_executeCommand",value:function(t,e,n){if(!this._updateLocked){if("number"===typeof t){var i=this._valueConverters[t];i&&i.getCommandValue&&(n=i.getCommandValue(n)),this.bar.raiseBarCommandExecuted(t,n)}else"string"===typeof t&&this._onInternalCommandAction({command:t});void 0!==e&&this._onCustomCommandAction({name:e})}}},{key:"_createOnInternalCommand",value:function(){this._onInternalCommandAction=this._createActionByOption("onInternalCommand")}},{key:"_createOnCustomCommand",value:function(){this._onCustomCommandAction=this._createActionByOption("onCustomCommand")}},{key:"_setItemEnabled",value:function(t,e){if(t in this._itemHelpers){var n=this._itemHelpers[t];n.canUpdate(this._showingSubMenu)&&n.setEnabled(e)}}},{key:"_setEnabled",value:function(t){this._toolbarInstance.option("disabled",!t),this._contextMenuList.forEach((function(e){e.option("disabled",!t)}))}},{key:"_setItemValue",value:function(t,e){try{if(this._updateLocked=!0,t in this._itemHelpers){var n=this._itemHelpers[t];if(n.canUpdate(this._showingSubMenu)){var i,o=this._valueConverters[t];o&&o.getEditorValue&&(e=o.getEditorValue(e)),o&&o.getEditorDisplayValue&&(i=o.getEditorDisplayValue(e));var r=this._commandContextMenus[t];n.setValue(e,i,r,r&&t)}}}finally{this._updateLocked=!1}}},{key:"_setItemSubItems",value:function(t,e){if(this._updateLocked=!0,t in this._itemHelpers){var n=this._itemHelpers[t];if(n.canUpdate(this._showingSubMenu)){var i=this._commandContextMenus[t];n.setItems(e,i,i&&t)}}this._updateLocked=!1}},{key:"_createOnSubMenuVisibilityChangingAction",value:function(){this._onSubMenuVisibilityChangingAction=this._createActionByOption("onSubMenuVisibilityChanging")}},{key:"_optionChanged",value:function(t){switch(t.name){case"isMobileView":(0,i.default)("body").removeClass("dx-diagram-mobile-toolbar-color-box-opened"),this._invalidate();break;case"onSubMenuVisibilityChanging":this._createOnSubMenuVisibilityChangingAction();break;case"onInternalCommand":this._createOnInternalCommand();break;case"onCustomCommand":this._createOnCustomCommand();break;case"commands":this._invalidate();break;case"export":break;default:_(x(n.prototype),"_optionChanged",this).call(this,t)}}},{key:"_getDefaultOptions",value:function(){return(0,s.extend)(_(x(n.prototype),"_getDefaultOptions",this).call(this),{isMobileView:!1,export:{fileName:"Diagram",proxyUrl:void 0},locateInMenu:"auto",buttonStylingMode:"text",buttonType:"normal",editorStylingMode:"filled",skipAdjustSize:!1})}},{key:"setCommandChecked",value:function(t,e){this._setItemValue(t,e)}},{key:"setCommandEnabled",value:function(t,e){this._setItemEnabled(t,e)}}]),n}(u.default),S=function(t){v(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"getCommandKeys",value:function(){return this._getKeys(this._owner._commands)}},{key:"setItemValue",value:function(t,e){this._owner._setItemValue(t,e)}},{key:"setItemEnabled",value:function(t,e){this._owner._setItemEnabled(t,e)}},{key:"setEnabled",value:function(t){this._owner._setEnabled(t)}},{key:"setItemSubItems",value:function(t,e){this._owner._setItemSubItems(t,e)}}]),n}(a.default),k=function(){function t(e){p(this,t),this._widget=e}return g(t,[{key:"canUpdate",value:function(t){return void 0===t}},{key:"setEnabled",value:function(t){this._widget.option("disabled",!t)}},{key:"setValue",value:function(t,e,n,i){"value"in this._widget.option()?this._updateEditorValue(t,e):void 0!==t&&this._updateButtonValue(t),n&&this._updateContextMenuItemValue(n,"",i,t)}},{key:"setItems",value:function(t,e,n){e?this._updateContextMenuItems(e,"",n,t):this._updateEditorItems(t)}},{key:"_updateContextMenuItems",value:function(t,e,n,i){c.default.updateContextMenuItems(t,e,n,i)}},{key:"_updateEditorItems",value:function(t){"items"in this._widget.option()&&this._widget.option("items",t.map((function(t){return{value:c.default.getItemValue(t),text:t.text}})))}},{key:"_updateEditorValue",value:function(t,e){this._widget.option("value",t),!this._widget.option("selectedItem")&&e&&this._widget.option("value",e)}},{key:"_updateButtonValue",value:function(t){this._widget.option("iconChecked")&&this._widget.option("iconUnchecked")?this._widget.option("icon",t?this._widget.option("iconChecked"):this._widget.option("iconUnchecked")):this._widget.$element().toggleClass("dx-format-active",t)}},{key:"_updateContextMenuItemValue",value:function(t,e,n,i){c.default.updateContextMenuItemValue(t,e,n,i)}}]),t}(),I=function(t){v(n,t);var e=b(n);function n(t,i,o,r){var a;return p(this,n),(a=e.call(this,t))._indexPath=i,a._rootCommandKey=o,a._rootWidget=r,a}return g(n,[{key:"canUpdate",value:function(t){return _(x(n.prototype),"canUpdate",this).call(this,t)||t===this._widget}},{key:"setEnabled",value:function(t){this._widget.option(this._getItemOptionText()+"disabled",!t);var e=this._hasEnabledCommandItems(this._widget.option("items"));this._rootWidget.option("disabled",!e)}},{key:"_hasEnabledCommandItems",value:function(t){var e=this;return!!t&&t.some((function(t){return void 0!==t.command&&!t.disabled||e._hasEnabledCommandItems(t.items)}))}},{key:"setValue",value:function(t){this._updateContextMenuItemValue(this._widget,this._getItemOptionText(),this._rootCommandKey,t)}},{key:"setItems",value:function(t){this._updateContextMenuItems(this._widget,this._getItemOptionText(),this._rootCommandKey,t)}},{key:"_getItemOptionText",value:function(){return c.default.getItemOptionText(this._widget,this._indexPath)}}]),n}(k);t.exports=C},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.LIST_ITEM_DATA_KEY="dxListItemData",e.FIXED_CONTAINER_CLASS="dx-scheduler-fixed-appointments",e.LIST_ITEM_CLASS="dx-list-item",e.REDUCED_APPOINTMENT_CLASS="dx-scheduler-appointment-reduced",e.REDUCED_APPOINTMENT_ICON="dx-scheduler-appointment-reduced-icon",e.RECURRENCE_APPOINTMENT_CLASS="dx-scheduler-appointment-recurrence",e.EMPTY_APPOINTMENT_CLASS="dx-scheduler-appointment-empty",e.ALL_DAY_APPOINTMENT_CLASS="dx-scheduler-all-day-appointment",e.REDUCED_APPOINTMENT_PARTS_CLASSES={head:"dx-scheduler-appointment-head",body:"dx-scheduler-appointment-body",tail:"dx-scheduler-appointment-tail"},e.DIRECTION_APPOINTMENT_CLASSES={horizontal:"dx-scheduler-appointment-horizontal",vertical:"dx-scheduler-appointment-vertical"},e.AGENDA_LAST_IN_DATE_APPOINTMENT_CLASS="dx-scheduler-last-in-date-agenda-appointment"},function(t,e,n){"use strict";var i=n(0).extend;function o(){}var r=[function(t,e){t.smartAttr(e)},function(t,e){t.outer.attr({stroke:e.stroke,"stroke-width":e["stroke-width"],"stroke-opacity":e["stroke-opacity"]}),t.inner.smartAttr({fill:e.fill,opacity:e.opacity,hatching:e.hatching})}];i(o.prototype,{value:0,isNode:function(){return!!(this.nodes&&this.level=t.minLevel&&this.level<=t.maxLevel},updateStyles:function(){var t=Number(this.isNode());this.state=this._buildState(this.ctx.settings[t].state,!t&&this.color&&{fill:this.color})},_buildState:function(t,e){var n=i({},t);return e?i(n,e):n},updateLabelStyle:function(){var t=this.ctx.settings[Number(this.isNode())];this.labelState=t.labelState,this.labelParams=t.labelParams},_getState:function(){return this.state},applyState:function(){r[Number(this.isNode())](this.tile,this._getState())}}),t.exports=o},function(t,e,n){"use strict";var i=n(22),o=n(314),r=n(317),a=n(318),s=n(126);function l(t){s.call(this,"digest"),this._hash=t}i(l,s),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new o:"rmd160"===t||"ripemd160"===t?new r:new l(a(t))}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=t.isBuffer}).call(this,n(52).Buffer)},function(t,e,n){(function(e){t.exports=function(t,n){for(var i=Math.min(t.length,n.length),o=new e(i),r=0;r=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-n,this.endian);for(var o=0;o>>24&255,i[o++]=t>>>16&255,i[o++]=t>>>8&255,i[o++]=255&t}else for(i[o++]=255&t,i[o++]=t>>>8&255,i[o++]=t>>>16&255,i[o++]=t>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,r=8;r0?t=parseInt(t.replace("px","")):t.indexOf("%")>0?t=parseInt(t.replace("%",""))*function(t){return o.isWindow(t)?t.innerHeight:t.offsetHeight}(e)/100:isNaN(t)||(t=parseInt(t)),t},u=function(t,e,n){return t?r.indexOf(t)>-1?e?null:t:(o.isString(t)&&(t=l(t,n)),o.isNumeric(t)?Math.max(0,t+e):"calc("+t+(e<0?" - ":" ")+Math.abs(e)+"px)"):null};e.getSize=function(t,e,n){var o=i.getComputedStyle(t),r=s(e,o),a=t.getClientRects().length,l=t.getBoundingClientRect()[e],u=a?l:0;return u<=0?(u=parseFloat(o[e]||t.style[e])||0,u-=function(t,e,n){var i=e[t];return"border-box"===e.boxSizing&&i.length&&"%"!==i[i.length-1]?n.border+n.padding:0}(e,o,r)):u-=r.padding+r.border,n.paddings&&(u+=r.padding),n.borders&&(u+=r.border),n.margins&&(u+=r.margin),u},e.getElementBoxParams=s,e.addOffsetToMaxHeight=function(t,e,n){var i=u(t,e,n);return null!==i?i:"none"},e.addOffsetToMinHeight=function(t,e,n){var i=u(t,e,n);return null!==i?i:0},e.getVerticalOffsets=function(t,e){if(!t)return 0;var n=s("height",i.getComputedStyle(t));return n.padding+n.border+(e?n.margin:0)},e.getVisibleHeight=function(t){if(t){var e=t.getBoundingClientRect();if(e.height)return e.height}return 0},e.parseHeight=l},function(t,e,n){"use strict";var i=n(10),o=n(15),r=n(39),a=n(77),s=n(113),l=function(){var t,e=r(),n=e.add,l=e.remove;if(!i.hasWindow())return e;var u,c=function(){var t=i.getWindow();return{width:t.innerWidth,height:t.innerHeight}},d=function(){var n,i=c();i.width===t.width&&i.height===t.height||(i.width===t.width&&(n="height"),i.height===t.height&&(n="width"),t=i,e.fire(n))},h=s((function(){t=c()}));return e.add=function(){var t=n.apply(e,arguments);return h(),a.add((function(){!u&&e.has()&&(u=o.listen(i.getWindow(),"resize",d))})),t},e.remove=function(){var t=l.apply(e,arguments);return!e.has()&&u&&(u(),u=void 0),t},e}();t.exports=l},function(t,e,n){"use strict";var i=n(6),o=n(31),r=n(15),a=n(21),s=n(11),l=a.inherit({ctor:function(t,e){this._eventName=t,this._originalEvents=s.addNamespace(e,"dxPointerEvents"),this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble:function(){var t=this._eventName;return"dxpointerenter"===t||"dxpointerleave"===t},_handler:function(t){var e=this._getDelegateTarget(t);return this._fireEvent({type:this._eventName,pointerType:t.pointerType||s.eventSource(t),originalEvent:t,delegateTarget:e,timeStamp:o.mozilla?(new Date).getTime():t.timeStamp})},_getDelegateTarget:function(t){var e;return this.noBubble&&(e=t.delegateTarget),e},_fireEvent:function(t){return s.fireEvent(t)},_setSelector:function(t){this._selector=this.noBubble&&t?t.selector:null},_getSelector:function(){return this._selector},setup:function(){return!0},add:function(t,e){if(this._handlerCount<=0||this.noBubble){t=this.noBubble?t:r.getDocument(),this._setSelector(e);var n=this;i.on(t,this._originalEvents,this._getSelector(),(function(t){n._handler(t)}))}this.noBubble||this._handlerCount++},remove:function(t){this._setSelector(t),this.noBubble||this._handlerCount--},teardown:function(t){this._handlerCount&&!this.noBubble||(t=this.noBubble?t:r.getDocument(),".dxPointerEvents"!==this._originalEvents&&i.off(t,this._originalEvents,this._getSelector()))},dispose:function(t){t=this.noBubble?t:r.getDocument(),i.off(t,this._originalEvents)}});t.exports=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=f(n(3)),o=f(n(69)),r=n(0),a=n(2),s=f(n(190)),l=n(60),u=n(7),c=n(363),d=n(15),h=n(4);function f(t){return t&&t.__esModule?t:{default:t}}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=o.default.inherit({_getDefaultOptions:function(){return(0,r.extend)(this.callBase(),{repaintChangesOnly:!1})},ctor:function(){var t=this;this.callBase.apply(this,arguments),this._customizeStoreLoadOptions=function(e){var n=t._dataSource;n&&!n.isLoaded()&&(t._correctionIndex=0),t._correctionIndex&&e.storeLoadOptions&&(e.storeLoadOptions.skip+=t._correctionIndex)},this._dataSource&&this._dataSource.on("customizeStoreLoadOptions",this._customizeStoreLoadOptions)},reload:function(){this._correctionIndex=0},_init:function(){this.callBase(),this._refreshItemsCache(),this._correctionIndex=0},_findItemElementByKey:function(t){var e=this,n=(0,i.default)(),o=this.key();return this.itemElements().each((function(r,a){var s=(0,i.default)(a),u=e._getItemData(s);if(o?(0,l.keysEqual)(o,e.keyOf(u),t):e._isItemEquals(u,t))return n=s,!1})),n},_dataSourceChangedHandler:function(t,e){e&&e.changes?this._modifyByChanges(e.changes):this.callBase(t,e)},_isItemEquals:function(t,e){t&&t.__dx_key__&&(t=t.data);try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return t===e}},_partialRefresh:function(){var t=this;if(this.option("repaintChangesOnly")){var e=(0,c.findChanges)(this._itemsCache,this._editStrategy.itemsGetter(),(function(e){return e&&void 0!==e.__dx_key__?e.__dx_key__:t.keyOf(e)}),this._isItemEquals);if(e&&this._itemsCache.length)return this._modifyByChanges(e,!0),this._renderEmptyMessage(),!0;this._refreshItemsCache()}return!1},_refreshItemsCache:function(){if(this.option("repaintChangesOnly")){var t=this._editStrategy.itemsGetter();try{this._itemsCache=(0,r.extend)(!0,[],t),this.key()||(this._itemsCache=this._itemsCache.map((function(e,n){var i;return p(i={},"__dx_key__",t[n]),p(i,"data",e),i})))}catch(e){this._itemsCache=(0,r.extend)([],t)}}},_dispose:function(){this._dataSource&&this._dataSource.off("customizeStoreLoadOptions",this._customizeStoreLoadOptions),this.callBase()},_updateByChange:function(t,e,n,i){var o=this;if(i)this._renderItem(n.index,n.data,null,this._findItemElementByKey(n.key));else{var r=e[s.default.indexByKey(t,e,n.key)];r&&s.default.update(t,e,n.key,n.data).done((function(){o._renderItem(e.indexOf(r),r,null,o._findItemElementByKey(n.key))}))}},_insertByChange:function(t,e,n,i){var o=this;(0,u.when)(i||s.default.insert(t,e,n.data,n.index)).done((function(){o._beforeItemElementInserted(n),o._renderItem((0,a.isDefined)(n.index)?n.index:e.length,n.data),o._afterItemElementInserted(),o._correctionIndex++}))},_updateSelectionAfterRemoveByChange:function(t){var e=this.option("selectedIndex");e>t?this.option("selectedIndex",e-1):e===t&&1===this.option("selectedItems").length?this.option("selectedItems",[]):this._normalizeSelectedItems()},_beforeItemElementInserted:function(t){var e=this.option("selectedIndex");t.index<=e&&this.option("selectedIndex",e+1)},_afterItemElementInserted:h.noop,_removeByChange:function(t,e,n,i){var o=this,r=i?n.index:s.default.indexByKey(t,e,n.key);if(i?n.oldItem:e[r]){var a=this._findItemElementByKey(n.key),l=this._extendActionArgs(a);this._waitDeletingPrepare(a).done((function(){i?(o._updateIndicesAfterIndex(r-1),o._afterItemElementDeleted(a,l),o._updateSelectionAfterRemoveByChange(r)):(o._deleteItemElementByIndex(r),o._afterItemElementDeleted(a,l))})),this._correctionIndex--}},_modifyByChanges:function(t,e){var n=this,i=this._editStrategy.itemsGetter(),o={key:this.key.bind(this),keyOf:this.keyOf.bind(this)},r=this._dataSource,a=r&&r.paginate(),s=r&&r.group();(a||s)&&(t=t.filter((function(t){return"insert"!==t.type||void 0!==t.index}))),t.forEach((function(t){return n["_".concat(t.type,"ByChange")](o,i,t,e)})),this._renderedItemsCount=i.length,this._refreshItemsCache(),this._fireContentReadyAction()},_appendItemToContainer:function(t,e,n){var i=t.children(this._itemSelector()).get(n);(0,d.insertElement)(t.get(0),e.get(0),i)},_optionChanged:function(t){switch(t.name){case"items":this._partialRefresh(t.value)||this.callBase(t);break;case"dataSource":this.option("repaintChangesOnly")&&t.value||this.option("items",[]),this.callBase(t);break;case"repaintChangesOnly":break;default:this.callBase(t)}}})},function(t,e,n){"use strict";var i=n(6),o=n(57),r=n(21),a=n(18),s=n(114),l=n(11),u=n(28),c=l.addNamespace(u.enter,"dxHoverStart"),d=l.addNamespace(u.leave,"dxHoverEnd"),h=r.inherit({noBubble:!0,ctor:function(){this._handlerArrayKeyPath=this._eventNamespace+"_HandlerStore"},setup:function(t){o.data(t,this._handlerArrayKeyPath,{})},add:function(t,e){var n=this,r=function(t){n._handler(t)};i.on(t,this._originalEventName,e.selector,r),o.data(t,this._handlerArrayKeyPath)[e.guid]=r},_handler:function(t){l.isTouchEvent(t)||a.isSimulator()||l.fireEvent({type:this._eventName,originalEvent:t,delegateTarget:t.delegateTarget})},remove:function(t,e){var n=o.data(t,this._handlerArrayKeyPath)[e.guid];i.off(t,this._originalEventName,e.selector,n)},teardown:function(t){o.removeData(t,this._handlerArrayKeyPath)}}),f=h.inherit({ctor:function(){this._eventNamespace="dxHoverStart",this._eventName="dxhoverstart",this._originalEventName=c,this.callBase()},_handler:function(t){(t.pointers||[]).length||this.callBase(t)}}),p=h.inherit({ctor:function(){this._eventNamespace="dxHoverEnd",this._eventName="dxhoverend",this._originalEventName=d,this.callBase()}});s("dxhoverstart",new f),s("dxhoverend",new p),e.start="dxhoverstart",e.end="dxhoverend"},function(t,e,n){"use strict";var i=n(21),o=n(2),r=n(5),a=n(29).compileGetter,s=n(29).toComparable,l=n(7).Deferred,u=n(78),c=n(60),d=i.inherit({toArray:function(){var t=[];for(this.reset();this.next();)t.push(this.current());return t},countable:function(){return!1}}),h=d.inherit({ctor:function(t){this.array=t,this.index=-1},next:function(){return this.index+1e?1:0},g=d.inherit({ctor:function(t,e,n,i){t instanceof p||(t=new p(t,this._wrap)),this.iter=t,this.rules=[{getter:e,desc:n,compare:i}]},thenBy:function(t,e,n){var i=new g(this.sortedIter||this.iter,t,e,n);return this.sortedIter||(i.rules=this.rules.concat(i.rules)),i},next:function(){return this._ensureSorted(),this.sortedIter.next()},current:function(){return this._ensureSorted(),this.sortedIter.current()},reset:function(){delete this.sortedIter},countable:function(){return this.sortedIter||this.iter.countable()},count:function(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted:function(){var t=this;t.sortedIter||(r.each(t.rules,(function(){this.getter=a(this.getter)})),t.sortedIter=new p(new h(this.iter.toArray().sort((function(e,n){return t._compare(e,n)}))),t._unwrap))},_wrap:function(t,e){return{index:e,value:t}},_unwrap:function(t){return t.value},_compare:function(t,e){var n=t.index,i=e.index;if((t=t.value)===(e=e.value))return n-i;for(var o=0,r=this.rules.length;o1&&n!==i)throw new u.errors.Error("E4019");e.push(_(this)),n=i,i=!0}else i=c.isConjunctiveOperator(this)})),function(t){for(var i=n,o=0;o":return e(i,r,!0);case">":return function(t){return s(i(t))>r};case"<":return function(t){return s(i(t))=":return function(t){return s(i(t))>=r};case"<=":return function(t){return s(i(t))<=r};case"startswith":return function(e){return 0===s(t(i(e))).indexOf(r)};case"endswith":return function(e){var n=s(t(i(e))),o=t(r);return!(n.length-1};case"notcontains":return function(e){return-1===s(t(i(e))).indexOf(r)}}throw u.errors.Error("E4003",o)}(n)}}(),v=f.inherit({ctor:function(t,e){this.callBase(t),this.criteria=_(e)},next:function(){for(;this.iter.next();)if(this.criteria(this.current()))return!0;return!1}}),y=d.inherit({ctor:function(t,e){this.iter=t,this.getter=e},next:function(){return this._ensureGrouped(),this.groupedIter.next()},current:function(){return this._ensureGrouped(),this.groupedIter.current()},reset:function(){delete this.groupedIter},countable:function(){return!!this.groupedIter},count:function(){return this.groupedIter.count()},_ensureGrouped:function(){if(!this.groupedIter){var t={},e=[],n=this.iter,i=a(this.getter);for(n.reset();n.next();){var o=n.current(),s=i(o);s in t?t[s].push(o):(t[s]=[o],e.push(s))}this.groupedIter=new h(r.map(e,(function(e){return{key:e,items:t[e]}})))}}}),b=f.inherit({ctor:function(t,e){this.callBase(t),this.getter=a(e)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),w=f.inherit({ctor:function(t,e,n){this.callBase(t),this.skip=Math.max(0,e),this.take=Math.max(0,n),this.pos=0},next:function(){if(this.pos>=this.skip+this.take)return!1;for(;this.pos-1?this._collectionWidget._itemElements().eq(t):null},_itemsFromSameParent:function(){return!0}});t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeNameParts=function(){for(var t=[],e=0;e").addClass("dx-resizable-handle").addClass("dx-resizable-handle-"+t).appendTo(this.$element());this._handles.push(e)},_attachEventHandlers:function(){if(!this.option("disabled")){var t={};t[x]=this._dragStartHandler.bind(this),t[C]=this._dragHandler.bind(this),t[S]=this._dragEndHandler.bind(this),this._handles.forEach((function(e){p.default.on(e,t,{direction:"both",immediate:!0})}))}},_detachEventHandlers:function(){this._handles.forEach((function(t){p.default.off(t)}))},_toggleEventHandlers:function(t){t?this._attachEventHandlers():this._detachEventHandlers()},_dragStartHandler:function(t){var e=this.$element();if(e.is(".dx-state-disabled, .dx-state-disabled *"))t.cancel=!0;else{this._toggleResizingClass(!0),this._movingSides=this._getMovingSides(t),this._elementLocation=i.default.locate(e);var n=(0,g.getBoundingRect)(e.get(0));this._elementSize={width:n.width,height:n.height},this._renderDragOffsets(t),this._resizeStartAction({event:t,width:this._elementSize.width,height:this._elementSize.height,handles:this._movingSides}),t.targetElements=null}},_toggleResizingClass:function(t){this.$element().toggleClass("dx-resizable-resizing",t)},_renderDragOffsets:function(t){var e=this._getArea();if(e){var n=(0,a.default)(t.target).closest(".dx-resizable-handle"),i=n.outerWidth(),o=n.outerHeight(),r=n.offset(),s=e.offset,l=this._getAreaScrollOffset();t.maxLeftOffset=r.left-s.left-l.scrollX,t.maxRightOffset=s.left+e.width-r.left-i+l.scrollX,t.maxTopOffset=r.top-s.top-l.scrollY,t.maxBottomOffset=s.top+e.height-r.top-o+l.scrollY}},_getBorderWidth:function(t,e){if(h.default.isWindow(t.get(0)))return 0;var n=t.css(k[e]);return parseInt(n)||0},_dragHandler:function(t){var e=this.$element(),n=this._movingSides,o=this._elementLocation,r=this._elementSize,a=this._getOffset(t),s=r.width+a.x*(n.left?-1:1),l=r.height+a.y*(n.top?-1:1);(a.x||"strict"===this.option("stepPrecision"))&&this._renderWidth(s),(a.y||"strict"===this.option("stepPrecision"))&&this._renderHeight(l);var u=(0,g.getBoundingRect)(e.get(0)),c=a.y-((u.height||l)-l),d=a.x-((u.width||s)-s);i.default.move(e,{top:o.top+(n.top?c:0),left:o.left+(n.left?d:0)}),this._resizeAction({event:t,width:this.option("width")||s,height:this.option("height")||l,handles:this._movingSides}),v.default.triggerResizeEvent(e)},_getOffset:function(t){var e=t.offset,n=l.default.pairToObject(this.option("step"),!this.option("roundStepValue")),i=this._getMovingSides(t),o="strict"===this.option("stepPrecision");return i.left||i.right||(e.x=0),i.top||i.bottom||(e.y=0),o?this._getStrictOffset(e,n,i):this._getSimpleOffset(e,n)},_getSimpleOffset:function(t,e){return{x:t.x-t.x%e.h,y:t.y-t.y%e.v}},_getStrictOffset:function(t,e,n){var i=this._elementLocation,o=this._elementSize,r=n.left?i.left:i.left+o.width,a=n.top?i.top:i.top+o.height,s=(r+t.x)%e.h,l=(a+t.y)%e.v,u=Math.sign||function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},c=function(t,e){return(1+.2*u(e))%1*t},d=function(t,e){return Math.abs(t)<.2*e},h=t.x-s,f=t.y-l;return s>c(e.h,t.x)&&(h+=e.h),l>c(e.v,t.y)&&(f+=e.v),{x:!n.left&&!n.right||d(t.x,e.h)?0:h,y:!n.top&&!n.bottom||d(t.y,e.v)?0:f}},_getMovingSides:function(t){var e=(0,a.default)(t.target),n=e.hasClass("dx-resizable-handle-corner-top-left"),i=e.hasClass("dx-resizable-handle-corner-top-right"),o=e.hasClass("dx-resizable-handle-corner-bottom-left"),r=e.hasClass("dx-resizable-handle-corner-bottom-right");return{top:e.hasClass("dx-resizable-handle-top")||n||i,left:e.hasClass("dx-resizable-handle-left")||n||o,bottom:e.hasClass("dx-resizable-handle-bottom")||o||r,right:e.hasClass("dx-resizable-handle-right")||i||r}},_getArea:function(){var t=this.option("area");return w(t)&&(t=t.call(this)),b(t)?this._getAreaFromObject(t):this._getAreaFromElement(t)},_getAreaScrollOffset:function(){var t=this.option("area"),e={scrollY:0,scrollX:0};if(!w(t)&&!b(t)){var n=(0,a.default)(t)[0];h.default.isWindow(n)&&(e.scrollX=n.pageXOffset,e.scrollY=n.pageYOffset)}return e},_getAreaFromObject:function(t){var e={width:t.right-t.left,height:t.bottom-t.top,offset:{left:t.left,top:t.top}};return this._correctAreaGeometry(e),e},_getAreaFromElement:function(t){var e,n=(0,a.default)(t);return n.length&&(e={width:n.innerWidth(),height:n.innerHeight(),offset:(0,u.extend)({top:0,left:0},h.default.isWindow(n[0])?{}:n.offset())},this._correctAreaGeometry(e,n)),e},_correctAreaGeometry:function(t,e){var n=e?this._getBorderWidth(e,"left"):0,i=e?this._getBorderWidth(e,"top"):0;t.offset.left+=n+this._getBorderWidth(this.$element(),"left"),t.offset.top+=i+this._getBorderWidth(this.$element(),"top"),t.width-=this.$element().outerWidth()-this.$element().innerWidth(),t.height-=this.$element().outerHeight()-this.$element().innerHeight()},_dragEndHandler:function(t){var e=this.$element();this._resizeEndAction({event:t,width:e.outerWidth(),height:e.outerHeight(),handles:this._movingSides}),this._toggleResizingClass(!1)},_renderWidth:function(t){this.option("width",(0,d.fitIntoRange)(t,this.option("minWidth"),this.option("maxWidth")))},_renderHeight:function(t){this.option("height",(0,d.fitIntoRange)(t,this.option("minHeight"),this.option("maxHeight")))},_optionChanged:function(t){switch(t.name){case"disabled":this._toggleEventHandlers(!t.value),this.callBase(t);break;case"handles":this._invalidate();break;case"minWidth":case"maxWidth":f.default.hasWindow()&&this._renderWidth(this.$element().outerWidth());break;case"minHeight":case"maxHeight":f.default.hasWindow()&&this._renderHeight(this.$element().outerHeight());break;case"onResize":case"onResizeStart":case"onResizeEnd":this._renderActions();break;case"area":case"stepPrecision":case"step":case"roundStepValue":break;default:this.callBase(t)}},_clean:function(){this.$element().find(".dx-resizable-handle").remove()},_useTemplates:function(){return!1}});(0,o.default)("dxResizable",I),t.exports=I,t.exports.default=t.exports},function(t,e,n){"use strict";var i=k(n(3)),o=k(n(6)),r=k(n(45)),a=k(n(8)),s=n(4),l=n(91),u=n(5),c=n(2),d=n(0),h=n(17),f=k(n(23)),p=n(90),m=n(24),g=k(n(664)),_=k(n(20)),v=n(12),y=n(11),b=k(n(102)),w=k(n(25)),x=k(n(18)),C=n(132),S=k(n(48));function k(t){return t&&t.__esModule?t:{default:t}}var I="ios"===x.default.current().platform,T=b.default.inherit({_supportedKeys:function(){return(0,d.extend)({},this.callBase(),{tab:function(t){if(this.option("opened"))if("instantly"!==this.option("applyValueMode")){var e=t.shiftKey?this._getLastPopupElement():this._getFirstPopupElement();e&&o.default.trigger(e,"focus"),t.preventDefault()}else this.close()},escape:function(t){return this.option("opened")&&t.preventDefault(),this.close(),!0},upArrow:function(t){return t.preventDefault(),t.stopPropagation(),!t.altKey||(this.close(),!1)},downArrow:function(t){return t.preventDefault(),t.stopPropagation(),!t.altKey||(this._validatedOpening(),!1)},enter:function(t){return this.option("opened")&&(t.preventDefault(),this._valueChangeEventHandler(t)),!0}})},_getDefaultButtons:function(){return this.callBase().concat([{name:"dropDown",Ctor:g.default}])},_getDefaultOptions:function(){return(0,d.extend)(this.callBase(),{value:null,onOpened:null,onClosed:null,opened:!1,acceptCustomValue:!0,applyValueMode:"instantly",deferRendering:!0,activeStateEnabled:!0,dropDownButtonTemplate:"dropDownButton",fieldTemplate:null,openOnFieldClick:!1,showDropDownButton:!0,buttons:void 0,dropDownOptions:{showTitle:!1},popupPosition:this._getDefaultPopupPosition(),onPopupInitialized:null,applyButtonText:(0,v.format)("OK"),cancelButtonText:(0,v.format)("Cancel"),buttonsLocation:"default",useHiddenSubmitElement:!1})},_getDefaultPopupPosition:function(t){var e=(0,m.getDefaultAlignment)(t);return{offset:{h:0,v:-1},my:e+" top",at:e+" bottom",collision:"flip flip"}},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(t){return"generic"===t.platform},options:{popupPosition:{offset:{v:0}}}}])},_inputWrapper:function(){return this.$element().find(".dx-dropdowneditor-input-wrapper")},_init:function(){this.callBase(),this._initVisibilityActions(),this._initPopupInitializedAction(),this._updatePopupPosition(this.option("rtlEnabled")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_updatePopupPosition:function(t){var e=this._getDefaultPopupPosition(t),n=e.my,i=e.at,o=this.option("popupPosition");this.option("popupPosition",(0,d.extend)({},o,{my:n,at:i}))},_initVisibilityActions:function(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]}),this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})},_initPopupInitializedAction:function(){this._popupInitializedAction=this._createActionByOption("onPopupInitialized",{excludeValidators:["disabled","readOnly"]})},_initMarkup:function(){this._renderSubmitElement(),this.callBase(),this.$element().addClass("dx-dropdowneditor"),this.setAria("role","combobox")},_render:function(){this.callBase(),this._renderOpenHandler(),this._attachFocusOutHandler(),this._renderOpenedState()},_renderContentImpl:function(){this.option("deferRendering")||this._createPopup()},_renderInput:function(){this.callBase(),this.$element().wrapInner((0,i.default)("
").addClass("dx-dropdowneditor-input-wrapper")),this._$container=this.$element().children().eq(0),this._setDefaultAria()},_setDefaultAria:function(){this.setAria({haspopup:"true",autocomplete:"list"})},_readOnlyPropValue:function(){return!this.option("acceptCustomValue")||this.callBase()},_cleanFocusState:function(){this.callBase(),this.option("fieldTemplate")&&this._detachFocusEvents()},_getFieldTemplate:function(){return this.option("fieldTemplate")&&this._getTemplateByOption("fieldTemplate")},_renderMask:function(){this.option("fieldTemplate")||this.callBase()},_renderField:function(){var t=this._getFieldTemplate();t&&this._renderTemplatedField(t,this._fieldRenderData())},_renderPlaceholder:function(){!!this._getFieldTemplate()||this.callBase()},_renderValue:function(){this.option("useHiddenSubmitElement")&&this._setSubmitValue(),this.callBase().always(this._renderField.bind(this))},_renderTemplatedField:function(t,e){var n=this,r=(0,l.focused)(this._input()),a=this._$container;this._detachKeyboardEvents();var s=this._$beforeButtonsContainer&&this._$beforeButtonsContainer[0].parentNode,u=this._$afterButtonsContainer&&this._$afterButtonsContainer[0].parentNode;s&&s.removeChild(this._$beforeButtonsContainer[0]),u&&u.removeChild(this._$afterButtonsContainer[0]),this._detachFocusEvents(),a.empty();var c=(0,i.default)("
").addClass("dx-dropdowneditor-field-template-wrapper").appendTo(a);t.render({model:e,container:(0,h.getPublicElement)(c),onRendered:function(){var t=n._input();if(!t.length)throw f.default.Error("E1010");n._refreshEvents(),n._refreshValueChangeEvent(),n._renderFocusState(),r&&o.default.trigger(t,"focus")}}),a.prepend(this._$beforeButtonsContainer),a.append(this._$afterButtonsContainer)},_fieldRenderData:function(){return this.option("value")},_initTemplates:function(){this._templateManager.addDefaultTemplates({dropDownButton:new C.FunctionTemplate((function(t){var e=(0,i.default)("
").addClass("dx-dropdowneditor-icon");(0,i.default)(t.container).append(e)}))}),this.callBase()},_renderOpenHandler:function(){var t=this._inputWrapper(),e=(0,y.addNamespace)(w.default.name,this.NAME),n=this.option("openOnFieldClick");o.default.off(t,e),o.default.on(t,e,this._getInputClickHandler(n)),this.$element().toggleClass("dx-dropdowneditor-field-clickable",n),n&&(this._openOnFieldClickAction=this._createAction(this._openHandler.bind(this)))},_attachFocusOutHandler:function(){var t=this;I&&(this._detachFocusOutEvents(),o.default.on(this._inputWrapper(),(0,y.addNamespace)("focusout",this.NAME),(function(e){var n=e.relatedTarget,o=t.content?(0,i.default)(t.content()).closest(".dx-dropdowneditor-overlay"):t._$popup;n&&t.option("opened")&&(0===(0,i.default)(n).closest(".dx-dropdowneditor-overlay",o).length&&t.close())})))},_detachFocusOutEvents:function(){I&&o.default.off(this._inputWrapper(),(0,y.addNamespace)("focusout",this.NAME))},_getInputClickHandler:function(t){var e=this;return t?function(t){e._executeOpenAction(t)}:function(t){e._focusInput()}},_openHandler:function(){this._toggleOpenState()},_executeOpenAction:function(t){this._openOnFieldClickAction({event:t})},_keyboardEventBindingTarget:function(){return this._input()},_focusInput:function(){return!this.option("disabled")&&(this.option("focusStateEnabled")&&!(0,l.focused)(this._input())&&o.default.trigger(this._input(),"focus"),!0)},_toggleOpenState:function(t){this._focusInput()&&(this.option("readOnly")||(t=arguments.length?t:!this.option("opened"),this.option("opened",t)))},_renderOpenedState:function(){var t=this.option("opened");t&&this._createPopup(),this.$element().toggleClass("dx-dropdowneditor-active",t),this._setPopupOption("visible",t),this.setAria({expanded:t}),this.setAria("owns",t?this._popupContentId:void 0,this.$element())},_createPopup:function(){this._$popup||(this._$popup=(0,i.default)("
").addClass("dx-dropdowneditor-overlay").addClass(this.option("customOverlayCssClass")).appendTo(this.$element()),this._renderPopup(),this._renderPopupContent())},_renderPopupContent:s.noop,_renderPopup:function(){var t=(0,d.extend)(this._popupConfig(),this._options.cache("dropDownOptions"));this._popup=this._createComponent(this._$popup,S.default,t),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this._contentReadyHandler(),this._setPopupContentId(this._popup.$content()),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_setPopupContentId:function(t){this._popupContentId="dx-"+new r.default,this.setAria("id",this._popupContentId,t)},_contentReadyHandler:s.noop,_popupConfig:function(){return{onInitialized:this._popupInitializedHandler(),position:(0,d.extend)(this.option("popupPosition"),{of:this.$element()}),showTitle:this.option("dropDownOptions.showTitle"),width:"auto",height:"auto",shading:!1,closeOnTargetScroll:!0,closeOnOutsideClick:this._closeOutsideDropDownHandler.bind(this),animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,toolbarItems:this._getPopupToolbarItems(),onPositioned:this._popupPositionedHandler.bind(this),fullScreen:!1,contentTemplate:null}},_popupInitializedHandler:function(){var t=this;if(this.option("onPopupInitialized"))return function(e){t._popupInitializedAction({popup:e.component})}},_popupPositionedHandler:function(t){t.position&&this._popup.overlayContent().toggleClass("dx-dropdowneditor-overlay-flipped",t.position.v.flip)},_popupShowingHandler:s.noop,_popupHidingHandler:function(){this.option("opened",!1)},_popupShownHandler:function(){this._openAction(),this._$validationMessage&&this._$validationMessage.dxOverlay("option","position",this._getValidationMessagePosition())},_popupHiddenHandler:function(){this._closeAction(),this._$validationMessage&&this._$validationMessage.dxOverlay("option","position",this._getValidationMessagePosition())},_getValidationMessagePosition:function(){var t="below";if(this._popup&&this._popup.option("visible")){var e=(0,p.setup)(this.$element()).top,n=(0,p.setup)(this._popup.$content()).top;t=e+this.option("popupPosition").offset.v>n?"below":"above"}return this.callBase(t)},_closeOutsideDropDownHandler:function(t){var e=t.target,n=(0,i.default)(e),o=this.getButton("dropDown"),r=o&&o.$element(),a=!!n.closest(this.$element()).length,s=!!n.closest(r).length;return!a&&!s},_clean:function(){delete this._openOnFieldClickAction,this._$popup&&(this._$popup.remove(),delete this._$popup,delete this._popup),this.callBase()},_setPopupOption:function(t,e){this._setWidgetOption("_popup",arguments)},_validatedOpening:function(){this.option("readOnly")||this._toggleOpenState(!0)},_getPopupToolbarItems:function(){return"useButtons"===this.option("applyValueMode")?this._popupToolbarItemsConfig():[]},_getFirstPopupElement:function(){return this._popup._wrapper().find(".dx-popup-done.dx-button")},_getLastPopupElement:function(){return this._popup._wrapper().find(".dx-popup-cancel.dx-button")},_popupElementTabHandler:function(t){var e=(0,i.default)(t.currentTarget);(t.shiftKey&&e.is(this._getFirstPopupElement())||!t.shiftKey&&e.is(this._getLastPopupElement()))&&(o.default.trigger(this._input(),"focus"),t.preventDefault())},_popupElementEscHandler:function(){o.default.trigger(this._input(),"focus"),this.close()},_popupButtonInitializedHandler:function(t){t.component.registerKeyHandler("tab",this._popupElementTabHandler.bind(this)),t.component.registerKeyHandler("escape",this._popupElementEscHandler.bind(this))},_popupToolbarItemsConfig:function(){var t=[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText"),onInitialized:this._popupButtonInitializedHandler.bind(this)}},{shortcut:"cancel",options:{onClick:this._cancelButtonHandler.bind(this),text:this.option("cancelButtonText"),onInitialized:this._popupButtonInitializedHandler.bind(this)}}];return this._applyButtonsLocation(t)},_applyButtonsLocation:function(t){var e=this.option("buttonsLocation"),n=t;if("default"!==e){var i=(0,s.splitPair)(e);(0,u.each)(n,(function(t,e){(0,d.extend)(e,{toolbar:i[0],location:i[1]})}))}return n},_applyButtonHandler:function(){this.close(),this.option("focusStateEnabled")&&this.focus()},_cancelButtonHandler:function(){this.close(),this.option("focusStateEnabled")&&this.focus()},_updatePopupWidth:s.noop,_popupOptionChanged:function(t){var e=_.default.getOptionsFromContainer(t);this._setPopupOption(e),-1!==Object.keys(e).indexOf("width")&&void 0===e.width&&this._updatePopupWidth()},_renderSubmitElement:function(){this.option("useHiddenSubmitElement")&&(this._$submitElement=(0,i.default)("").attr("type","hidden").appendTo(this.$element()))},_setSubmitValue:function(){this._getSubmitElement().val(this.option("value"))},_getSubmitElement:function(){return this.option("useHiddenSubmitElement")?this._$submitElement:this.callBase()},_dispose:function(){this._detachFocusOutEvents(),this.callBase()},_setDeprecatedOptions:function(){this.callBase(),(0,d.extend)(this._deprecatedOptions,{showPopupTitle:{since:"20.1",alias:"dropDownOptions.showTitle"}})},_optionChanged:function(t){switch(t.name){case"opened":this._renderOpenedState();break;case"onOpened":case"onClosed":this._initVisibilityActions();break;case"onPopupInitialized":this._initPopupInitializedAction();break;case"fieldTemplate":(0,c.isDefined)(t.value)?this._renderField():this._invalidate();break;case"acceptCustomValue":case"openOnFieldClick":this._invalidate();break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"dropDownOptions":this._popupOptionChanged(t),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;case"popupPosition":case"deferRendering":break;case"applyValueMode":case"applyButtonText":case"cancelButtonText":case"buttonsLocation":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"showPopupTitle":this._setPopupOption("showTitle",t.value);break;case"useHiddenSubmitElement":this._$submitElement&&(this._$submitElement.remove(),this._$submitElement=void 0),this._renderSubmitElement();break;case"rtlEnabled":this._updatePopupPosition(t.value),this.callBase(t);break;default:this.callBase(t)}},open:function(){this.option("opened",!0)},close:function(){this.option("opened",!1)},field:function(){return(0,h.getPublicElement)(this._input())},content:function(){return this._popup?this._popup.content():null}});(0,a.default)("dxDropDownEditor",T),t.exports=T,t.exports.default=t.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,o=n(3),r=(i=o)&&i.__esModule?i:{default:i};function a(t,e){for(var n=0;n").appendTo(t)}},{key:"_addToContainer",value:function(t){var e=this.$placeMarker,n=this.$container;e?e.replaceWith(t):t.appendTo(n)}},{key:"_attachEvents",value:function(){throw"Not implemented"}},{key:"_create",value:function(){throw"Not implemented"}},{key:"_isRendered",value:function(){return!!this.instance}},{key:"_isVisible",value:function(){var t=this.editor;return this.options.visible||!t.option("readOnly")}},{key:"_isDisabled",value:function(){throw"Not implemented"}},{key:"_shouldRender",value:function(){return this._isVisible()&&!this._isRendered()}},{key:"dispose",value:function(){var t=this.instance,e=this.$placeMarker;t&&(t.dispose?t.dispose():t.remove(),this.instance=null),e&&e.remove()}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$container;if(this.$container=t,this._isVisible()){var e=this._create(),n=e.instance,i=e.$element;this.instance=n,this._attachEvents(n,i)}else this._addPlaceMarker(t)}},{key:"update",value:function(){return this._shouldRender()&&this.render(),!!this.instance}}])&&a(e.prototype,n),i&&a(e,i),t}();e.default=s},function(t,e,n){"use strict";function i(t,e){for(var n=0;nt[this._sizeAttr]()}},{key:"_trySetScrollable",value:function(t,e){var n,i=a(t),o=this._component.option("scrollSensitivity"),r=this.isScrollable(i);return r&&(o>(n=this._calculateDistanceToBorders(i,e))[this._limitProps.start]?this._preventScroll||(this._scrollSpeed=-this._calculateScrollSpeed(n[this._limitProps.start]),this._$scrollableAtPointer=i):o>n[this._limitProps.end]?this._preventScroll||(this._scrollSpeed=this._calculateScrollSpeed(n[this._limitProps.end]),this._$scrollableAtPointer=i):(r=!1,this._preventScroll=!1)),r}},{key:"_calculateDistanceToBorders",value:function(t,e){var n,i=t.get(0);return i?(n=E(i),{left:e.x-n.left,top:e.y-n.top,right:n.right-e.x,bottom:n.bottom-e.y}):{}}},{key:"_calculateScrollSpeed",value:function(t){var e=this._component,n=e.option("scrollSensitivity"),i=e.option("scrollSpeed");return Math.ceil(Math.pow((n-t)/n,2)*i)}},{key:"scrollByStep",value:function(){var t;if(this._$scrollableAtPointer&&this._scrollSpeed){if(this._$scrollableAtPointer.hasClass("dx-scrollable-container")){var e=this._$scrollableAtPointer.closest(".dx-scrollable"),n=e.data("dxScrollable")||e.data("dxScrollView");n&&((t=n.scrollOffset())[this._limitProps.start]+=this._scrollSpeed,n.scrollTo(t))}else t=this._$scrollableAtPointer[this._scrollValue]()+this._scrollSpeed,this._$scrollableAtPointer[this._scrollValue](t);var i=this._component._dragMoveArgs;i&&this._component._dragMoveHandler(i)}}},{key:"reset",value:function(){this._$scrollableAtPointer=null,this._scrollSpeed=0,this._preventScroll=!0}},{key:"isOutsideScrollable",value:function(t,e){if(!t)return!1;var n=E(t.get(0)),i=n[this._limitProps.start],o=n[this._sizeAttr],r=V(e),a="width"===this._sizeAttr?r.x:r.y;return ai+o}}])&&i(e.prototype,n),o&&i(e,o),t}(),j=h.inherit({ctor:function(t){this.callBase(),this._strategy=t},_step:function(){var t=this._strategy._horizontalScrollHelper,e=this._strategy._verticalScrollHelper;t&&t.scrollByStep(),e&&e.scrollByStep()}}),H=g.inherit({reset:C,dragMove:C,dragEnter:C,dragLeave:C,dragEnd:function(t){return this._getSourceDraggable()._fireRemoveEvent(t),(new P).resolve()},_fireRemoveEvent:C,_getDefaultOptions:function(){return m(this.callBase(),{onDragStart:null,onDragMove:null,onDragEnd:null,onDrop:null,immediate:!0,dragDirection:"both",boundary:void 0,boundOffset:0,allowMoveByClick:!1,itemData:null,container:void 0,dragTemplate:void 0,contentTemplate:"content",handle:"",filter:"",clone:!1,autoScroll:!0,scrollSpeed:30,scrollSensitivity:60,group:void 0,data:void 0})},_setOptionsByReference:function(){this.callBase.apply(this,arguments),m(this._optionsByReference,{component:!0,group:!0,itemData:!0,data:!0})},_init:function(){this.callBase(),this._attachEventHandlers(),this._scrollAnimator=new j(this),this._horizontalScrollHelper=new z("horizontal",this),this._verticalScrollHelper=new z("vertical",this)},_normalizeCursorOffset:function(t){return x.isObject(t)&&(t={h:t.x,v:t.y}),{left:(t=k.splitPair(t).map((function(t){return parseFloat(t)})))[0],top:1===t.length?t[0]:t[1]}},_getNormalizedCursorOffset:function(t,e){return x.isFunction(t)&&(t=t.call(this,e)),this._normalizeCursorOffset(t)},_calculateElementOffset:function(t){var e,n,i=t.event,o=a(t.itemElement),r=a(t.dragElement),s=this._dragElementIsCloned(),l=this.option("cursorOffset"),u={left:0,top:0},c=this._initialLocate=d.locate(r);return(s||t.initialOffset||l)&&(e=t.initialOffset||o.offset(),l&&(u=this._getNormalizedCursorOffset(l,t),isFinite(u.left)&&(e.left=i.pageX),isFinite(u.top)&&(e.top=i.pageY)),n=r.offset(),e.top-=n.top+(u.top||0)-c.top,e.left-=n.left+(u.left||0)-c.left),e},_initPosition:function(t){var e=a(t.dragElement),n=this._calculateElementOffset(t);n&&this._move(n,e),this._startPosition=d.locate(e)},_startAnimator:function(){this._scrollAnimator.inProgress()||this._scrollAnimator.start()},_stopAnimator:function(){this._scrollAnimator.stop()},_addWidgetPrefix:function(t){var e=this.NAME;return p(e)+(t?"-"+t:"")},_getItemsSelector:function(){return this.option("filter")||""},_$content:function(){var t=this.$element(),e=t.children(".dx-template-wrapper");return e.length?e:t},_attachEventHandlers:function(){var t=this;if(!this.option("disabled")){var e=this._$content(),n=this._getItemsSelector(),i=this.option("allowMoveByClick"),o={direction:this.option("dragDirection"),immediate:this.option("immediate"),checkDropTarget:function(e,n){var i=t.option("group"),o=t._getSourceDraggable().option("group"),r=t._getScrollable(e);return!t._verticalScrollHelper.isOutsideScrollable(r,n)&&!t._horizontalScrollHelper.isOutsideScrollable(r,n)&&(o&&o===i)}};i&&(e=this._getArea(),l.on(e,F,o,this._pointerDownHandler.bind(this))),">"===n[0]&&(n=n.slice(1)),l.on(e,A,n,o,this._dragStartHandler.bind(this)),l.on(e,R,o,this._dragMoveHandler.bind(this)),l.on(e,B,o,this._dragEndHandler.bind(this)),l.on(e,N,o,this._dragEnterHandler.bind(this)),l.on(e,L,o,this._dragLeaveHandler.bind(this))}},_dragElementIsCloned:function(){return this._$dragElement&&this._$dragElement.hasClass(this._addWidgetPrefix("clone"))},_getDragTemplateArgs:function(t,e){return{container:_(e),model:{itemData:this.option("itemData"),itemElement:_(t)}}},_createDragElement:function(t){var e=t,n=this.option("clone"),i=this._getContainer(),o=this.option("dragTemplate");return o?(o=this._getTemplate(o),e=a("
").appendTo(i),o.render(this._getDragTemplateArgs(t,e))):n&&(e=a("
").appendTo(i),t.clone().css({width:t.css("width"),height:t.css("height")}).appendTo(e)),e.toggleClass(this._addWidgetPrefix("clone"),e.get(0)!==t.get(0)).toggleClass("dx-rtl",this.option("rtlEnabled"))},_resetDragElement:function(){this._dragElementIsCloned()?this._$dragElement.remove():this._toggleDraggingClass(!1),this._$dragElement=null},_resetSourceElement:function(){this._toggleDragSourceClass(!1),this._$sourceElement=null},_detachEventHandlers:function(){l.off(this._$content(),"."+D),l.off(this._getArea(),"."+D)},_move:function(t,e){d.move(e||this._$dragElement,t)},_getDraggableElement:function(t){var e=this._getSourceElement();if(e)return e;if(this.option("allowMoveByClick"))return this.$element();var n=a(t&&t.target),i=this._getItemsSelector();if(">"===i[0]){var o=this._$content().find(i);o.is(n)||(n=n.closest(o))}return n},_getSourceElement:function(){return this._getSourceDraggable()._$sourceElement},_pointerDownHandler:function(t){if(!v.needSkipEvent(t)){var e={},n=this.$element(),i=this.option("dragDirection");"horizontal"!==i&&"both"!==i||(e.left=t.pageX-n.offset().left+d.locate(n).left-n.width()/2),"vertical"!==i&&"both"!==i||(e.top=t.pageY-n.offset().top+d.locate(n).top-n.height()/2),this._move(e,n),this._getAction("onDragMove")(this._getEventArgs(t))}},_isValidElement:function(t,e){var n=this.option("handle"),i=a(t.originalEvent&&t.originalEvent.target);return!(n&&!i.closest(n).length)&&(!!e.length&&!e.is(".dx-state-disabled, .dx-state-disabled *"))},_dragStartHandler:function(t){var e=this._getDraggableElement(t);if(!this._$sourceElement)if(this._isValidElement(t,e)){var n=this._getDragStartArgs(t,e);if(this._getAction("onDragStart")(n),n.cancel)t.cancel=!0;else{this.option("itemData",n.itemData),this._setSourceDraggable(),this._$sourceElement=e;var i=e.offset(),o=this._$dragElement=this._createDragElement(e);this._toggleDraggingClass(!0),this._toggleDragSourceClass(!0);var r="fixed"===o.css("position");this._initPosition(m({},n,{dragElement:o.get(0),initialOffset:r&&i}));var a=this._getArea(),s=this._getAreaOffset(a),l=this._getBoundOffset(),u=a.outerWidth(),c=a.outerHeight(),d=o.width(),h=o.height(),f=o.offset().left-s.left,p=o.offset().top-s.top;a.length&&(t.maxLeftOffset=f-l.left,t.maxRightOffset=u-f-d-l.right,t.maxTopOffset=p-l.top,t.maxBottomOffset=c-p-h-l.bottom),this.option("autoScroll")&&this._startAnimator()}}else t.cancel=!0},_getAreaOffset:function(t){var e=t&&w.offset(t);return e||{left:0,top:0}},_toggleDraggingClass:function(t){this._$dragElement&&this._$dragElement.toggleClass(this._addWidgetPrefix("dragging"),t)},_toggleDragSourceClass:function(t,e){var n=e||this._$sourceElement;n&&n.toggleClass(this._addWidgetPrefix("source"),t)},_getBoundOffset:function(){var t=this.option("boundOffset");return x.isFunction(t)&&(t=t.call(this)),u.quadToObject(t)},_getArea:function(){var t=this.option("boundary");return x.isFunction(t)&&(t=t.call(this)),a(t)},_getContainer:function(){var t=this.option("container");return void 0===t&&(t=S.value()),a(t)},_dragMoveHandler:function(t){if(this._dragMoveArgs=t,this._$dragElement){var e=t.offset,n=this._startPosition;this._move({left:n.left+e.x,top:n.top+e.y}),this._updateScrollable(t);var i=this._getEventArgs(t);if(this._getAction("onDragMove")(i),!0!==i.cancel)this._getTargetDraggable().dragMove(t)}else t.cancel=!0},_updateScrollable:function(t){if(this.option("autoScroll")){var e=V(t),n=this.getElementsFromPoint(e);this._verticalScrollHelper.updateScrollable(n,e),this._horizontalScrollHelper.updateScrollable(n,e)}},getElementsFromPoint:function(t,e){var n=(e||this._$dragElement.get(0)).ownerDocument;if(f.msie){var i=n.msElementsFromPoint(t.x,t.y);return i?Array.prototype.slice.call(i):[]}return n.elementsFromPoint(t.x,t.y)},_getScrollable:function(t){var e,n=this;return t.parents().toArray().some((function(t){var i=a(t);if(n._horizontalScrollHelper.isScrollable(i)||n._verticalScrollHelper.isScrollable(i))return e=i,!0})),e},_defaultActionArgs:function(){var t=this.callBase.apply(this,arguments),e=this.option("component");return e&&(t.component=e,t.element=e.element()),t},_getEventArgs:function(t){var e=this._getSourceDraggable(),n=this._getTargetDraggable();return{event:t,itemData:e.option("itemData"),itemElement:_(e._$sourceElement),fromComponent:e.option("component")||e,toComponent:n.option("component")||n,fromData:e.option("data"),toData:n.option("data")}},_getDragStartArgs:function(t,e){var n=this._getEventArgs(t);return{event:n.event,itemData:n.itemData,itemElement:e,fromData:n.fromData}},_revertItemToInitialPosition:function(){!this._dragElementIsCloned()&&this._move(this._initialLocate,this._$sourceElement)},_dragEndHandler:function(t){var e=this,n=new P,i=this._getEventArgs(t),o=this._getEventArgs(t),r=this._getTargetDraggable(),a=!0;try{this._getAction("onDragEnd")(i)}finally{O(M(i.cancel)).done((function(t){if(!t&&(r!==e&&r._getAction("onDrop")(o),!o.cancel))return a=!1,void O(M(r.dragEnd(i))).always(n.resolve);n.resolve()})).fail(n.resolve),n.done((function(){a&&e._revertItemToInitialPosition(),e.reset(),r.reset(),e._stopAnimator(),e._horizontalScrollHelper.reset(),e._verticalScrollHelper.reset(),e._resetDragElement(),e._resetSourceElement(),e._resetTargetDraggable(),e._resetSourceDraggable()}))}},_isTargetOverAnotherDraggable:function(t){var e=this,n=this._getSourceDraggable();if(this===n)return!1;if(!n._dragElementIsCloned())return!0;var i=n.$element();return this.getElementsFromPoint({x:t.pageX,y:t.pageY},t.target).filter((function(t){return a(t).hasClass(e._addWidgetPrefix())}))[0]!==i.get(0)},_dragEnterHandler:function(t){this._isTargetOverAnotherDraggable(t)&&this._setTargetDraggable(),this._getSourceDraggable().dragEnter(t)},_dragLeaveHandler:function(t){this._resetTargetDraggable(),this!==this._getSourceDraggable()&&this.reset(),this._getSourceDraggable().dragLeave(t)},_getAction:function(t){return this["_"+t+"Action"]||this._createActionByOption(t)},_getAnonymousTemplateName:function(){return"content"},_initTemplates:function(){this.option("contentTemplate")&&(this._templateManager.addDefaultTemplates({content:new I}),this.callBase.apply(this,arguments))},_render:function(){this.callBase(),this.$element().addClass(this._addWidgetPrefix());var t=this._templateManager.anonymousTemplateName===this.option("contentTemplate"),e=this._getTemplateByOption("contentTemplate");e&&a(e.render({container:this.element(),transclude:t}))},_optionChanged:function(t){var e=t.name;switch(e){case"onDragStart":case"onDragMove":case"onDragEnd":case"onDrop":this["_"+e+"Action"]=this._createActionByOption(e);break;case"dragTemplate":case"contentTemplate":case"container":case"clone":break;case"allowMoveByClick":case"dragDirection":case"disabled":case"boundary":case"filter":case"immediate":this._resetDragElement(),this._detachEventHandlers(),this._attachEventHandlers();break;case"autoScroll":this._verticalScrollHelper.reset(),this._horizontalScrollHelper.reset();break;case"scrollSensitivity":case"scrollSpeed":case"boundOffset":case"handle":case"group":case"data":case"itemData":break;default:this.callBase(t)}},_getTargetDraggable:function(){return o||this},_getSourceDraggable:function(){return r||this},_setTargetDraggable:function(){var t=this.option("group"),e=this._getSourceDraggable();t&&t===e.option("group")&&(o=this)},_setSourceDraggable:function(){r=this},_resetSourceDraggable:function(){r=null},_resetTargetDraggable:function(){o=null},_dispose:function(){this.callBase(),this._detachEventHandlers(),this._resetDragElement(),this._resetTargetDraggable(),this._resetSourceDraggable(),this._$sourceElement=null,this._stopAnimator()}});c(D,H),t.exports=H,t.exports.default=t.exports},function(t,e,n){"use strict";var i=c(n(3)),o=c(n(15)),r=c(n(10)),a=c(n(6)),s=c(n(23)),l=c(n(2)),u=n(152);function c(t){return t&&t.__esModule?t:{default:t}}var d=r.default.getWindow(),h=r.default.getNavigator(),f={EXCEL:"xlsx",CSS:"css",PNG:"png",JPEG:"jpeg",GIF:"gif",SVG:"svg",PDF:"pdf"},p=e.MIME_TYPES={CSS:"text/css",EXCEL:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PNG:"image/png",JPEG:"image/jpeg",GIF:"image/gif",SVG:"image/svg+xml",PDF:"application/pdf"};e.fileSaver={_revokeObjectURLTimeout:3e4,_getDataUri:function(t,e){var n=this._getMimeType(t);return"data:".concat(n,";base64,").concat(e)},_getMimeType:function(t){return p[t]||"application/octet-stream"},_linkDownloader:function(t,e){var n=o.default.createElement("a");return n.download=t,n.href=e,n.target="_blank",n},_formDownloader:function(t,e,n,o){var r={method:"post",action:t,enctype:"multipart/form-data"},s=(0,i.default)("
").css({display:"none"}).attr(r);s.append(''),s.append(''),s.append(''),s.appendTo("body"),a.default.trigger(s,"submit"),a.default.trigger(s,"submit")&&s.remove()},_saveByProxy:function(t,e,n,i){var o=this._getMimeType(n);return this._formDownloader(t,e,o,i)},_winJSBlobSave:function(t,e,n){var i=new Windows.Storage.Pickers.FileSavePicker;i.suggestedStartLocation=Windows.Storage.Pickers.PickerLocationId.documentsLibrary;var o=f[n];if(o){var r=this._getMimeType(n);i.fileTypeChoices.insert(r,["."+o])}i.suggestedFileName=e,i.pickSaveFileAsync().then((function(e){e&&e.openAsync(Windows.Storage.FileAccessMode.readWrite).then((function(e){var n=t.msDetachStream();Windows.Storage.Streams.RandomAccessStream.copyAsync(n,e).then((function(){e.flushAsync().done((function(){n.close(),e.close()}))}))}))}))},_click:function(t){try{t.dispatchEvent(new MouseEvent("click",{cancelable:!0}))}catch(n){var e=o.default.getDocument().createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,d,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}},_saveBlobAs:function(t,e,n){var i=this;if(this._blobSaved=!1,l.default.isDefined(h.msSaveOrOpenBlob))h.msSaveOrOpenBlob(n,t),this._blobSaved=!0;else if(l.default.isDefined(d.WinJS))this._winJSBlobSave(n,t,e),this._blobSaved=!0;else{var o=d.URL||d.webkitURL||d.mozURL||d.msURL||d.oURL;if(l.default.isDefined(o)){var r=o.createObjectURL(n),a=this._linkDownloader(t,r);setTimeout((function(){o.revokeObjectURL(r),i._objectUrlRevoked=!0}),this._revokeObjectURLTimeout),this._click(a)}else u.logger.warn("window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL is not defined")}},saveAs:function(t,e,n,i,o){var r=f[e];if(r&&(t+="."+r),l.default.isDefined(i)&&s.default.log("W0001","Export","proxyURL","19.2","This option is no longer required"),o)this._saveByProxy(i,t,e,n);else if(l.default.isFunction(d.Blob))this._saveBlobAs(t,e,n);else if(l.default.isDefined(i)&&!l.default.isDefined(h.userAgent.match(/iPad/i)))this._saveByProxy(i,t,e,n);else{l.default.isDefined(h.userAgent.match(/iPad/i))||s.default.log("E1034");var a=this._linkDownloader(t,this._getDataUri(e,n));this._click(a)}}}},function(t,e,n){"use strict";var i=n(162).dxBaseGauge,o=n(2),r=n(5).each,a=n(0).extend,s=o.isDefined,l=Array.isArray,u=o.isNumeric,c=n(226),d=n(13).map,h=n(13).normalizeEnum,f=n(162).compareArrays,p=isFinite,m=Number,g=Math.min,_=Math.max,v=a,y=r,b=n(4).noop,w=[1,2,5];function x(t,e){return null===t?t:p(t)?m(t):e}function C(t){return l(t)?t:u(t)?[t]:null}function S(t){return t?t.value:null}function k(t,e,n){for(var i=t[e],o=l(n)?d(n,S):[],r=0,a=o.length,s=[];r0&&e.width>0,i=t.minorTick,o=i.visible&&i.length>0&&i.width>0,r=t.label,s=Number(r.indentFromTick);if(!n&&!o&&!r.visible)return{};var l=this._scale.measureLabels(a({},this._canvas)),u=this._getScaleLayoutValue(),c={min:u,max:u},d=this._getTicksCoefficients(t),h=d.inner,f=d.outer;return n&&(c.min=g(c.min,u-h*e.length),c.max=_(c.max,u+f*e.length)),o&&(c.min=g(c.min,u-h*i.length),c.max=_(c.max,u+f*i.length)),r.visible&&this._correctScaleIndents(c,s,l),c},_renderContent:function(){var t=this,e=t._prepareScaleSettings();t._rangeContainer.render(v(t._getOption("rangeContainer"),{vertical:t._area.vertical})),t._renderScale(e);var n=d([t._rangeContainer].concat(t._prepareValueIndicators()),(function(t){return t&&t.enabled?t:null}));t._applyMainLayout(n,t._measureScale(e)),y(n,(function(e,n){n.resize(t._getElementLayout(n.getOffset()))})),t._shiftScale(t._getElementLayout(0),e),t._beginValueChanging(),t._updateActiveElements(),t._endValueChanging()},_prepareScaleSettings:function(){var t=this,e=t.option("scale"),n=a(!0,{},t._themeManager.theme("scale"),e);return n.label.indentFromAxis=0,n.isHorizontal=!t._area.vertical,n.forceUserTickInterval|=s(e)&&s(e.tickInterval)&&!s(e.scaleDivisionFactor),n.axisDivisionFactor=n.scaleDivisionFactor||t._gridSpacingFactor,n.minorAxisDivisionFactor=n.minorScaleDivisionFactor||5,n.numberMultipliers=w,n.tickOrientation=t._getTicksOrientation(n),n.label.useRangeColors&&(n.label.customizeColor=function(){return t._rangeContainer.getColorForValue(this.value)}),n},_renderScale:function(t){var e=this._translator.getDomain(),n=e[0],i=e[1],o=this._translator.getCodomain(),r=n>i,s=g(n,i),l=_(n,i);t.min=s,t.max=l,t.startAngle=90-o[0],t.endAngle=90-o[1],t.skipViewportExtending=!0,this._scale.updateOptions(t),this._scale.setBusinessRange({axisType:"continuous",dataType:"numeric",min:s,max:l,invert:r}),this._updateScaleTickIndent(t),this._scaleGroup.linkAppend(),this._scale.draw(a({},this._canvas))},_updateIndicatorSettings:function(t){t.currentValue=t.baseValue=p(this._translator.translate(t.baseValue))?m(t.baseValue):this._baseValue,t.vertical=this._area.vertical,t.text&&!t.text.format&&(t.text.format=this._defaultFormatOptions)},_prepareIndicatorSettings:function(t,e){var n=this._themeManager.theme("valueIndicators"),i=h(t.type||this._themeManager.theme(e)),o=v(!0,{},n._default,n[i],t);return o.type=i,o.animation=this._animationSettings,o.containerBackgroundColor=this._containerBackgroundColor,this._updateIndicatorSettings(o),o},_cleanValueIndicators:function(){this._valueIndicator&&this._valueIndicator.clean(),this._subvalueIndicatorsSet&&this._subvalueIndicatorsSet.clean()},_prepareValueIndicators:function(){return this._prepareValueIndicator(),null!==this.__subvalues&&this._prepareSubvalueIndicators(),[this._valueIndicator,this._subvalueIndicatorsSet]},_updateActiveElements:function(){this._updateValueIndicator(),this._updateSubvalueIndicators()},_prepareValueIndicator:function(){var t=this._valueIndicator,e=this._prepareIndicatorSettings(this.option("valueIndicator")||{},"valueIndicatorType");t&&t.type!==e.type&&(t.dispose(),t=null),t||(t=this._valueIndicator=this._createIndicator(e.type,this._renderer.root,"dxg-value-indicator","value-indicator")),t.render(e)},_createSubvalueIndicatorsSet:function(){var t=this,e=t._renderer.root;return new D({createIndicator:function(n,i){return t._createIndicator(n,e,"dxg-subvalue-indicator","subvalue-indicator",i)},createPalette:function(e){return t._themeManager.createPalette(e)}})},_prepareSubvalueIndicators:function(){var t=this._subvalueIndicatorsSet,e=this._prepareIndicatorSettings(this.option("subvalueIndicator")||{},"subvalueIndicatorType");t||(t=this._subvalueIndicatorsSet=this._createSubvalueIndicatorsSet());var n=e.type!==t.type;t.type=e.type;var i=this._createIndicator(e.type,this._renderer.root);i&&(i.dispose(),t.render(e,n))},_setupValue:function(t){this.__value=x(t,this.__value)},_setupSubvalues:function(t){var e,n,i,o=void 0===t?this.__subvalues:C(t);if(null!==o){for(e=0,n=o.length,i=[];et){for(e=t,n=r;e=0&&it(t,e);e--);for(e=0;e1&&void 0!==arguments[1]?arguments[1]:1;return t.sharp(this._getSharpParam(),e)},customPositionIsAvailable:function(){return!1},getOrthogonalAxis:_.noop,getCustomPosition:_.noop,getCustomBoundaryPosition:_.noop,resolveOverlappingForCustomPositioning:_.noop,hasCustomPosition:function(){return!1},customPositionIsBoundaryOrthogonalAxis:function(){return!1},getResolvedBoundaryPosition:function(){return this.getOptions().position},getAxisSharpDirection:function(){var t=this.getResolvedBoundaryPosition();return this.hasCustomPosition()||t!==N&&t!==F?1:-1},getSharpDirectionByCoords:function(t){var e=this._getCanvasStartEnd(),n=Math.max(e.start,e.end);return this.getRadius?0:n!==t[this._isHorizontal?"x":"y"]?1:-1},_getGridLineDrawer:function(){var t=this;return function(e,n){var i=t._getGridPoints(e.coords);return i.points?t._createPathElement(i.points,n,t.getSharpDirectionByCoords(e.coords)):null}},_getGridPoints:function(t){var e=this._isHorizontal,n=e?"x":"y",i=this._orthogonalPositions,o=i.start,r=i.end,a=this.borderOptions,s=e?L:B,l=e?F:N,u=this.getCanvas(),c={left:u.left,right:u.width-u.right,top:u.top,bottom:u.height-u.bottom},d=4+(a.visible&&a[s]?c[s]:void 0),h=(a.visible&&a[l]?c[l]:void 0)-4;return this.areCoordsOutsideAxis(t)||void 0===t[n]||t[n]h?{points:null}:{points:e?null!==t[n]?[t[n],o,t[n],r]:null:null!==t[n]?[o,t[n],r,t[n]]:null}},_getConstantLinePos:function(t,e,n){var i=this._getTranslatedCoord(t);if(!(!(0,r.isDefined)(i)||iD(e,n)))return i},_getConstantLineGraphicAttributes:function(t){var e=this._orthogonalPositions.start,n=this._orthogonalPositions.end;return{points:this._isHorizontal?[t,e,t,n]:[e,t,n,t]}},_createConstantLine:function(t,e){return this._createPathElement(this._getConstantLineGraphicAttributes(t).points,e,(n=t,i=this._getCanvasStartEnd(),Math.max(i.start,i.end)!==n?1:-1));var n,i},_drawConstantLineLabelText:function(t,e,n,i,o){var r=i.font,a=i.cssClass;return this._renderer.text(t,e,n).css(k((0,s.extend)({},this._options.label.font,r))).attr({align:"center",class:a}).append(o)},_drawConstantLineLabels:function(t,e,n,i){var o,r=e.text,a=this._options.label;this._checkAlignmentConstantLineLabels(e),r=null!==(o=r)&&void 0!==o?o:this.formatLabel(t,a);var s=this._getConstantLineLabelsCoords(n,e);return this._drawConstantLineLabelText(r,s.x,s.y,e,i)},_getStripPos:function(t,e,n,i,o){var a,s,u,c,d,h=!(!o.minVisible&&!o.maxVisible),f=(o.categories||[]).reduce((function(t,e){return t.push(e.valueOf()),t}),[]);if(!h&&(0,r.isDefined)(t)&&(0,r.isDefined)(e)){var p=this.parser(t),m=this.parser(e);if(c=(0,l.inArray)((0,r.isDefined)(p)?p.valueOf():void 0,f),d=(0,l.inArray)((0,r.isDefined)(m)?m.valueOf():void 0,f),-1===c||-1===d)return{from:0,to:0,outOfCanvas:!0};c>d&&(u=e,e=t,t=u)}(0,r.isDefined)(t)?(t=this.validateUnit(t,"E2105","strip"),a=this._getTranslatedCoord(t,-1)):a=n,(0,r.isDefined)(e)?(e=this.validateUnit(e,"E2105","strip"),s=this._getTranslatedCoord(e,1)):s=i;var g=a=_[1]&&g.to>=_[1])&&(g.outOfCanvas=!0),g},_getStripGraphicAttributes:function(t,e){var n,i,o,r,a=this._orthogonalPositions,s=a.start,l=a.end;return this._isHorizontal?(n=t,i=A(s,l),o=e-t,r=P(s-l)):(n=A(s,l),i=t,o=P(s-l),r=P(t-e)),{x:n,y:i,width:o,height:r}},_createStrip:function(t){return this._renderer.rect(t.x,t.y,t.width,t.height)},_adjustStripLabels:function(){var t=this;this._strips.forEach((function(e){e.label&&e.label.attr(t._getAdjustedStripLabelCoords(e))}))},_adjustLabelsCoord:function(t,e,n){var i=this;i._majorTicks.forEach((function(o){o.label&&(o.updateMultilineTextAlignment(),o.label.attr(i._getLabelAdjustedCoord(o,t+(o.labelOffset||0),e,n)))}))},_adjustLabels:function(t){var e=this.getOptions(),n=e.position===e.label.position,i=this._majorTicks.reduce((function(t,e){if(!e.label)return t;var n=e.labelRotationAngle?o.default.rotateBBox(e.labelBBox,[e.labelCoords.x,e.labelCoords.y],-e.labelRotationAngle):e.labelBBox;return{width:D(t.width||0,n.width),height:D(t.height||0,n.height),offset:D(t.offset||0,e.labelOffset||0)}}),{}),r=n?this._isHorizontal?i.height:i.width:0;return this._adjustLabelsCoord(t,i.width),t+r+(r&&this._options.label.indentFromAxis)+(n?i.offset:0)},_getLabelAdjustedCoord:function(t,e,n){e=e||0;var i,r,a=this._options,s=o.default.rotateBBox(t.labelBBox,[t.labelCoords.x,t.labelCoords.y],-t.labelRotationAngle||0),l=t.labelAlignment||a.label.alignment,u="discrete"===this._options.type,c=t.labelRotationAngle%90===0,d=a.label.indentFromAxis,h=a.label.position,f=this._axisPosition,p=t.labelCoords,m=p.x;return this._isHorizontal?(r=h===N?f+d-s.y+e:f-d-(s.y+s.height)-e,i=l===F?u&&c?t.coords.x-(s.x+s.width):m-s.x-s.width:l===L?u&&c?m-s.x-(t.coords.x-m):m-s.x:m-s.x-s.width/2):(r=p.y-s.y-s.height/2,h===L?(i=l===L?f-d-n-s.x:l===V?f-d-n/2-s.x-s.width/2:f-d-s.x-s.width,i-=e):(i=l===F?f+d+n-s.x-s.width:l===V?f+d+n/2-s.x-s.width/2:f+d-s.x,i+=e)),{translateX:i,translateY:r}},_createAxisConstantLineGroups:function(){var t=this._renderer,e=this._axisCssPrefix+"constant-lines",n=t.g().attr({class:e}),i=t.g().attr({class:e}),o=t.g().attr({class:e});return{inside:n,outside1:i,left:i,top:i,outside2:o,right:o,bottom:o,remove:function(){this.inside.remove(),this.outside1.remove(),this.outside2.remove()},clear:function(){this.inside.clear(),this.outside1.clear(),this.outside2.clear()}}},_createAxisGroups:function(){var t=this._renderer,e=this._axisCssPrefix;this._axisGroup=t.g().attr({class:e+"axis"}),this._axisStripGroup=t.g().attr({class:e+"strips"}),this._axisGridGroup=t.g().attr({class:e+"grid"}),this._axisElementsGroup=t.g().attr({class:e+"elements"}).append(this._axisGroup),this._axisLineGroup=t.g().attr({class:e+"line"}).append(this._axisGroup),this._axisTitleGroup=t.g().attr({class:e+"title"}).append(this._axisGroup),this._axisConstantLineGroups={above:this._createAxisConstantLineGroups(),under:this._createAxisConstantLineGroups()},this._axisStripLabelGroup=t.g().attr({class:e+"axis-labels"})},_clearAxisGroups:function(){this._axisGroup.remove(),this._axisStripGroup.remove(),this._axisStripLabelGroup.remove(),this._axisConstantLineGroups.above.remove(),this._axisConstantLineGroups.under.remove(),this._axisGridGroup.remove(),this._axisTitleGroup.clear(),this._axisElementsGroup.clear(),this._axisLineGroup&&this._axisLineGroup.clear(),this._axisStripGroup&&this._axisStripGroup.clear(),this._axisGridGroup&&this._axisGridGroup.clear(),this._axisConstantLineGroups.above.clear(),this._axisConstantLineGroups.under.clear(),this._axisStripLabelGroup&&this._axisStripLabelGroup.clear()},_getLabelFormatObject:function(t,e,n,o,r,a){n=n||this._getViewportRange();var s={value:t,valueText:(0,i.smartFormatter)(t,{labelOptions:e,ticks:a||S(this._majorTicks),tickInterval:null!==r&&void 0!==r?r:this._tickInterval,dataType:this._options.dataType,logarithmBase:this._options.logarithmBase,type:this._options.type,showTransition:!this._options.marker.visible,point:o})||"",min:n.minVisible,max:n.maxVisible};return o&&(s.point=o),s},formatLabel:function(t,e,n,i,o,a){var s=this._getLabelFormatObject(t,e,n,i,o,a);return(0,r.isFunction)(e.customizeText)?e.customizeText.call(s,s):s.valueText},formatHint:function(t,e,n){var i=this._getLabelFormatObject(t,e,n);return(0,r.isFunction)(e.customizeHint)?e.customizeHint.call(i,i):void 0},formatRange:function(t,e,n){return(0,i.formatRange)(t,e,n,this.getOptions())},_setTickOffset:function(){var t=this._options.discreteAxisDivisionMode;this._tickOffset=+("crossLabels"!==t||!t)},resetApplyingAnimation:function(t){this._resetApplyingAnimation=!0,t&&(this._firstDrawing=!0)},getMargins:function(){var t=this;if(t.hasCustomPosition())return{left:0,right:0,top:0,bottom:0};var e=t._options,n=e.position,i=e.placeholderSize,o=t.getCanvas(),r=o.left,a=o.top,s=o.width-o.right,l=o.height-o.bottom,u=D(e.grid.visible&&e.grid.width||0,e.tick.visible&&e.tick.width||0),c=t._axisConstantLineGroups.above,d=t._axisConstantLineGroups.under,h=[t._axisElementsGroup,c.outside1,c.outside2,d.outside1,d.outside2,t._axisLineGroup].map((function(t){return t&&t.getBBox()})).concat(function(e){var n=e&&e.getBBox();return!n||n.isEmpty||(t._isHorizontal?(n.x=r,n.width=s-r):(n.y=a,n.height=l-a)),n}(t._axisTitleGroup)),f=st(h,o);return f[n]+=e.crosshairMargin,i&&(f[n]=i),u&&(t._isHorizontal&&o.rights.startValue));var h,p,m=c?l.startValue:u.minVisible,g=d?l.endValue:u.maxVisible;n?(i=o.default.getCategoriesInfo(i,s.startValue,s.endValue).categories,u.categories=i):(u.min=null!==(h=s.startValue)&&void 0!==h?h:u.min,u.max=null!==(p=s.endValue)&&void 0!==p?p:u.max);var _=o.default.adjustVisualRange({axisType:e.type,dataType:e.dataType,base:e.logarithmBase},{startValue:c?l.startValue:void 0,endValue:d?l.endValue:void 0,length:l.length},{categories:i,min:s.startValue,max:s.endValue},{categories:i,min:m,max:g});return u.minVisible=_.startValue,u.maxVisible=_.endValue,!(0,r.isDefined)(u.min)&&(u.min=u.minVisible),!(0,r.isDefined)(u.max)&&(u.max=u.maxVisible),u.addRange({}),u},adjustRange:function(t){t=t||{};var e=this._options.type===a.default.discrete,n=this._options.type===a.default.logarithmic,i=!1===this._options.allowNegatives;if(n&&(t.startValue=i&&t.startValue<=0?null:t.startValue,t.endValue=i&&t.endValue<=0?null:t.endValue),!e&&(0,r.isDefined)(t.startValue)&&(0,r.isDefined)(t.endValue)&&t.startValue>t.endValue){var o=t.endValue;t.endValue=t.startValue,t.startValue=o}return t},_getVisualRangeUpdateMode:function(t,e,n){var i=this._options.visualRangeUpdateMode,o=this._translator,r=this._seriesData;if(this.isArgumentAxis){if(-1===[j,z,H].indexOf(i))if(r.axisType===a.default.discrete){var s=r.categories,l=e.categories,u=this.visualRange();i=s&&l&&s.length&&-1!==l.map((function(t){return t.valueOf()})).join(",").indexOf(s.map((function(t){return t.valueOf()})).join(","))&&(u.startValue.valueOf()!==s[0].valueOf()||u.endValue.valueOf()!==s[s.length-1].valueOf())?z:H}else{var c=o.translate(r.min),d=o.translate(t.startValue),h=o.translate(r.max),f=o.translate(t.endValue);i=c===d&&h===f?H:c!==d&&h===f?j:z}}else-1===[z,H].indexOf(i)&&(i=n===z?z:H);return i},_handleBusinessRangeChanged:function(t,e,n){var i=this.visualRange();if(!e&&!this._translator.getBusinessRange().isEmpty()){var o=this._lastVisualRangeUpdateMode=this._getVisualRangeUpdateMode(i,n,t);if(!this.isArgumentAxis){var a=this.getViewport();(0,r.isDefined)(a.startValue)||(0,r.isDefined)(a.endValue)||(0,r.isDefined)(a.length)||(o=H)}this._prevDataWasEmpty&&(o=z),o===z&&this._setVisualRange([i.startValue,i.endValue]),o===H&&this._setVisualRange([null,null]),o===j&&this._setVisualRange({length:this.getVisualRangeLength()})}},getVisualRangeLength:function(t){var e,n=t||this._translator.getBusinessRange(),i=this._options.type;i===a.default.logarithmic?e=(0,m.adjust)(this.calculateInterval(n.maxVisible,n.minVisible)):e=i===a.default.discrete?o.default.getCategoriesInfo(n.categories,n.minVisible,n.maxVisible).categories.length:n.maxVisible-n.minVisible;return e},getVisualRangeCenter:function(t){var e,n=this._translator.getBusinessRange(),i=t||n,s=this._options,l=s.type,u=s.logarithmBase;if((0,r.isDefined)(i.minVisible)&&(0,r.isDefined)(i.maxVisible)){if(l===a.default.logarithmic){var c=i.allowNegatives,d=i.linearThreshold,h=i.minVisible,f=i.maxVisible;e=E((0,m.adjust)(T(f,u,c,d)+T(h,u,c,d))/2,u,c,d)}else if(l===a.default.discrete){var p=o.default.getCategoriesInfo(i.categories,i.minVisible,i.maxVisible),g=Math.ceil(p.categories.length/2)-1;e=n.categories.indexOf(p.categories[g])}else e=(i.maxVisible.valueOf()+i.minVisible.valueOf())/2;return e}},setBusinessRange:function(t,e,n,i){var o,s,l=this._options,u=l.type===a.default.discrete;this._handleBusinessRangeChanged(n,e,t),this._seriesData=new f.Range(t);var c=this._seriesData.isEmpty();if(this._prevDataWasEmpty=c,this._seriesData.addRange({categories:l.categories,dataType:l.dataType,axisType:l.type,base:l.logarithmBase,invert:l.inverted}),l.type===a.default.logarithmic&&(this._seriesData.addRange({allowNegatives:void 0!==l.allowNegatives?l.allowNegatives:t.min<=0}),isNaN(l.linearThreshold)||(this._seriesData.linearThreshold=l.linearThreshold)),!u){if(!(0,r.isDefined)(this._seriesData.min)&&!(0,r.isDefined)(this._seriesData.max)){var d=this.getViewport();d&&this._seriesData.addRange({min:d.startValue,max:d.endValue})}var h=l.synchronizedValue;(0,r.isDefined)(h)&&this._seriesData.addRange({min:h,max:h})}this._seriesData.minVisible=null!==(o=this._seriesData.minVisible)&&void 0!==o?o:this._seriesData.min,this._seriesData.maxVisible=null!==(s=this._seriesData.maxVisible)&&void 0!==s?s:this._seriesData.max,!this.isArgumentAxis&&l.showZero&&this._seriesData.correctValueZeroLevel(),this._seriesData.sortCategories(this.getCategoriesSorter(i)),this._seriesData.breaks=this._initialBreaks=this._getScaleBreaks(l,this._seriesData,this._series,this.isArgumentAxis),this._translator.updateBusinessRange(this._getViewportRange())},_addConstantLinesToRange:function(t,e,n){this._outsideConstantLines.concat(this._insideConstantLines||[]).forEach((function(i){if(i.options.extendAxis){var o,r=i.getParsedValue();t.addRange((C(o={},e,r),C(o,n,r),o))}}))},setGroupSeries:function(t){this._series=t},getLabelsPosition:function(){var t=this._options,e=t.position,n=t.label.indentFromAxis+(this._axisShift||0)+this._constantLabelOffset,i=this._axisPosition;return e===B||e===L?i-n:i+n},getFormattedValue:function(t,e,n){var i=this._options.label;return(0,r.isDefined)(t)?this.formatLabel(t,(0,s.extend)(!0,{},i,e),void 0,n):null},_getBoundaryTicks:function(t,e){var n=t.length,i=this._options,o=i.customBoundTicks,s=e.minVisible,l=e.maxVisible,u=i.showCustomBoundaryTicks?this._boundaryTicksVisibility:{},c=[];return i.type===a.default.discrete?this._tickOffset&&0!==t.length&&(c=[t[0],t[t.length-1]]):o?(u.min&&(0,r.isDefined)(o[0])&&c.push(o[0]),u.max&&(0,r.isDefined)(o[1])&&c.push(o[1])):(u.min&&(0===n||t[0]>s)&&c.push(s),u.max&&(0===n||t[n-1]d.max?d.max:E,this._getScaleBreaks(u,{minVisible:T,maxVisible:E},this._series,this.isArgumentAxis)).ticks}}return this._aggregationInterval=C,{interval:C,ticks:v}},createTicks:function(t){var e=this,n=e._renderer,i=e._options;if(t){e._isSynchronized=!1,e.updateCanvas(t),e._estimatedTickInterval=e._getTicks(e.adjustViewport(this._seriesData),_.noop,!0).tickInterval;var o=e._getViewportRange(),a=this._calculateValueMargins();o.addRange({minVisible:a.minValue,maxVisible:a.maxValue,isSpacedMargin:a.isSpacedMargin});var s=e._createTicksAndLabelFormat(o),l=e._getBoundaryTicks(s.ticks,e._getViewportRange());i.showCustomBoundaryTicks&&l.length?(e._boundaryTicks=[l[0]].map($(e,n,!0)),l.length>1&&(e._boundaryTicks=e._boundaryTicks.concat([l[1]].map($(e,n,!1))))):e._boundaryTicks=[];var u=(s.minorTicks||[]).filter((function(t){return!l.some((function(e){return O(e)===O(t)}))}));e._tickInterval=s.tickInterval,e._minorTickInterval=s.minorTickInterval;var c=e._majorTicks||[],d=c.reduce((function(t,e){return t[e.value.valueOf()]=e,t}),{}),h=(0,r.type)(s.ticks[0])===(0,r.type)(c[0]&&c[0].value),f=e._getSkippedCategory(s.ticks),p=s.ticks.map((function(t){var i=d[t.valueOf()];return i&&h?(delete d[t.valueOf()],i.setSkippedCategory(f),i):K(e,n,f)(t)}));e._majorTicks=p;var m=e._minorTicks||[];e._minorTicks=u.map((function(t,i){var o=m[i];return o?(o.updateValue(t),o):q(e,n)(t)})),e._ticksToRemove=Object.keys(d).map((function(t){return d[t]})).concat(m.slice(e._minorTicks.length,m.length)),s.breaks&&(e._seriesData.breaks=s.breaks),e._reinitTranslator(e._getViewportRange())}},_reinitTranslator:function(t){var e=this._translator;this._isSynchronized||e.updateBusinessRange(t)},_getViewportRange:function(){return this.adjustViewport(this._seriesData)},setMarginOptions:function(t){this._marginOptions=t},getMarginOptions:function(){var t;return null!==(t=this._marginOptions)&&void 0!==t?t:{}},_calculateRangeInterval:function(t){var e="datetime"===this._options.dataType,n=[],i=function(t){(0,r.isDefined)(t)&&n.push(e?(0,g.dateToMilliseconds)(t):t)};return i(this._tickInterval),i(this._estimatedTickInterval),(0,r.isDefined)(t)&&n.push(t),i(this._aggregationInterval),this._calculateWorkWeekInterval(A.apply(this,n))},_calculateWorkWeekInterval:function(t){var e=this._options;if("datetime"===e.dataType&&e.workdaysOnly&&t){var n=e.workWeek.length*W,i=U-n;if(n!==t&&i=t?W:t-i*o}else i>=t&&t>W&&(t=W)}return t},_calculateValueMargins:function(t){this._resetMargins();var e,n,i,o=this.getMarginOptions(),s=(o.size||0)/2,l=this._options,u=this._getViewportRange(),c=this.getViewport(),d=this._getScreenDelta(),h=-1!==(l.type||"").indexOf(a.default.discrete),f=l.valueMarginsEnabled&&!h&&!this.customPositionIsBoundaryOrthogonalAxis(),p=this._translator,m=l.minValueMargin,g=l.maxValueMargin,_=0,v=0,y=0;if(u.stubData||!d)return{startPadding:0,endPadding:0};function b(t){var e=p.ratioOfCanvasRange();return e/(e*d/(t+d))}if(this.isArgumentAxis&&o.checkInterval){e=this._calculateRangeInterval(u.interval);var w=p.getInterval(e);isFinite(w)?y=Math.ceil(w/(2*b(w))):e=0}var x=.8*d/2;f&&((0,r.isDefined)(m)?n=isFinite(m)?m:0:!this.isArgumentAxis&&o.checkInterval&&O(u.minVisible)>0&&O(u.minVisible)===O(u.min)?_=5:(_=Math.max(s,y),_=Math.min(x,_)),(0,r.isDefined)(g)?i=isFinite(g)?g:0:!this.isArgumentAxis&&o.checkInterval&&O(u.maxVisible)<0&&O(u.maxVisible)===O(u.max)?v=5:(v=Math.max(s,y),v=Math.min(x,v))),o.percentStick&&!this.isArgumentAxis&&(1===P(u.max)&&(v=0),1===P(u.min)&&(_=0));var C,S,k,I,T,E,M=this._getCanvasStartEnd(),A=(d-_-v)/(1+(n||0)+(i||0))||d;if(void 0===n&&void 0===i||(void 0!==n&&(_=A*n),void 0!==i&&(v=A*i)),l.type!==a.default.discrete&&t&&t.length>1&&!l.skipViewportExtending&&!c.action&&!1!==l.endOnTick){var R=t.length,B=p.translate(t[0].value),N=p.translate(t[R-1].value),L=B>N?-1:1,F=D(L*(M.start-B),0),V=D(L*(N-M.end),0);if(F>_||V>v){var z=b(V+F);F>=_&&(C=t[0].value),V>=v&&(S=t[R-1].value),_=D(F,_)/z,v=D(V,v)/z}}(n=void 0===n?_/A:n,i=void 0===i?v/A:i,h)||(this._translator.isInverted()?(C=null!==(k=C)&&void 0!==k?k:p.from(M.start+d*n,-1),S=null!==(I=S)&&void 0!==I?I:p.from(M.end-d*i,1)):(C=null!==(T=C)&&void 0!==T?T:p.from(M.start-d*n,-1),S=null!==(E=S)&&void 0!==E?E:p.from(M.end+d*i,1)));function j(t,e){var n=P(M.start-t),i=P(M.end-e),o=b(n+i);_=n/o,v=i/o}return this.isArgumentAxis||"datetime"===l.dataType||(C*u.min<=0&&C*u.minVisible<=0&&(j(p.translate(0),p.translate(S)),C=0),S*u.max<=0&&S*u.maxVisible<=0&&(j(p.translate(C),p.translate(0)),S=0)),{startPadding:this._translator.isInverted()?v:_,endPadding:this._translator.isInverted()?_:v,minValue:C,maxValue:S,interval:e,isSpacedMargin:_===v&&0!==_}},applyMargins:function(){if(!this._isSynchronized){var t=this._calculateValueMargins(this._majorTicks),e=(0,s.extend)({},this._canvas,{startPadding:t.startPadding,endPadding:t.endPadding});if(this._translator.updateCanvas(this._processCanvas(e)),isFinite(t.interval)){var n=this._translator.getBusinessRange();n.addRange({interval:t.interval}),this._translator.updateBusinessRange(n)}}},_resetMargins:function(){this._reinitTranslator(this._getViewportRange()),this._canvas&&this._translator.updateCanvas(this._processCanvas(this._canvas))},_createConstantLines:function(){var t=this,e=(this._options.constantLines||[]).map((function(e){return(0,b.default)(t,e)}));this._outsideConstantLines=e.filter((function(t){return"outside"===t.labelPosition})),this._insideConstantLines=e.filter((function(t){return"inside"===t.labelPosition}))},draw:function(t,e){var n=this._options;this.borderOptions=e||{visible:!1},this._resetMargins(),this.createTicks(t),this.applyMargins(),this._clearAxisGroups(),Z(this._majorTicks),Z(this._minorTicks),Z(this._boundaryTicks),this._axisGroup.append(this._axesContainerGroup),this._drawAxis(),this._drawTitle(),X(this._majorTicks,n.tick),X(this._minorTicks,n.minorTick),X(this._boundaryTicks,n.tick);var i,o,a,s=this._getGridLineDrawer();J(this._majorTicks,s),J(this._minorTicks,s),Y(this._majorTicks,"drawLabel",this._getViewportRange()),this._majorTicks.forEach((function(t){t.labelRotationAngle=0,t.labelAlignment=void 0,t.labelOffset=0})),Y(this._outsideConstantLines.concat(this._insideConstantLines),"draw"),Y(this._strips,"draw"),this._dateMarkers=this._drawDateMarkers()||[],this._labelAxesGroup&&this._axisStripLabelGroup.append(this._labelAxesGroup),this._gridContainerGroup&&this._axisGridGroup.append(this._gridContainerGroup),this._stripsGroup&&this._axisStripGroup.append(this._stripsGroup),this._constantLinesGroup&&(this._axisConstantLineGroups.above.inside.append(this._constantLinesGroup.above),this._axisConstantLineGroups.above.outside1.append(this._constantLinesGroup.above),this._axisConstantLineGroups.above.outside2.append(this._constantLinesGroup.above),this._axisConstantLineGroups.under.inside.append(this._constantLinesGroup.under),this._axisConstantLineGroups.under.outside1.append(this._constantLinesGroup.under),this._axisConstantLineGroups.under.outside2.append(this._constantLinesGroup.under)),this._measureTitle(),et(this._majorTicks);var l=this._tickInterval;(0,r.isDefined)(l)&&(a=this.getTranslator().getInterval("datetime"===n.dataType?(0,g.dateToMilliseconds)(l):l));var u=(0,r.isDefined)(n.placeholderSize)?n.placeholderSize-n.label.indentFromAxis:void 0;this._isHorizontal?(i=a,o=u):(i=u,o=a);var c=this._validateDisplayMode(n.label.displayMode),d=this._validateOverlappingMode(n.label.overlappingBehavior,c),h=n.label.wordWrap||"none",f=n.label.textOverflow||"none";if(("none"!==h||"none"!==f)&&"rotate"!==c&&"rotate"!==d&&"auto"!==d){var p=!1,m=!1;i&&this._majorTicks.some((function(t){return t.labelBBox.width>i}))&&(p=!0),o&&this._majorTicks.some((function(t){return t.labelBBox.height>o}))&&(m=!0),(p||m)&&(this._majorTicks.forEach((function(t){t.label&&t.label.setMaxSize(i,o,n.label)})),et(this._majorTicks))}et(this._outsideConstantLines),et(this._insideConstantLines),et(this._strips),et(this._dateMarkers),this._adjustConstantLineLabels(this._insideConstantLines),this._adjustStripLabels();var _=this._constantLabelOffset=this._adjustConstantLineLabels(this._outsideConstantLines);this._translator.getBusinessRange().isEmpty()||(this._setLabelsPlacement(),_=this._adjustLabels(_)),_=this._adjustDateMarkers(_),this._adjustTitle(_)},_measureTitle:_.noop,animate:function(){Y(this._majorTicks,"animateLabels")},updateSize:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this;i.updateCanvas(t),n&&(i._checkTitleOverflow(),i._measureTitle(),i._updateTitleCoords()),i._reinitTranslator(i._getViewportRange()),i.applyMargins();var o=!i._firstDrawing&&e,r=this._options;Z(i._majorTicks),Z(i._minorTicks),Z(i._boundaryTicks),this._resetApplyingAnimation&&!this._firstDrawing&&i._resetStartCoordinates(),nt(i._majorTicks),nt(i._minorTicks),nt(i._boundaryTicks),this._axisElement&&i._updateAxisElementPosition(),Q(i._majorTicks,r.tick,o),Q(i._minorTicks,r.minorTick,o),Q(i._boundaryTicks,r.tick),Y(i._majorTicks,"updateLabelPosition",o),i._outsideConstantLines.concat(i._insideConstantLines||[]).forEach((function(t){return t.updatePosition(o)})),Y(i._strips,"updatePosition",o),tt(i._majorTicks,o),tt(i._minorTicks,o),o&&Y(i._ticksToRemove||[],"fadeOutElements"),i.prepareAnimation(),i._ticksToRemove=null,i._translator.getBusinessRange().isEmpty()||(i._firstDrawing=!1),this._resetApplyingAnimation=!1},prepareAnimation:function(){var t="saveCoords";Y(this._majorTicks,t),Y(this._minorTicks,t),Y(this._insideConstantLines,t),Y(this._outsideConstantLines,t),Y(this._strips,t)},_resetStartCoordinates:function(){var t="resetCoordinates";Y(this._majorTicks,t),Y(this._minorTicks,t),Y(this._insideConstantLines,t),Y(this._outsideConstantLines,t),Y(this._strips,t)},applyClipRects:function(t,e){this._axisGroup.attr({"clip-path":e}),this._axisStripGroup.attr({"clip-path":t})},_mergeViewportOptions:function(){var t=this._options,e={},n=t._customVisualRange;e=!(0,r.isDefined)(t.max)&&!(0,r.isDefined)(t.min)||(0,r.isDefined)(n.startValue)||(0,r.isDefined)(n.endValue)||(0,r.isDefined)(n.length)?n:{startValue:t.min,endValue:t.max},this._setVisualRange(e)},_validateVisualRange:function(t){var e=I(t);return void 0!==e.startValue&&(e.startValue=this.validateUnit(e.startValue)),void 0!==e.endValue&&(e.endValue=this.validateUnit(e.endValue)),function(t,e){return o.default.convertVisualRangeObject(t,!R(e))}(e,t)},_validateOptions:function(t){void 0!==t.min&&(t.min=this.validateUnit(t.min,"E2106")),void 0!==t.max&&(t.max=this.validateUnit(t.max,"E2106")),t.wholeRange=this._validateVisualRange(t.wholeRange),t.visualRange=t._customVisualRange=this._validateVisualRange(t._customVisualRange),this._mergeViewportOptions()},validate:function(){var t=this._options,e=this.isArgumentAxis?t.argumentType:t.valueType,n=e?c.default.getParser(e):function(t){return t};this.parser=n,t.dataType=e,this._validateOptions(t)},resetVisualRange:function(t){this._seriesData.minVisible=this._seriesData.min,this._seriesData.maxVisible=this._seriesData.max,this.handleZooming([null,null],{start:!!t,end:!!t})},_setVisualRange:function(t,e){var n=this.adjustRange(o.default.getVizRangeObject(t));e?((0,r.isDefined)(n.startValue)&&(this._viewport.startValue=n.startValue),(0,r.isDefined)(n.endValue)&&(this._viewport.endValue=n.endValue)):this._viewport=n},_applyZooming:function(t,e){this._resetVisualRangeOption(),this._setVisualRange(t,e);var n=this.getViewport();this._seriesData.breaks=this._initialBreaks=this._getScaleBreaks(this._options,{minVisible:n.startValue,maxVisible:n.endValue},this._series,this.isArgumentAxis),this._translator.updateBusinessRange(this._getViewportRange())},getZoomStartEventArg:function(t,e){return{axis:this,range:this.visualRange(),cancel:!1,event:t,actionType:e}},getZoomEndEventArg:function(t,e,n,i,o){var r=this.visualRange();return{axis:this,previousRange:t,range:r,cancel:!1,event:e,actionType:n,zoomFactor:i,shift:o,rangeStart:r.startValue,rangeEnd:r.endValue}},getZoomBounds:function(){var t=o.default.getVizRangeObject(this._options.wholeRange),e=this.getTranslator().getBusinessRange(),n={startValue:at(this._initRange.startValue,e.min),endValue:at(this._initRange.endValue,e.max)};return{startValue:at(t.startValue,n.startValue),endValue:at(t.endValue,n.endValue)}},setInitRange:function(){this._initRange={},0===Object.keys(this._options.wholeRange||{}).length&&(this._initRange=this.getZoomBounds())},_resetVisualRangeOption:function(){this._options._customVisualRange={}},setCustomVisualRange:function(t){this._options._customVisualRange=t},visualRange:function(){var t,e=this,n=arguments;if(0===n.length){var i,l,u=e._getAdjustedBusinessRange(),c=u.minVisible,d=u.maxVisible;return e._options.type===a.default.discrete?{startValue:c=null!==(i=c)&&void 0!==i?i:u.categories[0],endValue:d=null!==(l=d)&&void 0!==l?l:u.categories[u.categories.length-1],categories:o.default.getCategoriesInfo(u.categories,c,d).categories}:{startValue:c,endValue:d}}t=R(n[0])?n[0]:(0,r.isPlainObject)(n[0])?(0,s.extend)({},n[0]):[n[0],n[1]];var h=e.handleZooming(t,n[1]);h.isPrevented||e._visualRange(e,h)},handleZooming:function(t,e,n,i){e=e||{},(0,r.isDefined)(t)&&((t=this._validateVisualRange(t)).action=i);var o=this.getZoomStartEventArg(n,i),a=o.range;!e.start&&this._eventTrigger("zoomStart",o);var s={isPrevented:o.cancel,skipEventRising:e.skipEventRising,range:t||o.range};return o.cancel||((0,r.isDefined)(t)&&this._applyZooming(t,e.allowPartialUpdate),(0,r.isDefined)(this._storedZoomEndParams)||(this._storedZoomEndParams={startRange:a,type:this.getOptions().type}),this._storedZoomEndParams.event=n,this._storedZoomEndParams.action=i,this._storedZoomEndParams.prevent=!!e.end),s},handleZoomEnd:function(){if((0,r.isDefined)(this._storedZoomEndParams)&&!this._storedZoomEndParams.prevent){var t=this._storedZoomEndParams.startRange,e=this._storedZoomEndParams.event,n=this._storedZoomEndParams.action,i={minVisible:t.startValue,maxVisible:t.endValue,categories:t.categories},o=this.getOptions().type===this._storedZoomEndParams.type,a=o?(0,m.adjust)(this.getVisualRangeCenter()-this.getVisualRangeCenter(i)):NaN,s=o?+(Math.round(this.getVisualRangeLength(i)/this.getVisualRangeLength()+"e+2")+"e-2"):NaN,l=this.getZoomEndEventArg(t,e,n,s,a);l.cancel=this.isZoomingLowerLimitOvercome(1===s?"pan":"zoom",s),this._eventTrigger("zoomEnd",l),l.cancel&&this.restorePreviousVisualRange(t),this._storedZoomEndParams=null}},restorePreviousVisualRange:function(t){this._storedZoomEndParams=null,this._applyZooming(t),this._visualRange(this,t)},isZoomingLowerLimitOvercome:function(t,e,n){var i,a=this._options,s=a.minVisualRangeLength,l="zoom"===t&&e>=1,u=this._translator.getBusinessRange();(0,r.isDefined)(n)&&(i={minVisible:(i=this.adjustRange(o.default.getVizRangeObject(n))).startValue,maxVisible:i.endValue,categories:u.categories});var c=this.getVisualRangeLength(i);if("discrete"!==a.type)if((0,r.isDefined)(s))"datetime"!==a.dataType||(0,r.isNumeric)(s)||(s=(0,g.dateToMilliseconds)(s)),l&=s>=c;else{var d=this._translator.canvasLength,h={minVisible:u.min,maxVisible:u.max,categories:u.categories};l&=this.getVisualRangeLength(h)/d>=c}else!(0,r.isDefined)(s)&&(s=1),l&=(0,r.isDefined)(n)&&this.getVisualRangeLength()===s&&c<=s;return!!l},dataVisualRangeIsReduced:function(){var t,e,n=this.getTranslator();if("discrete"===this._options.type){var i=n.getBusinessRange().categories;t=i[0],e=i[i.length-1]}else{var o=this._seriesData;t=o.min,e=o.max}if(!(0,r.isDefined)(t)||!(0,r.isDefined)(e))return!1;var a=n.translate(t),s=n.translate(e),l=[Math.min(a,s),Math.max(a,s)],u=this.visualRange(),c=n.translate(u.startValue),d=n.translate(u.endValue);return c>l[0]&&cl[0]&&d1&&t.some((function(t,e,n){return 0!==e&&a.default.areLabelsOverlap(t,n[e-1],o.minSpacing,o.alignment)}))&&this._applyLabelMode(e,n,t,i),this._checkBoundedLabelsOverlapping(r,t,e)}},_applyLabelMode:function(t,e,n,i,o){var r,a,s=this._majorTicks,l=this._options.label,u=i.rotationAngle;switch(t){case"rotate":l.userAlignment||(a=u<0?F:L,u%90===0&&(a=V)),rt(s,e=o?e:this._getStep(n,u),(function(t){t.label.rotate(u),t.labelRotationAngle=u,a&&(t.labelAlignment=a)}));break;case"stagger":r=this._getMaxLabelHeight(n,i.staggeringSpacing),rt(s,e-1,(function(t,n){n/(e-1)%2!==0&&(t.labelOffset=r)}));break;case"auto":case"_auto":2===e?this._applyLabelMode("stagger",e,n,i):this._applyLabelMode("rotate",e,n,{rotationAngle:ot(n,l)});break;default:rt(s,e)}},getMarkerTrackers:_.noop,_drawDateMarkers:_.noop,_adjustDateMarkers:_.noop,coordsIn:_.noop,areCoordsOutsideAxis:_.noop,_getSkippedCategory:_.noop,_initAxisPositions:_.noop,_drawTitle:_.noop,_updateTitleCoords:_.noop,_adjustConstantLineLabels:_.noop,_createTranslator:function(){return new h.default.Translator2D({},{},{})},_updateTranslator:function(){var t=this._translator;t.update(t.getBusinessRange(),this._canvas||{},this._getTranslatorOptions())},_getTranslatorOptions:function(){var t,e,n,i=this._options;return{isHorizontal:this._isHorizontal,shiftZeroValue:!this.isArgumentAxis,interval:i.semiDiscreteInterval,firstDayOfWeek:null===(t=i.workWeek)||void 0===t?void 0:t[0],stick:this._getStick(),breaksSize:null!==(e=null===(n=i.breakStyle)||void 0===n?void 0:n.width)&&void 0!==e?e:0}},getVisibleArea:function(){var t=this._getCanvasStartEnd();return[t.start,t.end].sort((function(t,e){return t-e}))},_getCanvasStartEnd:function(){var t=this._isHorizontal,e=this._canvas||{},n=this._translator.getBusinessRange().invert,i=t?[e.left,e.width-e.right]:[e.height-e.bottom,e.top];return n&&i.reverse(),{start:i[0],end:i[1]}},_getScreenDelta:function(){var t=this._getCanvasStartEnd(),e=this._seriesData?this._seriesData.breaks:[],n=e.length;return P(t.start-t.end)-(n?e[n-1].cumulativeWidth:0)},_getScaleBreaks:function(){return[]},_adjustTitle:_.noop,_checkTitleOverflow:_.noop,getSpiderTicks:_.noop,setSpiderTicks:_.noop,_checkBoundedLabelsOverlapping:_.noop,drawScaleBreaks:_.noop,_visualRange:_.noop,_rotateConstantLine:_.noop,applyVisualRangeSetter:function(t){this._visualRange=t},getCategoriesSorter:function(t){var e;if(this.isArgumentAxis)e=t;else{var n=this._options.categoriesSortingMethod;e=null!==n&&void 0!==n?n:this._options.categories}return e},_getAdjustedBusinessRange:function(){return this.adjustViewport(this._translator.getBusinessRange())}}},function(t,e,n){"use strict";var i,o=n(13),r=n(0),a=n(279),s=n(2),l=n(121),u=(i=l)&&i.__esModule?i:{default:i},c=n(54),d=n(4),h=n(274),f=n(7);var p=Number,m=Math,g=m.round,_=m.max,v=m.min,y=m.ceil,b=s.isDefined,w=s.isFunction,x=o.enumParser,C=o.normalizeEnum,S=r.extend,k="center",I="right",T="left",E="top",O="bottom",M=x([T,k,I]),P=x([E,O]),D=x(["vertical","horizontal"]),A=x([T,I,E,O]),R=x(["outside","inside"]),B=x([T,k,I]);function N(t,e,n){if(t){var i=t.fill;return(0,r.extend)({},{state:n,fill:"none"===i?e:i,opacity:t.opacity,hatching:S({},t.hatching,{step:5,width:2})})}}function L(t,e,n){var i=(0,h.processHatchingAttrs)(t,e);return i.fill&&0===i.fill.indexOf("DevExpress")&&(i.fill=(0,h.getFuncIri)(i.fill)),i.opacity=i.opacity>=0?i.opacity:1,(0,r.extend)({},i,{size:n})}function F(t,e,n,i){var o=e&&n[e[t]];o&&o.renderMarker(o.states[i])}function V(t,e,n){return t?(function(t){var e=t.margin;e=e>=0?{top:e=p(t.margin),bottom:e,left:e,right:e}:{top:e.top>=0?p(e.top):10,bottom:e.bottom>=0?p(e.bottom):10,left:e.left>=0?p(e.left):10,right:e.right>=0?p(e.right):10},t.margin=e}(t),t.horizontalAlignment=M(t.horizontalAlignment,I),t.verticalAlignment=P(t.verticalAlignment,t.horizontalAlignment===k?O:E),t.orientation=D(t.orientation,t.horizontalAlignment===k?"horizontal":"vertical"),t.itemTextPosition=A(t.itemTextPosition,"horizontal"===t.orientation?O:I),t.position=n?R(t.position,"outside"):"outside",t.itemsAlignment=B(t.itemsAlignment,null),t.hoverMode=C(t.hoverMode),t.customizeText=w(t.customizeText)?t.customizeText:function(){return this[e]},t.customizeHint=w(t.customizeHint)?t.customizeHint:d.noop,t._incidentOccurred=t._incidentOccurred||d.noop,t):null}function z(t,e){return t.rect(0,0,e,e)}function j(t,e){return t.circle(e/2,e/2,e/2)}function H(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}function W(t,e,n,i){var o={x:0,y:0},r=0,a=0,s=0;if(s="y"===e.direction?i.top+i.bottom:i.left+i.right,t.forEach((function(t,n){var i=t[0],s=t.length;t.forEach((function(t,n){var i=t.offset||e.spacing;o[e.direction]+=t[e.measure]+(n!==s-1?i:0),r=_(r,o[e.direction])})),o[e.direction]=0,o[e.altDirection]+=i[e.altMeasure]+i.altOffset||e.altSpacing,a=_(a,o[e.altDirection])})),r+s>e.length)return e.countItem=function(t,e){return t.altCountItem++,y(e/t.altCountItem)}(e,n),!0}function U(t,e){return t.reduce((function(t,n){var i=n.offset||e.spacing;return t+n[e.measure]+i}),0)}function G(t){switch(t.itemTextPosition){case O:return{horizontal:k,vertical:E};case E:return{horizontal:k,vertical:O};case T:return{horizontal:I,vertical:k};case I:return{horizontal:T,vertical:k}}}function K(t,e){var n=t.reduce((function(t,n){var i=n?n[e]:t;return _(t,i)}),0);t.forEach((function(t){t&&(t[e]=n)}))}function q(t){var e,n,i=t.length,o=t[0].length,r=[];for(e=0;e0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,o=(e=i._options=V(e,i._textField,i._allowInsidePosition)||{}).markerSize;if(this._updated=!0,this._data=t.map((function(t){return t.size=p(t.size>0?t.size:o),t.marker=L(t,t.states.normal),Object.defineProperty(t.marker,"size",{get:function(){return t.size},set:function(e){t.size=e}}),Object.defineProperty(t.marker,"opacity",{get:function(){return t.states.normal.opacity},set:function(e){t.states.normal.opacity=t.states.hover.opacity=t.states.selection.opacity=e}}),t})),e.customizeItems&&(i._data=e.customizeItems(t.slice())||t),i._boundingRect={width:0,height:0,x:0,y:0},i.isVisible()&&!i._title&&(i._title=new u.default.Title({renderer:i._renderer,cssClass:i._titleGroupClass,root:i._legendGroup})),i._title){var r=e.title;n.horizontalAlignment=Y(e),i._title.update(n,r)}return this.erase(),i},isVisible:function(){return this._options&&this._options.visible},draw:function(t,e){var n=this._getItemData();if(this._isAsyncRendering=!1,this.erase(),!(this.isVisible()&&n&&n.length))return this;if(this._insideLegendGroup=this._renderer.g().enableLinks().append(this._legendGroup),this._title.changeLink(this._insideLegendGroup),this._createBackground(),this._title.hasText()){var i=this._background?2*this._options.paddingLeftRight:0;this._title.draw(t-i,e)}return this._markersGroup=this._renderer.g().attr({class:this._itemGroupClass}).append(this._insideLegendGroup),this._createItems(n),this._updateElementsPosition(t,e),this},_measureElements:function(){var t=this._options,e=0;this._items.forEach((function(n){var i=n.label.getBBox(),o=n.marker.getBBox();n.markerBBox=o,n.markerSize=Math.max(o.width,o.height);var r=function(t,e,n){var i,o;switch(t.itemTextPosition){case T:case I:i=e.width+7+n.width,o=_(e.height,n.height);break;case E:case O:i=_(e.width,n.width),o=e.height+4+n.height}return{width:i,height:o}}(t,o,i);n.labelBBox=i,n.bBox=r,e=_(e,r.height)})),t.equalRowHeight&&this._items.forEach((function(t){return t.bBox.height=e}))},_updateElementsPosition:function(t,e){var n=this._options;this._size={width:t,height:e},this._measureElements(),this._locateElements(n),this._finalUpdate(n);var i=this.getLayoutOptions();(i.width>t||i.height>e)&&this.freeSpace()},_createItems:function(t){var e=this,n=e._options,i=e._renderer,a=$(n.markerShape);e._markersId={};var s=n.markerTemplate?n.markerTemplate:function(t,e){var n=t.marker;a(i,n.size).attr({fill:n.fill,opacity:n.opacity}).append({element:e})},l=e._widget._getTemplate(s),u=e._markersGroup;u.css((0,o.patchFontOptions)(n.font));var c=[];e._items=(t||[]).map((function(t,o){var a=t.states,s=a.normal,d=s.fill;t.size=t.marker.size;var h={normal:(0,r.extend)(s,{fill:d||n.markerColor||n.defaultColor,state:"normal"}),hover:N(a.hover,d,"hovered"),selection:N(a.selection,d,"selected")};t.states=h;var p=i.g().append(u),m=i.g().attr({class:"dxl-marker"}).append(p);c[o]=new f.Deferred;var g={label:e._createLabel(t,p),marker:m,renderer:i,group:p,tracker:{id:t.id,argument:t.argument,argumentIndex:t.argumentIndex},states:h,itemTextPosition:n.itemTextPosition,markerOffset:0,bBoxes:[],renderMarker:function(n){t.marker=L(g,n,t.size),m.clear();var i=!1;l.render({model:t,container:m.element,onRendered:function(){i=!0,c[o].resolve()}}),i||0!==m.element.childNodes.length||(e._isAsyncRendering=!0)}};return g.renderMarker(h.normal),e._createHint(t,p),void 0!==t.id&&(e._markersId[t.id]=o),g})),f.when.apply(this,c).done((function(){if(e._isAsyncRendering){var t=["LAYOUT","FULL_RENDER"];e._asyncFirstDrawing?(t.push("FORCE_FIRST_DRAWING"),e._asyncFirstDrawing=!1):t.push("FORCE_DRAWING"),e._widget._requestChange(t)}}))},_getItemData:function(){var t=this._data||[];return(this._options||{}).inverted&&(t=t.slice().reverse()),t.filter((function(t){return t.visible}))},_finalUpdate:function(t){this._adjustBackgroundSettings(t),this._setBoundingRect(t.margin)},erase:function(){var t=this._insideLegendGroup;return t&&t.dispose(),this._insideLegendGroup=this._markersGroup=this._x1=this._x2=this._y2=this._y2=null,this},_locateElements:function(t){this._moveInInitialValues(),this._locateRowsColumns(t)},_moveInInitialValues:function(){this._title.hasText()&&this._title.move([0,0]),this._legendGroup&&this._legendGroup.move(0,0),this._background&&this._background.attr({x:0,y:0,width:0,height:0})},applySelected:function(t){return F(t,this._markersId,this._items,"selection"),this},applyHover:function(t){return F(t,this._markersId,this._items,"hover"),this},resetItem:function(t){return F(t,this._markersId,this._items,"normal"),this},_createLabel:function(t,e){var n=this._getCustomizeObject(t),i=this._options,r=function(t){switch(t){case E:case O:return k;case T:return I;case I:return T}}(i.itemTextPosition),a=i.customizeText.call(n,n),s=b(t.textOpacity)?{color:i.font.color,opacity:t.textOpacity}:{};return this._renderer.text(a,0,0).css((0,o.patchFontOptions)(s)).attr({align:r,class:i.cssClass}).append(e)},_createHint:function(t,e){var n=this._getCustomizeObject(t),i=this._options.customizeHint.call(n,n);b(i)&&""!==i&&e.setTitle(i)},_createBackground:function(){var t="inside"===this._options.position,e=this._options.backgroundColor,n=e||(t?this._options.containerBackgroundColor:"none");(this._options.border.visible||(t||e)&&"none"!==e)&&(this._background=this._renderer.rect(0,0,0,0).attr({fill:n,class:this._backgroundClass}).append(this._insideLegendGroup))},_locateRowsColumns:function(t){var e,n=0,i=this._getItemsLayoutOptions(),o=this._items.length;do{e=[],this._createLines(e,i),this._alignLines(e,i),n++}while(W(e,i,o,t.margin)&&nn.width&&(n.width=e.width),n},getActionCallback:function(t){var e=this;return e._options.visible?function(n){e[n](t.index)}:d.noop},getLayoutOptions:function(){var t=this._options,e=this._insideLegendGroup?this._boundingRect:{width:0,height:0,x:0,y:0};return t?(e.verticalAlignment=t.verticalAlignment,e.horizontalAlignment=t.horizontalAlignment,"horizontal"===t.orientation||t.horizontalAlignment===k?(e.cutLayoutSide=t.verticalAlignment,e.cutSide="vertical"):(e.cutLayoutSide=t.horizontalAlignment,e.cutSide="horizontal"),e.position={horizontal:t.horizontalAlignment,vertical:t.verticalAlignment},e):null},shift:function(t,e){var n={};return this._insideLegendGroup&&this._insideLegendGroup.attr({translateX:t-this._boundingRect.x,translateY:e-this._boundingRect.y}),this._title&&this._shiftTitle(this._boundingRect.widthWithoutMargins),this._markersGroup&&this._shiftMarkers(),this._insideLegendGroup&&(n=this._legendGroup.getBBox()),this._x1=n.x,this._y1=n.y,this._x2=n.x+n.width,this._y2=n.y+n.height,this},_shiftTitle:function(t){var e=this._title,n=e.getCorrectedLayoutOptions();if(n&&e.hasText()){var i=t-(this._background?2*this._options.paddingLeftRight:0),o=e.getOptions(),r=n.y+o.margin.top,a=0;o.verticalAlignment===O&&this._markersGroup&&(r+=this._markersGroup.getBBox().height),o.horizontalAlignment===I?a=i-n.width:o.horizontalAlignment===k&&(a=(i-n.width)/2),e.shift(a,r)}},_shiftMarkers:function(){var t=this._title.getLayoutOptions(),e=this._markersGroup.getBBox(),n=this._title.getOptions()||{},i=0,o=0;t.width>e.width&&this._options.horizontalAlignment===k&&(i=t.width/2-e.width/2),n.verticalAlignment===E&&(o=t.height),0===i&&0===o||(this._markersGroup.attr({translateX:i,translateY:o}),this._items.forEach((function(t){t.tracker.left+=i,t.tracker.right+=i,t.tracker.top+=o,t.tracker.bottom+=o})))},getPosition:function(){return this._options.position},coordsIn:function(t,e){return t>=this._x1&&t<=this._x2&&e>=this._y1&&e<=this._y2},getItemByCoord:function(t,e){var n=this._items,i=this._insideLegendGroup;t-=i.attr("translateX"),e-=i.attr("translateY");for(var o=0;o=0?n.ratio||0:((0,c.isDefined)(n.shrink)?n.shrink:1)*i,l=s>=0?o:r;return i+(l?Math.round(s*a/l):0)}(u);l+=h,u.css(E[n],d.maxSize||"none").css(T[n],d.minSize||"0").css(R[n],h),u.addClass("dx-box-fallback-item")})),this.totalItemSize=l}},{key:"_baseSize",value:function(t){var e=(0,i.default)(t).data("dxBoxItemData");return null==e.baseSize?0:"auto"===e.baseSize?this._contentSize(t):this._parseSize(e.baseSize)}},{key:"_contentSize",value:function(t){return(0,i.default)(t)[R[this._option("direction")]]()}},{key:"_parseSize",value:function(t){return String(t).match(/.+%$/)?.01*parseFloat(t)*this._boxSizeValue:t}},{key:"_boxSize",value:function(t){if(!arguments.length)return this._boxSizeValue=this._boxSizeValue||this._totalBaseSize(),this._boxSizeValue;this._boxSizeValue=t}},{key:"_totalBaseSize",value:function(){var t=this,e=0;return(0,h.each)(this._$items,(function(n,i){e+=t._baseSize(i)})),e}},{key:"initSize",value:function(){this._boxSize(this._$element[R[this._option("direction")]]())}},{key:"update",value:function(){if(this._$items&&!this._$element.is(":hidden")){this._$items.detach(),this.initSize(),this._$element.append(this._$items),this.renderItems(this._$items),this.renderAlign(),this.renderCrossAlign();var t=this._$element.get(0);this._$items.find(".dx-box").each((function(){t===(0,i.default)(this).parent().closest(".dx-box").get(0)&&o.default.triggerHandler(this,"dxupdate.dxBox")}))}}}]),t}(),U=function(t){x(n,t);var e=S(n);function n(){return v(this,n),e.apply(this,arguments)}return b(n,[{key:"_getDefaultOptions",value:function(){return(0,a.extend)(w(I(n.prototype),"_getDefaultOptions",this).call(this),{direction:"row",align:"start",crossAlign:"stretch",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,_layoutStrategy:"flex",_queue:void 0})}},{key:"_defaultOptionsRules",value:function(){return w(I(n.prototype),"_defaultOptionsRules",this).call(this).concat([{device:function(){return f.default.msie},options:{_layoutStrategy:"fallback"}}])}},{key:"_itemClass",value:function(){return"dx-box-item"}},{key:"_itemDataKey",value:function(){return"dxBoxItemData"}},{key:"_itemElements",value:function(){return this._itemContainer().children(this._itemSelector())}},{key:"_init",value:function(){w(I(n.prototype),"_init",this).call(this),this.$element().addClass("".concat("dx-box","-").concat(this.option("_layoutStrategy"))),this._initLayout(),this._initBoxQueue()}},{key:"_initLayout",value:function(){this._layout="fallback"===this.option("_layoutStrategy")?new W(this.$element(),this.option.bind(this)):new H(this.$element(),this.option.bind(this))}},{key:"_initBoxQueue",value:function(){this._queue=this.option("_queue")||[]}},{key:"_queueIsNotEmpty",value:function(){return!this.option("_queue")&&!!this._queue.length}},{key:"_pushItemToQueue",value:function(t,e){this._queue.push({$item:t,config:e})}},{key:"_shiftItemFromQueue",value:function(){return this._queue.shift()}},{key:"_initMarkup",value:function(){this.$element().addClass("dx-box"),this._layout.renderBox(),w(I(n.prototype),"_initMarkup",this).call(this),this._renderAlign(),this._renderActions()}},{key:"_renderActions",value:function(){this._onItemStateChanged=this._createActionByOption("onItemStateChanged")}},{key:"_renderAlign",value:function(){this._layout.renderAlign(),this._layout.renderCrossAlign()}},{key:"_renderItems",value:function(t){var e=this;for(this._layout.initSize(),w(I(n.prototype),"_renderItems",this).call(this,t);this._queueIsNotEmpty();){var i=this._shiftItemFromQueue();this._createComponent(i.$item,n,(0,a.extend)({_layoutStrategy:this.option("_layoutStrategy"),itemTemplate:this.option("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this.option("onItemHold"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),_queue:this._queue},i.config))}this._layout.renderItems(this._itemElements()),clearTimeout(this._updateTimer),this._updateTimer=setTimeout((function(){e._isUpdated||e._layout.update(),e._isUpdated=!1,e._updateTimer=null}))}},{key:"_renderItemContent",value:function(t){var e=t.itemData&&t.itemData.node;return e?this._renderItemContentByNode(t,e):w(I(n.prototype),"_renderItemContent",this).call(this,t)}},{key:"_postprocessRenderItem",value:function(t){var e=t.itemData.box;e&&this._pushItemToQueue(t.itemContent,e)}},{key:"_createItemByTemplate",value:function(t,e){return e.itemData.box?t.source?t.source():(0,i.default)():w(I(n.prototype),"_createItemByTemplate",this).call(this,t,e)}},{key:"_visibilityChanged",value:function(t){t&&this._dimensionChanged()}},{key:"_dimensionChanged",value:function(){this._updateTimer||(this._isUpdated=!0,this._layout.update())}},{key:"_dispose",value:function(){clearTimeout(this._updateTimer),w(I(n.prototype),"_dispose",this).apply(this,arguments)}},{key:"_itemOptionChanged",value:function(t,e,i,o){"visible"===e&&this._onItemStateChanged({name:e,state:i,oldState:!1!==o}),w(I(n.prototype),"_itemOptionChanged",this).call(this,t,e,i)}},{key:"_optionChanged",value:function(t){switch(t.name){case"_layoutStrategy":case"_queue":case"direction":this._invalidate();break;case"align":this._layout.renderAlign();break;case"crossAlign":this._layout.renderCrossAlign();break;default:w(I(n.prototype),"_optionChanged",this).call(this,t)}}},{key:"_itemOptions",value:function(){var t=this,e=w(I(n.prototype),"_itemOptions",this).call(this);return e.fireItemStateChangedAction=function(e){t._onItemStateChanged(e)},e}},{key:"repaint",value:function(){this._dimensionChanged()}}]),n}(m.default);U.ItemClass=j,(0,r.default)("dxBox",U),t.exports=U,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(0).extend,o=Math,r=o.floor,a=o.abs,s=n(141);function l(t){var e=t.initialValue,n=t._getValTranslator().getBusinessRange().invert,i="discrete"===t.series.valueAxisType,o=t.series.isFullStackedSeries();return!i&&(e>=0&&!n||e<0&&n)||i&&!n||o?"top":"bottom"}t.exports=i({},s,{correctCoordinates:function(t){var e=r(t.offset-t.width/2);this._options.rotated?(this.height=t.width,this.yCorrection=e,this.xCorrection=null):(this.width=t.width,this.xCorrection=e,this.yCorrection=null)},_getGraphicBBox:function(t){var e={x:this.x,y:this.y,width:this.width,height:this.height};if(t){var n="top"===t;this._options.rotated?(e.x=n?e.x+e.width:e.x,e.width=0):(e.y=n?e.y:e.y+e.height,e.height=0)}return e},_getLabelConnector:function(t){return this._getGraphicBBox(t)},_getLabelPosition:function(){var t=l(this);return this._options.rotated&&(t="top"===t?"right":"left"),t},_getLabelCoords:function(t){return 0===this.initialValue&&this.series.isFullStackedSeries()?this._options.rotated?this._getLabelCoordOfPosition(t,"right"):this._getLabelCoordOfPosition(t,"top"):"inside"===t.getLayoutOptions().position?this._getLabelCoordOfPosition(t,"inside"):s._getLabelCoords.call(this,t)},_drawLabel:function(){this._label.pointPosition="inside"!==this._label.getLayoutOptions().position&&l(this),s._drawLabel.call(this)},hideInsideLabel:function(t,e){var n=this._getGraphicBBox(),i=t.getBoundingRect();return!(!this._options.resolveLabelsOverlapping||!(e.y<=n.y&&e.y+i.height>=n.y+n.height||e.x<=n.x&&e.x+i.width>=n.x+n.width)||e.y>n.y+n.height||e.y+i.heightn.x+n.width||e.x+i.width=0,i=this._getValTranslator().getBusinessRange().invert,o=this.x,r=this.y,a=this.width,s=this.height;return this._options.rotated?(e=r+s/2,t=i?n?o:o+a:n?o+a:o):(t=o+a/2,e=i?n?r+s:r:n?r:r+s),{x:t,y:e,offset:0}},getTooltipParams:function(t){if("edge"===t)return this._getEdgeTooltipParams();var e=this.getCenterCoord();return e.offset=0,e},getCenterCoord:function(){var t=this.width,e=this.height;return{x:this.x+t/2,y:this.y+e/2}},_truncateCoord:function(t,e){return null===t?t:te[1]?e[1]:t},_getErrorBarBaseEdgeLength:function(){return this._options.rotated?this.height:this.width},_translateErrorBars:function(t){s._translateErrorBars.call(this),(this._errorBarPost[1])&&(this._errorBarPos=void 0)},_translate:function(){var t,e,n,i=this._options.rotated,o=i?"x":"y",r=i?"y":"x",s=i?"width":"height",l=i?"height":"width",u=this._getArgTranslator(),c=this._getValTranslator(),d=this.series.getArgumentAxis().getVisibleArea(),h=this.series.getValueAxis().getVisibleArea();t=u.translate(this.argument),this[r]=t=null===t?t:t+(this[r+"Correction"]||0),e=c.translate(this.value,1),n=c.translate(this.minValue),this["v"+o]=e,this["v"+r]=t+this[l]/2,e=this._truncateCoord(e,h),n=this._truncateCoord(n,h),this[s]=a(e-n),e=ed[1]&&(this[l]=d[1]-this[r]))},_updateMarker:function(t,e){this.graphic.smartAttr(i({},e,t?{}:this.getMarkerCoords()))},getMarkerCoords:function(){var t=this.x,e=this.y,n=this.width,i=this.height,o=this.series.getArgumentAxis(),r=this._options.rotated;if(o.getAxisPosition){var a=o.getOptions(),s=Math.round(a.width/2),l=o.getAxisPosition();if(a.visible)if(r){var u=this.minX===this.defaultX&&this.minX===l-o.getAxisShift();t+=u?s:0,(n-=u?s:0)<0&&(n=0)}else(i-=this.minY===this.defaultY&&this.minY===l-o.getAxisShift()?s:0)<0&&(i=0)}return{x:t,y:e,width:n,height:i}},coordsIn:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}})},function(t,e,n){"use strict";var i=n(13),o=n(2),r=n(4),a=Math.abs,s=Math.floor,l=Math.ceil,u=Math.min;function c(t,e,n){t.min=t.minn?t.max:n}function d(t,e){if("logarithmic"!==t)return null;var n=e.getOptions().logarithmBase;return function(t){var e=(0,i.getLog)(a(t),n);return(e<0?s:l)(e)}}function h(t,e,n){var i=c;return"discrete"===t?i=function(t,e,n){e!==n&&t.categories.push(n),t.categories.push(e)}:e&&(i=function(t,n){var i=e.calculateInterval(n,t.prevValue),o=t.interval;t.interval=(o=0||t.type.toLowerCase().indexOf("area")>=0}function _(t){var e=h(t.valueAxisType),n=t.getArgumentAxis(),a=n&&t.getArgumentAxis().visualRange()||{},s=g(t)?m:r.noop;if(n&&n.getMarginOptions().checkInterval){var l=t.getArgumentAxis().getTranslator().getBusinessRange(),u=(0,i.getAddFunction)(l,!1),c=l.interval;isFinite(c)&&(0,o.isDefined)(a.startValue)&&(0,o.isDefined)(a.endValue)&&(a.startValue=u(a.startValue,c,-1),a.endValue=u(a.endValue,c))}var d=v(a);return function(t,n,i,r){var l=n.argument;return n.hasValue()?(d(l)?(t.startCalc||(t.startCalc=!0,s(e,t,n,r[i-1],a.startValue)),e(t,n.getMinValue(),n.getMaxValue())):!a.categories&&(0,o.isDefined)(a.startValue)&&l>a.startValue&&(t.startCalc||s(e,t,n,r[i-1],a.startValue),t.endCalc=!0,s(e,t,n,r[i-1],a.endValue)),t):t}}function v(t){if(t.categories){var e=t.categories.reduce((function(t,e){return t[e.valueOf()]=!0,t}),{});return function(t){return(0,o.isDefined)(t)&&e[t.valueOf()]}}return(0,o.isDefined)(t.startValue)||(0,o.isDefined)(t.endValue)?(0,o.isDefined)(t.endValue)?(0,o.isDefined)(t.startValue)?function(e){return e>=t.startValue&&e<=t.endValue}:function(e){return e<=t.endValue}:function(e){return e>=t.startValue}:function(){return!0}}t.exports={getViewPortFilter:v,getArgumentRange:function(t){var e=t._data||[],n={};if(e.length)if("discrete"===t.argumentAxisType)n={categories:e.map((function(t){return t.argument}))};else{var i;if(e.length>1){var o=t.getArgumentAxis().calculateInterval(e[0].argument,e[1].argument),r=t.getArgumentAxis().calculateInterval(e[e.length-1].argument,e[e.length-2].argument);i=u(o,r)}n={min:e[0].argument,max:e[e.length-1].argument,interval:i}}return p(n)},getRangeData:function(t){var e=t.getPoints(),n=t.useAggregation(),i=h(t.argumentAxisType,e.length>1&&t.getArgumentAxis(),d(t.argumentAxisType,t.getArgumentAxis())),r=h(t.valueAxisType,null,d(t.valueAxisType,t.getValueAxis())),a=_(t),s=e.reduce((function(t,e,n,o){var s=e.argument;return e.isArgumentCorrect()?(i(t.arg,s,s),e.hasValue()&&(r(t.val,e.getMinValue(),e.getMaxValue()),a(t.viewport,e,n,o)),t):t}),{arg:f(t.argumentAxisType,t.argumentType),val:f(t.valueAxisType,t.valueType,e.length?t.getValueRangeInitialValue():void 0),viewport:f(t.valueAxisType,t.valueType,e.length?t.getValueRangeInitialValue():void 0)});if(n){var l=this.getArgumentRange(t);if("discrete"===t.argumentAxisType)s.arg=l;else{var u=t.getArgumentAxis().getViewport();((0,o.isDefined)(u.startValue)||(0,o.isDefined)(u.length))&&i(s.arg,l.min,l.min),((0,o.isDefined)(u.endValue)||(0,o.isDefined)(u.length)&&(0,o.isDefined)(u.startValue))&&i(s.arg,l.max,l.max)}}return p(s.arg),p(s.val),s},getViewport:function(t){var e,n=t.getPoints(),i=_(t);return e=f(t.valueAxisType,t.valueType,n.length?t.getValueRangeInitialValue():void 0),n.some((function(t,o){return i(e,t,o,n),e.endCalc})),e},getPointsInViewPort:function(t){var e=v(t.getArgumentAxis().visualRange()||{}),n=t.getValueAxis().visualRange()||{},i=v(n),o=t.getPoints(),a=function(t,e,o){var r=e.getMinValue(),a=e.getMaxValue(),s=i(r),l=i(a);s&&t.push(r),a!==r&&l&&t.push(a),!o||s||l||(t.length?t.push(n.endValue):t.push(n.startValue))},s=g(t)?function(t,n,i){var o=n[i],r=n[i-1],s=n[i+1];s&&e(s.argument)&&a(t[1],o,!0),r&&e(r.argument)&&a(t[1],o,!0)}:r.noop;return o.reduce((function(t,n,i){return e(n.argument)?a(t[0],n):s(t,o,i),t}),[[],[]])}}},function(t,e,n){"use strict";var i=n(124),o=i.chart,r=i.polar,a=n(54),s=n(0).extend,l=n(5).each,u=n(13),c=n(37),d=u.normalizeAngle,h=u.map,f=s,p=l,m=Math.round,g=Math.sqrt,_=Math.pow,v=Math.min,y=Math.max,b=Math.abs;function w(t,e,n,i){var o=a.clone(t);return o.x=e,o.y=n,o.angle=i,o}function x(t,e,n,i,o){var r=t.angle+o,a=u.getCosAndSin(r);return w(e,n.x+(t.radius+i*o)*a.cos,n.y-(t.radius+i*o)*a.sin,r)}e.chart={},e.polar={};var C={autoHidePointMarkersEnabled:function(){return!0},_applyGroupSettings:function(t,e,n){e=f(e,t),this._applyElementsClipRect(e),n.attr(e)},_setGroupsSettings:function(t){var e=this._styles.normal;this._applyGroupSettings(e.elements,{class:"dxc-elements"},this._elementsGroup),this._bordersGroup&&this._applyGroupSettings(e.border,{class:"dxc-borders"},this._bordersGroup),o._setGroupsSettings.call(this,t),t&&this._markersGroup&&this._markersGroup.attr({opacity:.001})},_createGroups:function(){this._createGroup("_elementsGroup",this,this._group),this._areBordersVisible()&&this._createGroup("_bordersGroup",this,this._group),o._createGroups.call(this)},_areBordersVisible:function(){return!1},_getDefaultSegment:function(t){return{line:h(t.line||[],(function(t){return t.getDefaultCoords()}))}},_prepareSegment:function(t){return{line:t}},_parseLineOptions:function(t,e){return{stroke:t.color||e,"stroke-width":t.width,dashStyle:t.dashStyle||"solid"}},_parseStyle:function(t,e){return{elements:this._parseLineOptions(t,e)}},_applyStyle:function(t){this._elementsGroup&&this._elementsGroup.attr(t.elements),p(this._graphics||[],(function(e,n){n.line&&n.line.attr({"stroke-width":t.elements["stroke-width"]}).sharp()}))},_drawElement:function(t,e){return{line:this._createMainElement(t.line,{"stroke-width":this._styles.normal.elements["stroke-width"]}).append(e)}},_removeElement:function(t){t.line.remove()},_updateElement:function(t,e,n,i){var o={points:e.line},r=t.line;n?r.animate(o,{},i):r.attr(o)},_animateComplete:function(){o._animateComplete.call(this),this._markersGroup&&this._markersGroup.animate({opacity:1},{duration:this._defaultDuration})},_animate:function(){var t=this,e=t._graphics.length-1;p(t._graphics||[],(function(n,i){var o;n===e&&(o=function(){t._animateComplete()}),t._updateElement(i,t._segments[n],!0,o)}))},_drawPoint:function(t){o._drawPoint.call(this,{point:t.point,groups:t.groups})},_createMainElement:function(t,e){return this._renderer.path(t,"line").attr(e)},_sortPoints:function(t,e){return e?t.sort((function(t,e){return e.y-t.y})):t.sort((function(t,e){return t.x-e.x}))},_drawSegment:function(t,e,n,i){var o=this._options.rotated,r=this._prepareSegment(t,o,i);this._segments.push(r),this._graphics[n]?e||this._updateElement(this._graphics[n],r):this._graphics[n]=this._drawElement(e?this._getDefaultSegment(r):r,this._elementsGroup)},_getTrackerSettings:function(){var t=this._defaultTrackerWidth,e=this._styles.normal.elements["stroke-width"];return{"stroke-width":e>t?e:t,fill:"none"}},_getMainPointsFromSegment:function(t){return t.line},_drawTrackerElement:function(t){return this._createMainElement(this._getMainPointsFromSegment(t),this._getTrackerSettings(t))},_updateTrackerElement:function(t,e){var n=this._getTrackerSettings(t);n.points=this._getMainPointsFromSegment(t),e.attr(n)},checkSeriesViewportCoord:function(t,e){if(0===this._points.length)return!1;var n=t.isArgumentAxis?this.getArgumentRange():this.getViewport(),i=t.getTranslator().translate(n.categories?n.categories[0]:n.min),o=t.getTranslator().translate(n.categories?n.categories[n.categories.length-1]:n.max),r=this.getOptions().rotated,a=t.getOptions().inverted;return t.isArgumentAxis&&(!r&&!a||r&&a)||!t.isArgumentAxis&&(r&&!a||!r&&a)?e>=i&&e<=o:e>=o&&e<=i}},S=e.chart.line=f({},o,C,{getPointCenterByArg:function(t){var e=this.getArgumentAxis().getTranslator().translate(t);return{x:e,y:e}},getSeriesPairCoord:function(t,e){for(var n=null,i=this._getNearestPointsByCoord(t,e),o=e&&!this._options.rotated||!e&&this._options.rotated,r=0;re&&n>t||t=v.y&&x>=y.y)||e&&(b<=v.x&&b<=y.x||b>=v.x&&b>=y.x)))e?(l=a=b,u=(x+y.y)/2,s=(x+v.y)/2):(u=s=x,l=(b+y.x)/2,a=(b+v.x)/2);else{if(p=f-h,m=c-d,g=h*d-c*f,e){if(!p)return void n.push(t,t,t);c-=_=-1*(m*x+g)/p-b,d-=_}else{if(!m)return void n.push(t,t,t);h-=_=-1*(p*b+g)/m-x,f-=_}l=(b+.5*d)/1.5,u=(x+.5*f)/1.5,a=(b+.5*c)/1.5,s=(x+.5*h)/1.5}e?(a=o(v.x,b,a),l=o(y.x,b,l)):(s=o(v.y,x,s),u=o(y.y,x,u));var C=w(t,a,s),S=w(t,l,u);n.push(C,t,S)}else n.push(t,t)})):n.push(i[0]),n},_prepareSegment:function(t,e){return S._prepareSegment(this._calculateBezierPoints(t,e))},_createMainElement:function(t,e){return this._renderer.path(t,"bezier").attr(e)},getSeriesPairCoord:function(t,e){for(var n=null,i=!e&&!this._options.rotated||e&&this._options.rotated,o=i?"vy":"vx",r=i?"y":"x",a=i?"vx":"vy",s=i?"x":"y",l=(e?this.getValueAxis():this.getArgumentAxis()).getVisibleArea(),u=this._getNearestPointsByCoord(t,e),d=function(e){var i=u[e];1===i.length?l[0]<=i[0][a]&&l[1]>=i[0][a]&&(n=i[0][a]):function(t,e,n,i,o){var r=e-t,a=3*n-3*e,s=3*i-6*n+3*e,l=o-3*i+3*n-e;return c.solveCubicEquation(l,s,a,r)}(t,i[0][o],i[1][r],i[2][r],i[3][o]).forEach((function(t){if(t>=0&&t<=1){var e=Math.pow(1-t,3)*i[0][a]+3*Math.pow(1-t,2)*t*i[1][s]+3*(1-t)*t*t*i[2][s]+t*t*t*i[3][a];l[0]<=e&&l[1]>=e&&(n=e)}}));if(null!==n)return"break"},h=0;h0?this._segments.reduce((function(t,e){return t.concat(e.line)}),[]):[]}}),e.polar.line=f({},r,C,{_sortPoints:function(t){return t},_prepareSegment:function(t,e,n){var i,o=[],r=this.getValueAxis().getCenter();if(n&&this._closeSegment(t),"discrete"===this.argumentAxisType||"discrete"===this.valueAxisType)return S._prepareSegment.call(this,t);for(i=1;i=0?360-e:-e},_closeSegment:function(t){var e;e=this._segments.length?this._segments[0].line[0]:w(t[0],t[0].x,t[0].y,t[0].angle),(e=this._modifyReflectedPoint(e,t[t.length-1]))&&t.push(e)},_modifyReflectedPoint:function(t,e){if(e.angle!==t.angle){if(d(m(e.angle))===d(m(t.angle)))t.angle=e.angle;else{var n=e.angle-t.angle;t.angle=e.angle+this._getRemainingAngle(n)}return t}},_getTangentPoints:function(t,e,n){var i,o=[],r=Math.round(e.angle-t.angle),a=(e.radius-t.radius)/r;if(0===r)o=[e,t];else if(r>0)for(i=r;i>=0;i--)o.push(x(t,e,n,a,i));else for(i=0;i>=r;i--)o.push(x(t,e,n,a,r-i));return o},getSeriesPairCoord:function(t,e){var n,i=this.getArgumentAxis(),o=e?"angle":"radius",r=t[o],a=i.getCenter(),s=function(t,e,n){var o,r,s=n.x,l=n.y;return g(_((o={x:s,y:l}).x-(r=a).x,2)+_(o.y-r.y,2))<=i.getRadius()&&v(t.x,e.x)<=s&&y(t.x,e.x)>=s&&v(t.y,e.y)<=l&&y(t.y,e.y)>=l},l=this.getNeighborPoints(r,o);if(1===l.length)n=l[0];else if(l.length>1){var d,h,f=l[0],p=l[1];if("discrete"!==this.argumentAxisType&&"discrete"!==this.valueAxisType)e?(d=(f.radius-p.radius)/(f.angle-p.angle),h=r-p.angle):(d=(f.radius-p.radius)/(f.angle-p.angle),h=(r-p.radius)/d),n=x(p,f,a,d,h);else if(e){var m=u.getCosAndSin(-r),w=(p.y-f.y)/(p.x-f.x),C=f.y-f.x*w,S=m.sin/m.cos,k=(a.y-S*a.x-C)/(w-S),I=w*k+C;if(s(f,p,{x:k,y:I})){var T=b(c.trunc((360+r)/90)%4);(0===T&&k>=a.x&&I<=a.y||1===T&&k<=a.x&&I<=a.y||2===T&&k<=a.x&&I>=a.y||3===T&&k>=a.x&&I>=a.y)&&(n={x:k,y:I})}}else{var E=(p.y-f.y)/(p.x-f.x),O=f.y-f.x*E,M=1+E*E,P=-2*a.x+2*E*O-2*E*a.y,D=P*P-4*M*(-_(r,2)+_(O-a.y,2)+_(a.x,2));if(D>=0){var A=(-P-g(D))/(2*M),R=(-P+g(D))/(2*M),B=E*A+O,N=E*R+O;n=s(f,p,{x:A,y:B})?{x:A,y:B}:s(f,p,{x:R,y:N})?{x:R,y:N}:void 0}}}return n},getNeighborPoints:function(t,e){var n=this.getPoints(),i=[];if(this.getOptions().closed){var o=(n=f(!0,[],n))[n.length-1],r=w(n[0],n[0].x,n[0].y,n[0].angle),a=w(o,o.x,o.y,o.angle),s=this._modifyReflectedPoint(r,o),l=this._modifyReflectedPoint(a,n[0]);l&&n.unshift(l),s&&n.push(s)}for(var u=1;ut&&n[u-1][e]t&&n[u][e]0));u++);return i}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.plugins=e.__test_utils=e.createAnnotations=void 0;var i=n(15),o=n(2),r=n(122),a=n(0),s=n(13),l=n(396),u=f(n(28)),c=f(n(101)),d=n(11),h=f(n(6));function f(t){return t&&t.__esModule?t:{default:t}}var p=(0,d.addNamespace)([u.default.down,u.default.move],"annotations"),m=(0,d.addNamespace)(u.default.up,"annotations"),g=c.default.start+".annotations",_=c.default.move+".annotations",v=c.default.end+".annotations";function y(t,e){return{draw:function(n,i){var r=this,u=n._renderer.g().append(i).css((0,s.patchFontOptions)(t.font));this.plaque=new l.Plaque((0,a.extend)(!0,{},t,{cornerRadius:(t.border||{}).cornerRadius}),n,u,e,(0,o.isDefined)(t.value)||(0,o.isDefined)(t.argument)),this.plaque.draw(n._getAnnotationCoords(this)),t.allowDragging&&u.on(g,{immediate:!0},(function(t){r._dragOffsetX=r.plaque.x-t.pageX,r._dragOffsetY=r.plaque.y-t.pageY})).on(_,(function(t){r.plaque.move(t.pageX+r._dragOffsetX,t.pageY+r._dragOffsetY)})).on(v,(function(t){r.offsetX=(r.offsetX||0)+t.offset.x,r.offsetY=(r.offsetY||0)+t.offset.y}))},hitTest:function(t,e){return this.plaque.hitTest(t,e)},showTooltip:function(t,e){var n=e.x,i=e.y;t.annotation!==this?(t.setTemplate(this.options.tooltipTemplate),t.show(this.options,{x:n,y:i},{target:this.options},this.options.customizeTooltip)&&(t.annotation=this)):t.move(n,i)}}}function b(t,e){var n;return"text"===t.type?n=function(t,n){var i=e._renderer.text(t.text).attr({class:t.cssClass}).append({element:n});(t.width>0||t.height>0)&&i.setMaxSize(t.width,t.height,{wordWrap:t.wordWrap,textOverflow:t.textOverflow})}:"image"===t.type?n=function(t,n){var i=t.image||{},o=i.width,r=i.height,a=i.url,s=i.location,l=t.width,u=t.height,c=l>0?Math.min(o,l):o,d=u>0?Math.min(r,u):r;e._renderer.image(0,0,c,d,a,s||"center").append({element:n})}:"custom"===t.type&&(n=t.template),n}function w(t){return"string"===typeof t?{url:t}:t}var x=e.createAnnotations=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,s=w(n.image);return e.reduce((function(e,l){var u=w(l.image),c=(0,o.isFunction)(i)?i(l):{};c&&(c.image=w(c.image));var d=(0,a.extend)(!0,{},n,l,{image:s},{image:u},c),h=b(d,t),f=h&&(0,a.extend)(!0,r(d),y(d,t._getTemplate(h)));return f&&e.push(f),e}),[])},C={name:"annotations_chart",init:function(){},dispose:function(){},members:{_getAnnotationCoords:function(t){var e,n,i,r,a={offsetX:t.offsetX,offsetY:t.offsetY},s=this._options.silent("rotated")?"y":"x",l=this._options.silent("rotated")?"x":"y",u=this.getArgumentAxis(),c=u.validateUnit(t.argument),d=this.getValueAxis(t.axis),h=null===(e=d)||void 0===e?void 0:e.pane;t.series&&(i=this.series.filter((function(e){return e.name===t.series}))[0],d=null===(r=i)||void 0===r?void 0:r.getValueAxis(),(0,o.isDefined)(d)&&(h=d.pane));if((0,o.isDefined)(c)){if(i){var f=i.getPointCenterByArg(c);f&&(a[s]=f[s])}else a[s]=u.getTranslator().translate(c);!(0,o.isDefined)(h)&&(h=u.pane)}var p,m,g=null===(n=d)||void 0===n?void 0:n.validateUnit(t.value);(0,o.isDefined)(g)&&(a[l]=null===(p=d)||void 0===p?void 0:p.getTranslator().translate(g),!(0,o.isDefined)(h)&&(0,o.isDefined)(d)&&(h=d.pane));(a.canvas=this._getCanvasForPane(h),(0,o.isDefined)(a[s])&&!(0,o.isDefined)(g))&&((0,o.isDefined)(d)||(0,o.isDefined)(i)?(0,o.isDefined)(d)&&!(0,o.isDefined)(i)?a[l]=this._argumentAxes.filter((function(t){return t.pane===d.pane}))[0].getAxisPosition():(null===(m=i)||void 0===m?void 0:m.checkSeriesViewportCoord(u,a[s]))&&(a[l]=i.getSeriesPairCoord(a[s],!0)):a[l]=u.getAxisPosition());return!(0,o.isDefined)(c)&&(0,o.isDefined)(a[l])&&((0,o.isDefined)(d)&&!(0,o.isDefined)(i)?a[s]=d.getAxisPosition():(0,o.isDefined)(i)&&i.checkSeriesViewportCoord(d,a[l])&&(a[s]=i.getSeriesPairCoord(a[l],!1))),a},_annotationsPointerEventHandler:function(t){var e=t.originalEvent||{},n=e.touches&&e.touches[0]||{},i=this._renderer.getRootOffset(),o={x:n.pageX||e.pageX||t.pageX,y:n.pageY||e.pageY||t.pageY},r=this._annotations.items.filter((function(t){return t.hitTest(o.x-i.left,o.y-i.top)}))[0];r&&r.options.tooltipEnabled?(this.hideTooltip(),this.clearHover(),r.options.allowDragging&&t.type===u.default.down&&(this._annotations._hideToolTipForDrag=!0),this._annotations._hideToolTipForDrag||(r.showTooltip(this._annotations.tooltip,o),t.stopPropagation())):this._annotations.hideTooltip()},_pullOptions:function(t){return{type:t.type,name:t.name,x:t.x,y:t.y,value:t.value,argument:t.argument,axis:t.axis,series:t.series,options:t,offsetX:t.offsetX,offsetY:t.offsetY}}}},S={name:"annotations_polar_chart",init:function(){},dispose:function(){},members:{_getAnnotationCoords:function(t){var e,n,i={offsetX:t.offsetX,offsetY:t.offsetY,canvas:this._calcCanvas()},r=this.getArgumentAxis(),s=r.validateUnit(t.argument),l=this.getValueAxis().validateUnit(t.value),u=t.radius,c=t.angle;return t.series&&(n=this.series.filter((function(e){return e.name===t.series}))[0]),(0,a.extend)(!0,i,this.getXYFromPolar(c,u,s,l)),(0,o.isDefined)(n)&&(!(0,o.isDefined)(i.angle)||(0,o.isDefined)(l)||(0,o.isDefined)(u)?!(0,o.isDefined)(i.radius)||(0,o.isDefined)(s)||(0,o.isDefined)(c)||(e=n.getSeriesPairCoord({radius:i.radius},!1)):((0,o.isDefined)(s)||(s=r.getTranslator().from(isFinite(c)?this.getActualAngle(c):i.angle)),e=n.getSeriesPairCoord({argument:s,angle:-i.angle},!0)),(0,o.isDefined)(e)&&(i.x=e.x,i.y=e.y)),t.series&&!(0,o.isDefined)(e)&&(i.x=i.y=void 0),i},_annotationsPointerEventHandler:C.members._annotationsPointerEventHandler,_pullOptions:function(t){var e=(0,a.extend)({},{radius:t.radius,angle:t.angle},C.members._pullOptions(t));return delete e.axis,e}}},k={name:"annotations_core",init:function(){this._annotations={items:[],_hideToolTipForDrag:!1,tooltip:new r.Tooltip({cssClass:"".concat(this._rootClassPrefix,"-annotation-tooltip"),eventTrigger:this._eventTrigger,widgetRoot:this.element(),widget:this}),hideTooltip:function(){this.tooltip.annotation=null,this.tooltip.hide()}},this._annotations.tooltip.setRendererOptions(this._getRendererOptions());var t=(0,a.extend)({},this._themeManager.getOptions("tooltip"));t.contentTemplate=t.customizeTooltip=void 0,this._annotations.tooltip.update(t)},dispose:function(){this._annotationsGroup.linkRemove().linkOff(),h.default.off((0,i.getDocument)(),".annotations"),this._annotationsGroup.off(".annotations"),this._annotations.tooltip&&this._annotations.tooltip.dispose()},extenders:{_createHtmlStructure:function(){var t=this;this._annotationsGroup=this._renderer.g().attr({class:"".concat(this._rootClassPrefix,"-annotations")}).linkOn(this._renderer.root,"annotations").linkAppend(),h.default.on((0,i.getDocument)(),p,(function(){return t._annotations.hideTooltip()})),h.default.on((0,i.getDocument)(),m,(function(e){t._annotations._hideToolTipForDrag=!1,t._annotationsPointerEventHandler(e)})),this._annotationsGroup.on(p,this._annotationsPointerEventHandler.bind(this))},_renderExtraElements:function(){var t=this;this._annotationsGroup.clear(),this._annotations.items.forEach((function(e){return e.draw(t,t._annotationsGroup)}))},_stopCurrentHandling:function(){this._annotations.hideTooltip()}},members:{_buildAnnotations:function(){this._annotations.items=[];var t=this._getOption("annotations");(null===t||void 0===t?void 0:t.length)&&(this._annotations.items=x(this,t,this._getOption("commonAnnotationSettings"),this._getOption("customizeAnnotation"),this._pullOptions))},_getAnnotationCoords:function(){return{}},_pullOptions:function(){return{}}},customize:function(t){t.addChange({code:"ANNOTATIONITEMS",handler:function(){this._requestChange(["ANNOTATIONS"])},isOptionChange:!0,option:"annotations"}),t.addChange({code:"ANNOTATIONSSETTINGS",handler:function(){this._requestChange(["ANNOTATIONS"])},isOptionChange:!0,option:"commonAnnotationSettings"}),t.addChange({code:"ANNOTATIONS",handler:function(){this._buildAnnotations(),this._change(["FORCE_RENDER"])},isThemeDependent:!0,isOptionChange:!0})},fontFields:["commonAnnotationSettings.font"]};e.plugins={core:k,chart:C,polarChart:S}},function(t,e,n){"use strict";var i,o=n(421);var r=((i=o)&&i.__esModule?i:{default:i}).default;t.exports={extend:function(t){r=r.inherit(t)},create:function(t){return new r(t)}}},function(t,e,n){"use strict";t.exports=n(801),t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(4).noop,a=n(21),s=n(43),l=a.abstract,u=a.inherit({ctor:function(t){this.dateBox=t},widgetOption:function(){return this._widget&&this._widget.option.apply(this._widget,arguments)},_renderWidget:function(t){t=t||i("
"),this._widget=this._createWidget(t),this._widget.$element().appendTo(this._getWidgetContainer())},_createWidget:function(t){var e=this._getWidgetName(),n=this._getWidgetOptions();return this.dateBox._createComponent(t,e,n)},_getWidgetOptions:l,_getWidgetName:l,getDefaultOptions:function(){return{mode:"text"}},getDisplayFormat:l,supportedKeys:r,getKeyboardListener:r,customizeButtons:r,getParsedText:function(t,e){var n=s.parse(t,e);return n||s.parse(t)},renderInputMinMax:r,renderOpenedState:function(){this._updateValue()},popupConfig:l,_dimensionChanged:function(){var t;null===(t=this._getPopup())||void 0===t||t.repaint()},renderPopupContent:function(){var t=this._getPopup();this._renderWidget();var e=t.$content().parent();o.off(e,"mousedown"),o.on(e,"mousedown",this._preventFocusOnPopup.bind(this))},getFirstPopupElement:r,getLastPopupElement:r,_preventFocusOnPopup:function(t){t.preventDefault()},_getWidgetContainer:function(){return this._getPopup().$content()},_getPopup:function(){return this.dateBox._popup},popupShowingHandler:r,popupHiddenHandler:r,_updateValue:function(){this._widget&&this._widget.option("value",this.dateBoxValue())},useCurrentDateByDefault:r,getDefaultDate:function(){return new Date},textChangedHandler:r,renderValue:function(){this.dateBox.option("opened")&&this._updateValue()},getValue:function(){return this._widget.option("value")},isAdaptivityChanged:function(){return!1},dispose:function(){var t=this._getPopup();t&&t.$content().empty()},dateBoxValue:function(){return arguments.length?this.dateBox.dateValue.apply(this.dateBox,arguments):this.dateBox.dateOption.apply(this.dateBox,["value"])}});t.exports=u},function(t,e,n){"use strict";var i=p(n(57)),o=p(n(39)),r=p(n(23)),a=p(n(97)),s=n(0),l=n(5),u=p(n(136)),c=p(n(814)),d=p(n(8)),h=n(7),f=p(n(45));function p(t){return t&&t.__esModule?t:{default:t}}var m=a.default.inherit({_initOptions:function(t){this.callBase.apply(this,arguments),this.option(u.default.initValidationOptions(t))},_getDefaultOptions:function(){return(0,s.extend)(this.callBase(),{validationRules:[]})},_init:function(){this.callBase(),this._initGroupRegistration(),this.focused=(0,o.default)(),this._initAdapter(),this._validationInfo={result:null,deferred:null,skipValidation:!1}},_initGroupRegistration:function(){var t=this._findGroup();this._groupWasInit||this.on("disposing",(function(t){u.default.removeRegisteredValidator(t.component._validationGroup,t.component)})),this._groupWasInit&&this._validationGroup===t||(u.default.removeRegisteredValidator(this._validationGroup,this),this._groupWasInit=!0,this._validationGroup=t,u.default.registerValidatorInGroup(t,this))},_setOptionsByReference:function(){this.callBase(),(0,s.extend)(this._optionsByReference,{validationGroup:!0})},_initAdapter:function(){var t=this,e=this.$element()[0],n=i.default.data(e,"dx-validation-target"),o=this.option("adapter");if(!o){if(n)return(o=new c.default(n,this)).validationRequestsCallbacks.add((function(e){t._validationInfo.skipValidation||t.validate(e)})),void this.option("adapter",o);throw r.default.Error("E0120")}var a=o.validationRequestsCallbacks;a&&(Array.isArray(a)?a.push((function(e){t.validate(e)})):(r.default.log("W0014","validationRequestsCallbacks","jQuery.Callbacks","17.2","Use the array instead"),a.add((function(e){t.validate(e)}))))},_toggleRTLDirection:function(t){var e,n,i,o=null!==(e=null===(n=this.option("adapter"))||void 0===n||null===(i=n.editor)||void 0===i?void 0:i.option("rtlEnabled"))&&void 0!==e?e:t;this.callBase(o)},_initMarkup:function(){this.$element().addClass("dx-validator"),this.callBase()},_visibilityChanged:function(t){t&&this._initGroupRegistration()},_optionChanged:function(t){switch(t.name){case"validationGroup":return void this._initGroupRegistration();case"validationRules":return this._resetValidationRules(),void(void 0!==this.option("isValid")&&this.validate());case"adapter":this._initAdapter();break;case"isValid":case"validationStatus":this.option(u.default.synchronizeValidationOptions(t,this.option()));break;default:this.callBase(t)}},_getValidationRules:function(){var t=this;return this._validationRules||(this._validationRules=(0,l.map)(this.option("validationRules"),(function(e,n){return(0,s.extend)({},e,{validator:t,index:n})}))),this._validationRules},_findGroup:function(){var t=this.$element();return this.option("validationGroup")||u.default.findGroup(t,this._modelByElement(t))},_resetValidationRules:function(){delete this._validationRules},validate:function(t){var e,n=this,i=this.option("adapter"),o=this.option("name"),r=i.bypass&&i.bypass(),a=t&&void 0!==t.value?t.value:i.getValue(),l=i.getCurrentValidationError&&i.getCurrentValidationError(),c=this._getValidationRules(),d=this._validationInfo&&this._validationInfo.result;return d&&"pending"===d.status&&d.value===a?(0,s.extend)({},d):(r?e={isValid:!0,status:"valid"}:l&&l.editorSpecific?(l.validator=this,e={isValid:!1,status:"invalid",brokenRule:l,brokenRules:[l]}):e=u.default.validate(a,c,o),e.id=(new f.default).toString(),this._applyValidationResult(e,i),e.complete&&e.complete.then((function(t){t.id===n._validationInfo.result.id&&n._applyValidationResult(t,i)})),(0,s.extend)({},this._validationInfo.result))},reset:function(){var t=this.option("adapter"),e={id:null,isValid:!0,brokenRule:null,brokenRules:null,pendingRules:null,status:"valid",complete:null};this._validationInfo.skipValidation=!0,t.reset(),this._validationInfo.skipValidation=!1,this._resetValidationRules(),this._applyValidationResult(e,t)},_updateValidationResult:function(t){if(this._validationInfo.result&&this._validationInfo.result.id===t.id)for(var e in t)"id"!==e&&"complete"!==e&&(this._validationInfo.result[e]=t[e]);else{var n=this._validationInfo.deferred&&this._validationInfo.result.complete;this._validationInfo.result=(0,s.extend)({},t,{complete:n})}},_applyValidationResult:function(t,e){var n=this._createActionByOption("onValidated",{excludeValidators:["readOnly"]});if(t.validator=this,this._updateValidationResult(t),e.applyValidationResults&&e.applyValidationResults(this._validationInfo.result),this.option({validationStatus:this._validationInfo.result.status}),"pending"===this._validationInfo.result.status)return this._validationInfo.deferred||(this._validationInfo.deferred=new h.Deferred,this._validationInfo.result.complete=this._validationInfo.deferred.promise()),void this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);"pending"!==this._validationInfo.result.status&&(n(t),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(t),this._validationInfo.deferred=null))},focus:function(){var t=this.option("adapter");t&&t.focus&&t.focus()},_useTemplates:function(){return!1}});(0,d.default)("dxValidator",m),t.exports=m,t.exports.default=t.exports},function(t,e,n){"use strict";var i=x(n(3)),o=x(n(6)),r=x(n(18)),a=x(n(8)),s=x(n(42)),l=x(n(79)),u=n(11),c=n(0),d=n(2),h=x(n(28)),f=n(5),p=x(n(446)),m=x(n(36)),g=x(n(135)),_=x(n(103)),v=x(n(215)),y=n(70),b=n(73),w=n(7);function x(t){return t&&t.__esModule?t:{default:t}}var C=v.default.inherit({_activeStateUnit:".dx-tab",_getDefaultOptions:function(){return(0,c.extend)(this.callBase(),{hoverStateEnabled:!0,showNavButtons:!0,scrollByContent:!0,scrollingEnabled:!0,selectionMode:"single",activeStateEnabled:!0,selectionRequired:!1,selectOnFocus:!0,loopItemFocus:!1,useInkRipple:!1,badgeExpr:function(t){return t?t.badge:void 0}})},_defaultOptionsRules:function(){var t=m.default.current();return this.callBase().concat([{device:function(){return"desktop"!==r.default.real().deviceType},options:{showNavButtons:!1}},{device:{deviceType:"desktop"},options:{scrollByContent:!1}},{device:function(){return"desktop"===r.default.real().deviceType&&!r.default.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return m.default.isMaterial(t)},options:{useInkRipple:!0,selectOnFocus:!1}}])},_init:function(){this.callBase(),this.setAria("role","tablist"),this.$element().addClass("dx-tabs"),this._renderWrapper(),this._renderMultiple(),this._feedbackHideTimeout=100},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({item:new b.BindableTemplate(function(t,e){(0,d.isPlainObject)(e)?this._prepareDefaultItemTemplate(e,t):t.text(String(e));var n=(0,y.getImageContainer)(e.icon);n&&n.prependTo(t),t.wrapInner((0,i.default)("").addClass("dx-tab-text"))}.bind(this),["text","html","icon"],this.option("integrationOptions.watchMethod"))})},_createItemByTemplate:function(t,e){var n=this,i=e.itemData,o=e.container,r=e.index;return this._deferredTemplates[r]=new w.Deferred,t.render({model:i,container:o,index:r,onRendered:function(){return n._deferredTemplates[r].resolve()}})},_itemClass:function(){return"dx-tab"},_selectedItemClass:function(){return"dx-tab-selected"},_itemDataKey:function(){return"dxTabData"},_initMarkup:function(){this._deferredTemplates=[],this.callBase(),this.setAria("role","tab",this.itemElements()),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().addClass("dx-overflow-hidden")},_render:function(){this.callBase(),this._deferRenderScrolling()},_deferRenderScrolling:function(){var t=this;w.when.apply(this,this._deferredTemplates).done((function(){return t._renderScrolling()}))},_renderScrolling:function(){var t=["dx-tabs-stretched","dx-tabs-expanded","dx-overflow-hidden"];this.$element().removeClass(t.join(" ")),this.option("scrollingEnabled")&&this._isItemsWidthExceeded()&&(this._scrollable||(this._renderScrollable(),this._renderNavButtons()),this._scrollable.update(),this._updateNavButtonsVisibility(),this.option("rtlEnabled")&&this._scrollable.scrollTo({left:this._scrollable.scrollWidth()-this._scrollable.clientWidth()}),this._scrollToItem(this.option("selectedItem"))),this.option("scrollingEnabled")&&this._isItemsWidthExceeded()||(this._cleanScrolling(),this._needStretchItems()&&!this._isItemsWidthExceeded()&&this.$element().addClass("dx-tabs-stretched"),this.$element().removeClass("dx-tabs-nav-buttons").addClass("dx-tabs-expanded"))},_isItemsWidthExceeded:function(){return this._getSummaryItemsWidth(this._getVisibleItems(),!0)-1>this.$element().width()},_needStretchItems:function(){var t=this._getVisibleItems(),e=this.$element().width(),n=[];return(0,f.each)(t,(function(t,e){n.push((0,i.default)(e).outerWidth(!0))})),Math.max.apply(null,n)>e/t.length},_cleanNavButtons:function(){this._leftButton&&this._rightButton&&(this._leftButton.$element().remove(),this._rightButton.$element().remove(),this._leftButton=null,this._rightButton=null)},_cleanScrolling:function(){this._scrollable&&(this._$wrapper.appendTo(this.$element()),this._scrollable.$element().remove(),this._scrollable=null,this._cleanNavButtons())},_renderInkRipple:function(){this._inkRipple=l.default.render()},_toggleActiveState:function(t,e,n){if(this.callBase.apply(this,arguments),this._inkRipple){var i={element:t,event:n};e?this._inkRipple.showWave(i):this._inkRipple.hideWave(i)}},_renderMultiple:function(){"multiple"===this.option("selectionMode")&&this.option("selectOnFocus",!1)},_renderWrapper:function(){this._$wrapper=(0,i.default)("
").addClass("dx-tabs-wrapper"),this.$element().append(this._$wrapper)},_itemContainer:function(){return this._$wrapper},_renderScrollable:function(){var t=this.$element().wrapInner((0,i.default)("
").addClass("dx-tabs-scrollable")).children();this._scrollable=this._createComponent(t,_.default,{direction:"horizontal",showScrollbar:!1,useKeyboard:!1,useNative:!1,scrollByContent:this.option("scrollByContent"),onScroll:this._updateNavButtonsVisibility.bind(this)}),this.$element().append(this._scrollable.$element())},_scrollToItem:function(t){if(this._scrollable){var e=this._editStrategy.getItemElement(t);this._scrollable.scrollToElement(e)}},_renderNavButtons:function(){if(this.$element().toggleClass("dx-tabs-nav-buttons",this.option("showNavButtons")),this.option("showNavButtons")){var t=this.option("rtlEnabled");this._leftButton=this._createNavButton(-30,t?"chevronnext":"chevronprev");var e=this._leftButton.$element();e.addClass("dx-tabs-nav-button-left"),this.$element().prepend(e),this._rightButton=this._createNavButton(30,t?"chevronprev":"chevronnext");var n=this._rightButton.$element();n.addClass("dx-tabs-nav-button-right"),this.$element().append(n)}},_updateNavButtonsVisibility:function(){this._leftButton&&this._leftButton.option("disabled",this._scrollable.scrollLeft()<=0),this._rightButton&&this._rightButton.option("disabled",this._scrollable.scrollLeft()>=Math.round(this._scrollable.scrollWidth()-this._scrollable.clientWidth()))},_updateScrollPosition:function(t,e){this._scrollable.update(),this._scrollable.scrollBy(t/e)},_createNavButton:function(t,e){var n=this,r=n._createAction((function(){n._holdInterval=setInterval((function(){n._updateScrollPosition(t,5)}),5)})),a=(0,u.addNamespace)(g.default.name,"dxNavButton"),l=(0,u.addNamespace)(h.default.up,"dxNavButton"),c=(0,u.addNamespace)(h.default.out,"dxNavButton"),d=this._createComponent((0,i.default)("
").addClass("dx-tabs-nav-button"),s.default,{focusStateEnabled:!1,icon:e,onClick:function(){n._updateScrollPosition(t,1)},integrationOptions:{}}),f=d.$element();return o.default.on(f,a,{timeout:300},function(t){r({event:t})}.bind(this)),o.default.on(f,l,(function(){n._clearInterval()})),o.default.on(f,c,(function(){n._clearInterval()})),d},_clearInterval:function(){this._holdInterval&&clearInterval(this._holdInterval)},_updateSelection:function(t){this._scrollable&&this._scrollable.scrollToElement(this.itemElements().eq(t[0]),{left:1,right:1})},_visibilityChanged:function(t){t&&this._dimensionChanged()},_dimensionChanged:function(){this._renderScrolling()},_itemSelectHandler:function(t){"single"===this.option("selectionMode")&&this.isItemSelected(t.currentTarget)||this.callBase(t)},_clean:function(){this._deferredTemplates=[],this._cleanScrolling(),this.callBase()},_optionChanged:function(t){switch(t.name){case"useInkRipple":case"scrollingEnabled":case"showNavButtons":this._invalidate();break;case"scrollByContent":this._scrollable&&this._scrollable.option(t.name,t.value);break;case"width":this.callBase(t),this._dimensionChanged();break;case"selectionMode":this._renderMultiple(),this.callBase(t);break;case"badgeExpr":this._invalidate();break;default:this.callBase(t)}},_afterItemElementInserted:function(){this.callBase(),this._deferRenderScrolling()},_afterItemElementDeleted:function(t,e){this.callBase(t,e),this._renderScrolling()}});C.ItemClass=p.default,(0,a.default)("dxTabs",C),t.exports=C,t.exports.getTabsExpandedClass="dx-tabs-expanded",t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(7),o=n(78),r=n(2),a=n(29),s=g(n(23)),l=g(n(197)),u=g(n(94)),c=n(0),d=g(n(46)),h=g(n(824)),f=g(n(12)),p=n(92),m=g(n(825));function g(t){return t&&t.__esModule?t:{default:t}}var _={number:["=","<>","<",">","<=",">=","isblank","isnotblank"],string:["contains","notcontains","startswith","endswith","=","<>","isblank","isnotblank"],date:["=","<>","<",">","<=",">=","isblank","isnotblank"],datetime:["=","<>","<",">","<=",">=","isblank","isnotblank"],boolean:["=","<>","isblank","isnotblank"],object:["isblank","isnotblank"]},v={date:"shortDate",datetime:"shortDateShortTime"},y=["=","<>","isblank","isnotblank"],b=["caption","customizeText","dataField","dataType","editorTemplate","falseText","editorOptions","filterOperations","format","lookup","trueText","calculateFilterExpression","name"];function w(t){return t&&t.length>1&&"!"===t[0]&&!D(t)}function x(t){return w(t)?t[1]:t}function C(t){if(D(t))return"and";for(var e="",n=0;n0)return i[0];throw new s.default.Error("E1047",t)}function P(t){return!!Array.isArray(t)&&(t.length<2||Array.isArray(t[0])||Array.isArray(t[1]))}function D(t){return!!Array.isArray(t)&&(t.length>1&&!Array.isArray(t[0])&&!Array.isArray(t[1]))}function A(t,e){for(var n=C(t).toLowerCase()||"and",i=[],o=0;o",t[2]=null):(((i=T(n,t[1]))||2===t.length||null===t[2])&&(t[2]=""),t[1]=e),t)}function q(t){return""!==t[2]}function $(t,e){return t[0]===e}function Y(t,e,n){var i=[];return t.forEach((function(t){D(t)?$(t,e[0])?n?(i.push(e),n=!1):i.splice(i.length-1,1):i.push(t):(i.length||P(t))&&i.push(t)})),0===i.length?null:(n&&(i.push("and"),i.push(e)),1===i.length?i[0]:i)}e.isValidCondition=q,e.isEmptyGroup=function(t){var e=x(t);return!D(e)&&!e.some((function(t){return D(t)}))},e.getOperationFromAvailable=function(t,e){for(var n=0;n=0&&i.push(e.name)}})),i.map((function(t){var i=T(n,t);return i?{icon:i.icon||"icon-none",text:i.caption||d.default.captionize(i.name),value:i.name,isCustom:!0}:{icon:m.default.getIconByFilterOperation(t)||"icon-none",text:I(t,e),value:t}}))},e.removeItem=O,e.createCondition=function(t,e){var n=[t.dataField,"",""];return K(n,E(t),e),n},e.createEmptyGroup=function(t){return-1!==t.indexOf("not")?["!",[t.substring(3).toLowerCase()]]:[t]},e.addItem=function(t,e){var n=x(e),i=S(n);return 1===n.length?n.unshift(t):n.push(t,i),e},e.getField=M,e.isGroup=P,e.isCondition=D,e.getNormalizedFields=function(t){return t.reduce((function(t,e){if((0,r.isDefined)(e.dataField)){var n={};for(var i in e)e[i]&&b.indexOf(i)>-1&&(n[i]=e[i]);n.defaultCalculateFilterExpression=l.default.defaultCalculateFilterExpression,(0,r.isDefined)(n.dataType)||(n.dataType="string"),t.push(n)}return t}),[])},e.getNormalizedFilter=function t(e){var n,i=x(e);if(0===i.length)return null;var o=[];for(n=0;n3&&void 0!==arguments[3]?arguments[3]:"filterBuilder";if(V(e))return"";if(Array.isArray(e)){var r=new i.Deferred;return i.when.apply(this,F(t,e,n,o)).done((function(){for(var t=arguments.length,e=new Array(t),n=0;n>>24]^c[p>>>16&255]^d[m>>>8&255]^h[255&g]^e[_++],a=u[p>>>24]^c[m>>>16&255]^d[g>>>8&255]^h[255&f]^e[_++],s=u[m>>>24]^c[g>>>16&255]^d[f>>>8&255]^h[255&p]^e[_++],l=u[g>>>24]^c[f>>>16&255]^d[p>>>8&255]^h[255&m]^e[_++],f=r,p=a,m=s,g=l;return r=(i[f>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[_++],a=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&f])^e[_++],s=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[f>>>8&255]<<8|i[255&p])^e[_++],l=(i[g>>>24]<<24|i[f>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[_++],[r>>>=0,a>>>=0,s>>>=0,l>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],i=[],o=[[],[],[],[]],r=[[],[],[],[]],a=0,s=0,l=0;l<256;++l){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,n[a]=u,i[u]=a;var c=t[a],d=t[c],h=t[d],f=257*t[u]^16843008*u;o[0][a]=f<<24|f>>>8,o[1][a]=f<<16|f>>>16,o[2][a]=f<<8|f>>>24,o[3][a]=f,f=16843009*h^65537*d^257*c^16843008*a,r[0][u]=f<<24|f>>>8,r[1][u]=f<<16|f>>>16,r[2][u]=f<<8|f>>>24,r[3][u]=f,0===a?a=s=1:(a=c^t[t[t[h^c]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:i,SUB_MIX:o,INV_SUB_MIX:r}}();function u(t){this._key=o(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,i=4*(n+1),o=[],r=0;r>>24,a=l.SBOX[a>>>24]<<24|l.SBOX[a>>>16&255]<<16|l.SBOX[a>>>8&255]<<8|l.SBOX[255&a],a^=s[r/e|0]<<24):e>6&&r%e===4&&(a=l.SBOX[a>>>24]<<24|l.SBOX[a>>>16&255]<<16|l.SBOX[a>>>8&255]<<8|l.SBOX[255&a]),o[r]=o[r-e]^a}for(var u=[],c=0;c>>24]]^l.INV_SUB_MIX[1][l.SBOX[h>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[h>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&h]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return a(t=o(t),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=i.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},u.prototype.decryptBlock=function(t){var e=(t=o(t))[1];t[1]=t[3],t[3]=e;var n=a(t,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),r=i.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},u.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},t.exports.AES=u},function(t,e,n){var i=n(30).Buffer,o=n(314);t.exports=function(t,e,n,r){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=i.alloc(a),l=i.alloc(r||0),u=i.alloc(0);a>0||r>0;){var c=new o;c.update(u),c.update(t),e&&c.update(e),u=c.digest();var d=0;if(a>0){var h=s.length-a;d=Math.min(a,u.length),u.copy(s,h,0,d),a-=d}if(d0){var f=l.length-r,p=Math.min(r,u.length-d);u.copy(l,f,d,d+p),r-=p}}return u.fill(0),{key:s,iv:l}}},function(t,e,n){"use strict";var i=n(111),o=n(85),r=o.getNAF,a=o.getJSF,s=o.assert;function l(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),i=r(e,1,this._bitLength),o=(1<=l;e--)u=(u<<1)+i[e];a.push(u)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=o;h>0;h--){for(l=0;l=0;u--){for(e=0;u>=0&&0===a[u];u--)e++;if(u>=0&&e++,l=l.dblp(e),u<0)break;var c=a[u];s(0!==c),l="affine"===t.type?c>0?l.mixedAdd(o[c-1>>1]):l.mixedAdd(o[-c-1>>1].neg()):c>0?l.add(o[c-1>>1]):l.add(o[-c-1>>1].neg())}return"affine"===t.type?l.toP():l},l.prototype._wnafMulAdd=function(t,e,n,i,o){for(var s=this._wnafT1,l=this._wnafT2,u=this._wnafT3,c=0,d=0;d=1;d-=2){var f=d-1,p=d;if(1===s[f]&&1===s[p]){var m=[e[f],null,null,e[p]];0===e[f].y.cmp(e[p].y)?(m[1]=e[f].add(e[p]),m[2]=e[f].toJ().mixedAdd(e[p].neg())):0===e[f].y.cmp(e[p].y.redNeg())?(m[1]=e[f].toJ().mixedAdd(e[p]),m[2]=e[f].add(e[p].neg())):(m[1]=e[f].toJ().mixedAdd(e[p]),m[2]=e[f].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],_=a(n[f],n[p]);c=Math.max(_[0].length,c),u[f]=new Array(c),u[p]=new Array(c);for(var v=0;v=0;d--){for(var C=0;d>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),d<0)break;for(v=0;v0?k=l[v][I-1>>1]:I<0&&(k=l[v][-I-1>>1].neg()),w="affine"===k.type?w.mixedAdd(k):w.add(k))}}for(d=0;d=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;ot.length)&&(e=t.length);for(var n=0,i=new Array(e);n0});e.getFieldName=function(t){return t.substr(t.lastIndexOf(".")+1)},e.getParentName=function(t){return t.substr(0,t.lastIndexOf("."))},e.getNestedOptionValue=function(t,e){return c[e]=c[e]||(0,u.compileGetter)(e),c[e](t,{functionsAsIs:!0})}},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(58),a=n(18),s=n(21),l=n(114),u=n(11),c=n(135),d=u.addNamespace("contextmenu","dxContexMenu"),h=u.addNamespace(c.name,"dxContexMenu");l("dxcontextmenu",new(s.inherit({setup:function(t){var e=i(t);o.on(e,d,this._contextMenuHandler.bind(this)),(r.touch||a.isSimulator())&&o.on(e,h,this._holdHandler.bind(this))},_holdHandler:function(t){u.isMouseEvent(t)&&!a.isSimulator()||this._fireContextMenu(t)},_contextMenuHandler:function(t){this._fireContextMenu(t)},_fireContextMenu:function(t){return u.fireEvent({type:"dxcontextmenu",originalEvent:t})},teardown:function(t){o.off(t,".dxContexMenu")}}))),e.name="dxcontextmenu"},function(t,e,n){"use strict";var i=n(21),o=n(643),r=n(644),a=n(0).extend,s=n(4).noop,l=n(2).isDefined,u=n(7).Deferred;t.exports=i.inherit({ctor:function(t){this.options=a(this._getDefaultOptions(),t,{selectedItemKeys:t.selectedKeys||[]}),this._selectionStrategy=this.options.deferred?new o(this.options):new r(this.options),this._focusedItemIndex=-1,this.options.equalByReference||this._selectionStrategy.updateSelectedItemKeyHash(this.options.selectedItemKeys)},_getDefaultOptions:function(){return{allowNullValue:!1,deferred:!1,equalByReference:!1,mode:"multiple",selectedItems:[],selectionFilter:[],maxFilterLengthInRequest:0,onSelectionChanged:s,key:s,keyOf:function(t){return t},load:function(){return(new u).resolve([])},totalCount:function(){return-1},isSelectableItem:function(){return!0},isItemSelected:function(){return!1},getItemData:function(t){return t},dataFields:s,filter:s}},validate:function(){this._selectionStrategy.validate()},getSelectedItemKeys:function(){return this._selectionStrategy.getSelectedItemKeys()},getSelectedItems:function(){return this._selectionStrategy.getSelectedItems()},selectionFilter:function(t){if(void 0===t)return this.options.selectionFilter;var e=this.options.selectionFilter!==t&&JSON.stringify(this.options.selectionFilter)!==JSON.stringify(t);this.options.selectionFilter=t,e&&this.onSelectionChanged()},setSelection:function(t){return this.selectedItemKeys(t)},select:function(t){return this.selectedItemKeys(t,!0)},deselect:function(t){return this.selectedItemKeys(t,!0,!0)},selectedItemKeys:function(t,e,n,i){return t=t||[],t=Array.isArray(t)?t:[t],this.validate(),this._selectionStrategy.selectedItemKeys(t,e,n,i)},clearSelection:function(){return this.selectedItemKeys([])},_addSelectedItem:function(t,e){this._selectionStrategy.addSelectedItem(e,t)},_removeSelectedItem:function(t){this._selectionStrategy.removeSelectedItem(t)},_setSelectedItems:function(t,e){this._selectionStrategy.setSelectedItems(t,e)},onSelectionChanged:function(){this._selectionStrategy.onSelectionChanged()},changeItemSelection:function(t,e){var n,i=this.options.plainItems(),o=i[t];if(!this.isSelectable()||!this.isDataItem(o))return!1;var r=this.options.getItemData(o),a=this.options.keyOf(r);if((e=e||{}).shift&&"multiple"===this.options.mode&&this._focusedItemIndex>=0)n=this.changeItemSelectionWhenShiftKeyPressed(t,i);else if(e.control){this._resetItemSelectionWhenShiftKeyPressed();var s=this._selectionStrategy.isItemDataSelected(r);"single"===this.options.mode&&this.clearSelectedItems(),s?this._removeSelectedItem(a):this._addSelectedItem(r,a),n=!0}else{this._resetItemSelectionWhenShiftKeyPressed();var l=this._selectionStrategy.equalKeys(this.options.selectedItemKeys[0],a);1===this.options.selectedItemKeys.length&&l||(this._setSelectedItems([a],[r]),n=!0)}return n?(this._focusedItemIndex=t,this.onSelectionChanged(),!0):void 0},isDataItem:function(t){return this.options.isSelectableItem(t)},isSelectable:function(){return"single"===this.options.mode||"multiple"===this.options.mode},isItemDataSelected:function(t){return this._selectionStrategy.isItemDataSelected(t)},isItemSelected:function(t){return this._selectionStrategy.isItemKeySelected(t)},_resetItemSelectionWhenShiftKeyPressed:function(){delete this._shiftFocusedItemIndex},_resetFocusedItemIndex:function(){this._focusedItemIndex=-1},changeItemSelectionWhenShiftKeyPressed:function(t,e){var n,i,o,r,a=!1,s=this.options.keyOf,u=e[this._focusedItemIndex],c=this.options.getItemData(u),d=s(c),h=u&&this.isItemDataSelected(c);if(l(this._shiftFocusedItemIndex)||(this._shiftFocusedItemIndex=this._focusedItemIndex),this._shiftFocusedItemIndex!==this._focusedItemIndex)for(n=this._focusedItemIndex"),l({onClick:e&&e.click},e));t.append(n.$element())}),["disabled","icon","text","type","onClick","click"],this.option("integrationOptions.watchMethod"))})},_itemContainer:function(){return this._$itemContainer},_itemClass:function(){return"dx-actionsheet-item"},_itemDataKey:function(){return"dxActionSheetItemData"},_toggleVisibility:r,_renderDimensions:r,_initMarkup:function(){this.callBase(),this.$element().addClass("dx-actionsheet"),this._createItemContainer()},_render:function(){this._renderPopup()},_createItemContainer:function(){this._$itemContainer=i("
").addClass("dx-actionsheet-container"),this._renderDisabled()},_renderDisabled:function(){this._$itemContainer.toggleClass("dx-state-disabled",this.option("disabled"))},_renderPopup:function(){this._$popup=i("
").appendTo(this.$element()),this._isPopoverMode()?this._createPopover():this._createPopup(),this._renderPopupTitle(),this._mapPopupOption("visible")},_mapPopupOption:function(t){this._popup&&this._popup.option(t,this.option(t))},_isPopoverMode:function(){return this.option("usePopover")&&this.option("target")},_renderPopupTitle:function(){this._mapPopupOption("showTitle"),this._popup&&this._popup._wrapper().toggleClass("dx-actionsheet-without-title",!this.option("showTitle"))},_clean:function(){this._$popup&&this._$popup.remove(),this.callBase()},_overlayConfig:function(){return{onInitialized:function(t){this._popup=t.component}.bind(this),disabled:!1,showTitle:!0,title:this.option("title"),deferRendering:!o.angular,onContentReady:this._popupContentReadyAction.bind(this),onHidden:this.hide.bind(this)}},_createPopover:function(){this._createComponent(this._$popup,h,l(this._overlayConfig(),{width:this.option("width")||200,height:this.option("height")||"auto",target:this.option("target")})),this._popup._wrapper().addClass("dx-actionsheet-popover-wrapper")},_createPopup:function(){this._createComponent(this._$popup,d,l(this._overlayConfig(),{dragEnabled:!1,width:this.option("width")||"100%",height:this.option("height")||"auto",showCloseButton:!1,position:{my:"bottom",at:"bottom",of:o},animation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom",of:o}},to:{position:{my:"bottom",at:"bottom",of:o}}},hide:{type:"slide",duration:400,from:{position:{my:"bottom",at:"bottom",of:o}},to:{position:{my:"top",at:"bottom",of:o}}}}})),this._popup._wrapper().addClass("dx-actionsheet-popup-wrapper")},_popupContentReadyAction:function(){this._popup.$content().append(this._$itemContainer),this._attachClickEvent(),this._attachHoldEvent(),this._prepareContent(),this._renderContent(),this._renderCancelButton()},_renderCancelButton:function(){if(!this._isPopoverMode()&&(this._$cancelButton&&this._$cancelButton.remove(),this.option("showCancelButton"))){var t=this._createActionByOption("onCancelClick")||r,e=this;this._$cancelButton=i("
").addClass("dx-actionsheet-cancel").appendTo(this._popup&&this._popup.$content()),this._createComponent(this._$cancelButton,u,{disabled:!1,text:this.option("cancelText"),onClick:function(n){var i={event:n,cancel:!1};t(i),i.cancel||e.hide()},integrationOptions:{}})}},_attachItemClickEvent:r,_itemClickHandler:function(t){this.callBase(t),i(t.target).is(".dx-state-disabled, .dx-state-disabled *")||this.hide()},_itemHoldHandler:function(t){this.callBase(t),i(t.target).is(".dx-state-disabled, .dx-state-disabled *")||this.hide()},_optionChanged:function(t){switch(t.name){case"width":case"height":case"visible":case"title":this._mapPopupOption(t.name);break;case"disabled":this._renderDisabled();break;case"showTitle":this._renderPopupTitle();break;case"showCancelButton":case"onCancelClick":case"cancelText":this._renderCancelButton();break;case"target":case"usePopover":case"items":this._invalidate();break;default:this.callBase(t)}},toggle:function(t){var e=this,n=new p;return e._popup.toggle(t).done((function(){e.option("visible",t),n.resolveWith(e)})),n.promise()},show:function(){return this.toggle(!0)},hide:function(){return this.toggle(!1)}});s("dxActionSheet",m),t.exports=m,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(0);t.exports={_formatNumberCore:function(t,e,n){if("currency"===e){n.precision=n.precision||0;var o=this.format(t,(0,i.extend)({},n,{type:"fixedpoint"})),r=this.getCurrencySymbol().symbol.replace("$","$$$$");return o=o.replace(/^(\D*)(\d.*)/,"$1"+r+"$2")}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(){return{symbol:"$"}},getOpenXmlCurrencyFormat:function(){return"$#,##0{0}_);\\($#,##0{0}\\)"}}},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(18),a=n(130),s=n(113),l=n(17),u=n(77).add,c=n(37),d=n(4).noop,h=n(2).isDefined,f=n(11),p=n(186),m=c.sign,g=Math.abs,_=10,v=s((function(){var t="desktop"===r.real().deviceType;if(!a.styleProp("pointer-events")||!t)return d;var e=i("
").addClass("dx-gesture-cover").css("pointerEvents","none");return o.subscribeGlobal(e,"dxmousewheel",(function(t){t.preventDefault()})),u((function(){e.appendTo("body")})),function(t,n){e.css("pointerEvents",t?"all":"none"),t&&e.css("cursor",n)}})),y=p.inherit({gesture:!0,configure:function(t){this.getElement().css("msTouchAction",t.immediate?"pinch-zoom":""),this.callBase(t)},allowInterruptionByMouseWheel:function(){return 2!==this._stage},getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=0},start:function(t){t._needSkipEvent||f.needSkipEvent(t)?this._cancel(t):(this._startEvent=f.createEvent(t),this._startEventData=f.eventData(t),this._stage=1,this._init(t),this._setupImmediateTimer())},_setupImmediateTimer:function(){clearTimeout(this._immediateTimer),this._immediateAccepted=!1,this.immediate&&(this._immediateTimer=setTimeout(function(){this._immediateAccepted=!0}.bind(this),180))},move:function(t){if(1===this._stage&&this._directionConfirmed(t)){if(this._stage=2,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(t),this._adjustStartEvent(t),this._start(this._startEvent),0===this._stage)return;this._requestAccept(t),this._move(t),this._forgetAccept()}else 2===this._stage&&(this._clearSelection(t),this._move(t))},_directionConfirmed:function(t){var e=this._getTouchBoundary(t),n=f.eventDelta(this._startEventData,f.eventData(t)),i=g(n.x),o=g(n.y),r=this._validateMove(e,i,o),a=this._validateMove(e,o,i),s=this.getDirection(t);return"both"===s&&(r||a)||"horizontal"===s&&r||"vertical"===s&&a||this._immediateAccepted},_validateMove:function(t,e,n){return e&&e>=t&&(!this.immediate||e>=n)},_getTouchBoundary:function(t){return this.immediate||f.isDxMouseWheelEvent(t)?0:_},_adjustStartEvent:function(t){var e=this._getTouchBoundary(t),n=f.eventDelta(this._startEventData,f.eventData(t));this._startEvent.pageX+=m(n.x)*e,this._startEvent.pageY+=m(n.y)*e},_resetActiveElement:function(){"ios"===r.real().platform&&this.getElement().find(":focus").length&&l.resetActiveElement()},_toggleGestureCover:function(t){this._toggleGestureCoverImpl(t)},_toggleGestureCoverImpl:function(t){2===this._stage&&function(t,e){v()(t,e)}(t,this.getElement().css("cursor"))},_clearSelection:function(t){f.isDxMouseWheelEvent(t)||f.isTouchEvent(t)||l.clearSelection()},end:function(t){this._toggleGestureCover(!1),2===this._stage?this._end(t):1===this._stage&&this._stop(t),this._stage=0},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:d,_start:d,_move:d,_stop:d,_end:d});y.initialTouchBoundary=_,y.touchBoundary=function(t){if(!h(t))return _;_=t},t.exports=y},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(3),r=n(10),a=n(6),s=n(45),l=n(8),u=n(4),c=n(2),d=n(0).extend,h=n(16).inArray,f=n(221),p=n(108),m=n(23),g=n(11),_=n(18),v=n(61),y=n(5).each,b=n(272),w=n(12),x=n(157).ChildDefaultTemplate,C=n(7).Deferred,S=n(269).default,k=r.getWindow(),I=["startswith","contains","endwith","notcontains"],T=f.inherit({_supportedKeys:function(){var t=this.callBase();return d({},t,{tab:function(e){if(this._allowSelectItemByTab()){this._saveValueChangeEvent(e);var n=o(this._list.option("focusedElement"));n.length&&this._setSelectedElement(n)}t.tab.apply(this,arguments)},space:u.noop,home:u.noop,end:u.noop})},_allowSelectItemByTab:function(){return this.option("opened")&&"instantly"===this.option("applyValueMode")},_setSelectedElement:function(t){var e=this._valueGetter(this._list._getItemData(t));this._setValue(e)},_setValue:function(t){this.option("value",t)},_getDefaultOptions:function(){return d(this.callBase(),d(b._dataExpressionDefaultOptions(),{displayValue:void 0,searchEnabled:!1,searchMode:"contains",searchTimeout:500,minSearchLength:0,searchExpr:null,valueChangeEvent:"input change keyup",selectedItem:null,noDataText:w.format("dxCollectionWidget-noDataText"),onSelectionChanged:null,onItemClick:u.noop,showDataBeforeSearch:!1,grouped:!1,groupTemplate:"group",popupPosition:{my:"left top",at:"left bottom",offset:{h:0,v:0},collision:"flip"},wrapItemText:!1,popupWidthExtension:0}))},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{popupPosition:{offset:{v:-1}}}},{device:{platform:"generic"},options:{buttonsLocation:"bottom center"}}])},_setOptionsByReference:function(){this.callBase(),d(this._optionsByReference,{value:!0,selectedItem:!0,displayValue:!0})},_init:function(){this.callBase(),this._initDataExpressions(),this._initActions(),this._setListDataSource(),this._validateSearchMode(),this._clearSelectedItem(),this._initItems()},_initItems:function(){var t=this.option().items;t&&!t.length&&this._dataSource&&(this.option().items=this._dataSource.items())},_initActions:function(){this._initContentReadyAction(),this._initSelectionChangedAction(),this._initItemClickAction()},_initContentReadyAction:function(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initSelectionChangedAction:function(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})},_initItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({item:new x("item")})},_saveFocusOnWidget:function(t){this._list&&this._list.initialOption("focusStateEnabled")&&this._focusInput()},_fitIntoRange:function(t,e,n){return t>n?e:t",!0).toArray()},_calcNextItem:function(t){var e=this._items();return e[this._fitIntoRange(this._getSelectedIndex()+t,0,e.length-1)]},_getSelectedIndex:function(){var t=this._items(),e=this.option("selectedItem"),n=-1;return y(t,function(t,i){if(this._isValueEquals(i,e))return n=t,!1}.bind(this)),n},_createPopup:function(){this.callBase(),this._updateCustomBoundaryContainer(),this._popup._wrapper().addClass(this._popupWrapperClass());var t=this._popup.$content();a.off(t,"mouseup"),a.on(t,"mouseup",this._saveFocusOnWidget.bind(this));var e=this;this._popup.on({shown:function(){e.$element().addClass("dx-skip-gesture-event")},hidden:function(){e.$element().removeClass("dx-skip-gesture-event")}})},_updateCustomBoundaryContainer:function(){var t=this.option("dropDownOptions.container"),e=t&&o(t);if(e&&e.length&&!c.isWindow(e.get(0))){var n=[].slice.call(e.parents());n.unshift(e.get(0)),y(n,function(t,e){return e!==o("body").get(0)&&("hidden"===k.getComputedStyle(e).overflowY?(this._$customBoundaryContainer=o(e),!1):void 0)}.bind(this))}},_popupWrapperClass:function(){return"dx-dropdownlist-popup-wrapper"},_renderInputValue:function(){var t=this._getCurrentValue();return this._loadInputValue(t,this._setSelectedItem.bind(this)).always(this.callBase.bind(this,t))},_loadInputValue:function(t,e){return this._loadItem(t).always(e)},_getItemFromPlain:function(t,e){var n,o;return e&&"object"!==i(t)&&(e.itemByValue||(e.itemByValue={},(n=this._getPlainItems()).forEach((function(t){e.itemByValue[this._valueGetter(t)]=t}),this)),o=e.itemByValue[t]),o||(n=this._getPlainItems(),o=u.grep(n,function(e){return this._isValueEquals(this._valueGetter(e),t)}.bind(this))[0]),o},_loadItem:function(t,e){var n=this._getItemFromPlain(t,e);return void 0!==n?(new C).resolve(n).promise():this._loadValue(t)},_getPlainItems:function(t){var e=[];t=t||this.option("items")||this._dataSource.items()||[];for(var n=0;n").attr("id",this._listId).appendTo(this._popup.$content());this._list=this._createComponent(t,p,this._listConfig()),this._refreshList(),this._setAriaTargetForList(),this._list.option("_listAttributes",{role:"combobox"}),this._renderPreventBlur(this._$list)},_renderPreventBlur:function(t){var e=g.addNamespace("mousedown","dxDropDownList");a.off(t,e),a.on(t,e,function(t){t.preventDefault()}.bind(this))},_renderOpenedState:function(){this.callBase();var t=this.option("opened")||void 0;this.setAria({activedescendant:t&&this._list.getFocusedItemId(),controls:t&&this._listId})},_setDefaultAria:function(){this.setAria({haspopup:"listbox",autocomplete:"list"})},_refreshList:function(){this._list&&this._shouldRefreshDataSource()&&this._setListDataSource()},_shouldRefreshDataSource:function(){return!!this._list.option("dataSource")!==this._needPassDataSourceToList()},_isDesktopDevice:function(){return"desktop"===_.real().deviceType},_listConfig:function(){var t={selectionMode:"single",_templates:this.option("_templates"),templateProvider:this.option("templateProvider"),noDataText:this.option("noDataText"),grouped:this.option("grouped"),wrapItemText:this.option("wrapItemText"),onContentReady:this._listContentReadyHandler.bind(this),itemTemplate:this.option("itemTemplate"),indicateLoading:!1,keyExpr:this._getCollectionKeyExpr(),displayExpr:this._displayGetterExpr(),groupTemplate:this.option("groupTemplate"),onItemClick:this._listItemClickAction.bind(this),dataSource:this._getDataSource(),hoverStateEnabled:!!this._isDesktopDevice()&&this.option("hoverStateEnabled"),focusStateEnabled:!!this._isDesktopDevice()&&this.option("focusStateEnabled")};return this._canListHaveFocus()||(t.tabIndex=null),t},_canListHaveFocus:function(){return!1},_getDataSource:function(){return this._needPassDataSourceToList()?this._dataSource:null},_dataSourceOptions:function(){return{paginate:!1}},_getGroupedOption:function(){return this.option("grouped")},_dataSourceFromUrlLoadMode:function(){return"raw"},_listContentReadyHandler:function(){this._list=this._list||this._$list.dxList("instance"),this.option("deferRendering")||this._refreshSelected(),this._dimensionChanged(),this._contentReadyAction()},_setListOption:function(t,e){this._setWidgetOption("_list",arguments)},_listItemClickAction:function(t){this._listItemClickHandler(t),this._itemClickAction(t)},_listItemClickHandler:u.noop,_setListDataSource:function(){this._list&&(this._setListOption("dataSource",this._getDataSource()),this._needPassDataSourceToList()||this._setListOption("items",[]))},_needPassDataSourceToList:function(){return this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded()},_isMinSearchLengthExceeded:function(){return this._searchValue().toString().length>=this.option("minSearchLength")},_needClearFilter:function(){return!this._canKeepDataSource()&&this._needPassDataSourceToList()},_canKeepDataSource:function(){var t,e=this._isMinSearchLengthExceeded();return(null===(t=this._dataSource)||void 0===t?void 0:t.isLoaded())&&this.option("showDataBeforeSearch")&&this.option("minSearchLength")&&!e&&!this._isLastMinSearchLengthExceeded},_searchValue:function(){return this._input().val()||""},_getSearchEvent:function(){return g.addNamespace("input",this.NAME+"Search")},_getSetFocusPolicyEvent:function(){return g.addNamespace("input",this.NAME+"FocusPolicy")},_renderEvents:function(){this.callBase(),a.on(this._input(),this._getSetFocusPolicyEvent(),this._setFocusPolicy.bind(this)),this._shouldRenderSearchEvent()&&a.on(this._input(),this._getSearchEvent(),this._searchHandler.bind(this))},_shouldRenderSearchEvent:function(){return this.option("searchEnabled")},_refreshEvents:function(){a.off(this._input(),this._getSearchEvent()),a.off(this._input(),this._getSetFocusPolicyEvent()),this.callBase()},_searchHandler:function(){if(this._isMinSearchLengthExceeded()){var t=this.option("searchTimeout");t?(this._clearSearchTimer(),this._searchTimer=setTimeout(this._searchDataSource.bind(this),t)):this._searchDataSource()}else this._searchCanceled()},_searchCanceled:function(){this._clearSearchTimer(),this._needClearFilter()&&this._filterDataSource(null),this._refreshList()},_searchDataSource:function(){this._filterDataSource(this._searchValue())},_filterDataSource:function(t){this._clearSearchTimer();var e=this._dataSource;e&&(e.searchExpr(this.option("searchExpr")||this._displayGetterExpr()),e.searchOperation(this.option("searchMode")),e.searchValue(t),e.load().done(this._dataSourceFiltered.bind(this,t)))},_clearFilter:function(){var t=this._dataSource;t&&t.searchValue()&&t.searchValue(null)},_dataSourceFiltered:function(){this._isLastMinSearchLengthExceeded=this._isMinSearchLengthExceeded(),this._refreshList(),this._refreshPopupVisibility()},_shouldOpenPopup:function(){return this._hasItemsToShow()},_refreshPopupVisibility:function(){if(!this.option("readOnly")&&this._searchValue()){var t=this._shouldOpenPopup();t&&!this._isFocused()||(this.option("opened",t),t&&this._dimensionChanged())}},_dataSourceChangedHandler:function(t){0===this._dataSource.pageIndex()?this.option().items=t:this.option().items=this.option().items.concat(t)},_hasItemsToShow:function(){var t=(this._dataSource&&this._dataSource.items()||[]).length;return!(!this._needPassDataSourceToList()||!t)},_clearSearchTimer:function(){clearTimeout(this._searchTimer),delete this._searchTimer},_updatePopupMinWidth:function(t){k&&this._popup&&(void 0===t&&(t=this.$element().outerWidth()),this._popup.overlayContent().css("minWidth",t))},_popupShowingHandler:function(){this._dimensionChanged()},_getPopupWidth:function(){var t=this.option("dropDownOptions.width");if(null!==t)return"function"===typeof t?t():t},_dimensionChanged:function(){var t=this._getPopupWidth(),e=this.option("dropDownOptions.minWidth");void 0===t&&this._setPopupOption("width",this._getInputWidth.bind(this)),c.isDefined(e)||this._updatePopupMinWidth(t),this._popup&&this._updatePopupDimensions()},_needPopupRepaint:function(){if(!this._dataSource)return!1;var t=this._dataSource.pageIndex(),e=c.isDefined(this._pageIndex)&&t<=this._pageIndex;return this._pageIndex=t,e},_updatePopupDimensions:function(){this._needPopupRepaint()&&this._popup.repaint(),this._list&&this._list.updateDimensions()},_getMaxHeight:function(){var t=this.$element(),e=this._$customBoundaryContainer,n=t.offset().top-(e?e.offset().top:0),i=o(k).outerHeight(),r=e?Math.min(e.outerHeight(),i):i,a=Math.max(n,r-n-t.outerHeight());return Math.min(.5*r,a)},_clean:function(){this._list&&delete this._list,delete this._isLastMinSearchLengthExceeded,this.callBase()},_dispose:function(){this._clearSearchTimer(),this.callBase()},_setCollectionWidgetOption:function(){this._setListOption.apply(this,arguments)},_setSubmitValue:function(){var t=this.option("value"),e=this._shouldUseDisplayValue(t)?this._displayGetter(t):t;this._getSubmitElement().val(e)},_shouldUseDisplayValue:function(t){return"this"===this.option("valueExpr")&&c.isObject(t)},_optionChanged:function(t){switch(this._dataExpressionOptionChanged(t),t.name){case"hoverStateEnabled":case"focusStateEnabled":this._isDesktopDevice()&&this._setListOption(t.name,t.value),this.callBase(t);break;case"dropDownOptions":"dropDownOptions.width"===t.fullName&&this._dimensionChanged(),this.callBase(t);break;case"items":this.option("dataSource")||this._processDataSourceChanging();break;case"dataSource":this._processDataSourceChanging();break;case"valueExpr":this._renderValue(),this._setListOption("keyExpr",this._getCollectionKeyExpr());break;case"displayExpr":this._renderValue(),this._setListOption("displayExpr",this._displayGetterExpr());break;case"searchMode":this._validateSearchMode();break;case"minSearchLength":this._refreshList();break;case"searchEnabled":case"showDataBeforeSearch":case"searchExpr":this._invalidate();break;case"onContentReady":this._initContentReadyAction();break;case"onSelectionChanged":this._initSelectionChangedAction();break;case"onItemClick":this._initItemClickAction();break;case"grouped":case"groupTemplate":case"wrapItemText":case"noDataText":this._setListOption(t.name);break;case"displayValue":this.option("text",t.value);break;case"itemTemplate":case"searchTimeout":case"popupWidthExtension":break;case"selectedItem":t.previousValue!==t.value&&this._selectionChangedAction({selectedItem:t.value});break;default:this.callBase(t)}}}).include(b,S);l("dxDropDownList",T),t.exports=T},function(t,e,n){"use strict";var i=n(11),o=n(262),r=n(131),a={horizontal:{defaultItemSizeFunc:function(){return this.getElement().width()},getBounds:function(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio:function(t){return(i.eventData(t).x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,t)},isFastSwipe:function(t){var e=i.eventData(t);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(e.x-this._tickData.x)>=e.time-this._tickData.time}},vertical:{defaultItemSizeFunc:function(){return this.getElement().height()},getBounds:function(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio:function(t){return(i.eventData(t).y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,t)},isFastSwipe:function(t){var e=i.eventData(t);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(e.y-this._tickData.y)>=e.time-this._tickData.time}}};r({emitter:o.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:10,ctor:function(t){this.callBase(t),this.direction="horizontal",this.elastic=!0},_getStrategy:function(){return a[this.direction]},_defaultItemSizeFunc:function(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc:function(){return this.itemSizeFunc||this._defaultItemSizeFunc},_init:function(t){this._tickData=i.eventData(t)},_start:function(t){this._savedEventData=i.eventData(t),(t=this._fireEvent("dxswipestart",t)).cancel||(this._maxLeftOffset=t.maxLeftOffset,this._maxRightOffset=t.maxRightOffset,this._maxTopOffset=t.maxTopOffset,this._maxBottomOffset=t.maxBottomOffset)},_move:function(t){var e=this._getStrategy(),n=i.eventData(t),o=e.calcOffsetRatio.call(this,t);o=this._fitOffset(o,this.elastic),n.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=n),this._fireEvent("dxswipe",t,{offset:o}),t.preventDefault()},_end:function(t){var e=this._getStrategy(),n=e.calcOffsetRatio.call(this,t),i=e.isFastSwipe.call(this,t),o=n,r=this._calcTargetOffset(n,i);o=this._fitOffset(o,this.elastic),r=this._fitOffset(r,!1),this._fireEvent("dxswipeend",t,{offset:o,targetOffset:r})},_fitOffset:function(t,e){var n=this._getStrategy().getBounds.call(this);return t<-n[0]?e?(-2*n[0]+t)/3:-n[0]:t>n[1]?e?(2*n[1]+t)/3:n[1]:t},_calcTargetOffset:function(t,e){var n;return e?(n=Math.ceil(Math.abs(t)),t<0&&(n=-n)):n=Math.round(t),n}}),events:["dxswipestart","dxswipe","dxswipeend"]}),e.swipe="dxswipe",e.start="dxswipestart",e.end="dxswipeend"},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(4),a=n(2),s=n(70),l=n(17).getPublicElement,u=n(5).each,c=n(29).compileGetter,d=n(0).extend,h=n(47),f=n(25),p=n(264),m=n(58),g=n(12),_=n(79),v=n(18),y=n(683),b=n(42),w=n(11),x=n(36),C=n(10),S=n(116),k=n(103).deviceDependentOptions,I=n(215).default,T=n(73).BindableTemplate,E=n(7).Deferred,O=n(269).default,M=".dx-list-item",P=c("items"),D=I.inherit({_activeStateUnit:[M,".dx-list-select-all"].join(","),_supportedKeys:function(){var t=this,e=function(e){var i=n(e);i.is(t.option("focusedElement"))&&(!function(e,n){var i=e.position().top;"prev"===n&&(i=e.position().top-t.$element().height()+e.outerHeight());t.scrollTo(i)}(i,e),i=n(e)),t.option("focusedElement",l(i)),t.scrollToItem(i)};function n(e){var n=t.scrollTop(),o=t.$element().height(),r=i(t.option("focusedElement")),a=!0;if(!r.length)return i();for(;a;){var s=r[e]();if(!s.length)break;var l=s.position().top+s.outerHeight()/2;(a=ln)&&(r=s)}return r}return d(this.callBase(),{leftArrow:r.noop,rightArrow:r.noop,pageUp:function(){return e("prev"),!1},pageDown:function(){return e("next"),!1}})},_getDefaultOptions:function(){return d(this.callBase(),{hoverStateEnabled:!0,pullRefreshEnabled:!1,scrollingEnabled:!0,showScrollbar:"onScroll",useNativeScrolling:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,pullingDownText:g.format("dxList-pullingDownText"),pulledDownText:g.format("dxList-pulledDownText"),refreshingText:g.format("dxList-refreshingText"),pageLoadingText:g.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:g.format("dxList-nextButtonText"),onItemSwipe:null,grouped:!1,onGroupRendered:null,collapsibleGroups:!1,groupTemplate:"group",indicateLoading:!0,activeStateEnabled:!0,_itemAttributes:{role:"option"},_listAttributes:{role:"listbox"},useInkRipple:!1,wrapItemText:!1,showChevronExpr:function(t){return t?t.showChevron:void 0},badgeExpr:function(t){return t?t.badge:void 0}})},_defaultOptionsRules:function(){var t=x.current();return this.callBase().concat(k(),[{device:function(){return!m.nativeScrolling},options:{useNativeScrolling:!1}},{device:function(t){return!m.nativeScrolling&&!v.isSimulator()&&"desktop"===v.real().deviceType&&"generic"===t.platform},options:{showScrollbar:"onHover",pageLoadMode:"nextButton"}},{device:function(){return"desktop"===v.real().deviceType&&!v.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return x.isMaterial(t)},options:{pullingDownText:"",pulledDownText:"",refreshingText:"",pageLoadingText:"",useInkRipple:!0}}])},_visibilityChanged:function(t){t&&this._updateLoadingState(!0)},_itemClass:function(){return"dx-list-item"},_itemDataKey:function(){return"dxListItemData"},_itemContainer:function(){return this._$container},_refreshItemElements:function(){this.option("grouped")?this._itemElementsCache=this._itemContainer().children(".dx-list-group").children(".dx-list-group-body").children(this._itemSelector()):this._itemElementsCache=this._itemContainer().children(this._itemSelector())},_modifyByChanges:function(){this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState()},reorderItem:function(t,e){return this.callBase(t,e).done((function(){this._refreshItemElements()}))},deleteItem:function(t){return this.callBase(t).done((function(){this._refreshItemElements()}))},_itemElements:function(){return this._itemElementsCache},_itemSelectHandler:function(t){"single"===this.option("selectionMode")&&this.isItemSelected(t.currentTarget)||this.callBase(t)},_allowDynamicItemsAppend:function(){return!0},_init:function(){this.callBase(),this._$container=this.$element(),this._initScrollView(),this._feedbackShowTimeout=70,this._createGroupRenderAction()},_scrollBottomMode:function(){return"scrollBottom"===this.option("pageLoadMode")},_nextButtonMode:function(){return"nextButton"===this.option("pageLoadMode")},_dataSourceOptions:function(){var t=this._scrollBottomMode(),e=this._nextButtonMode();return d(this.callBase(),{paginate:r.ensureDefined(t||e,!0)})},_getGroupedOption:function(){return this.option("grouped")},_dataSourceFromUrlLoadMode:function(){return"raw"},_initScrollView:function(){var t=this.option("scrollingEnabled"),e=t&&this.option("pullRefreshEnabled"),n=t&&this._scrollBottomMode()&&!!this._dataSource;this._scrollView=this._createComponent(this.$element(),S,{disabled:this.option("disabled")||!t,onScroll:this._scrollHandler.bind(this),onPullDown:e?this._pullDownHandler.bind(this):null,onReachBottom:n?this._scrollBottomHandler.bind(this):null,showScrollbar:this.option("showScrollbar"),useNative:this.option("useNativeScrolling"),bounceEnabled:this.option("bounceEnabled"),scrollByContent:this.option("scrollByContent"),scrollByThumb:this.option("scrollByThumb"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),reachBottomText:this.option("pageLoadingText"),useKeyboard:!1}),this._$container=i(this._scrollView.content()),this.option("wrapItemText")&&this._$container.addClass("dx-wrap-item-text"),this._createScrollViewActions()},_createScrollViewActions:function(){this._scrollAction=this._createActionByOption("onScroll"),this._pullRefreshAction=this._createActionByOption("onPullRefresh"),this._pageLoadingAction=this._createActionByOption("onPageLoading")},_scrollHandler:function(t){this._scrollAction&&this._scrollAction(t)},_initTemplates:function(){this._templateManager.addDefaultTemplates({group:new T((function(t,e){a.isPlainObject(e)?e.key&&t.text(e.key):t.text(String(e))}),["key"],this.option("integrationOptions.watchMethod"))}),this.callBase()},_prepareDefaultItemTemplate:function(t,e){if(this.callBase(t,e),t.icon){var n=s.getImageContainer(t.icon).addClass("dx-list-item-icon"),o=i("
").addClass("dx-list-item-icon-container");o.append(n),e.prepend(o)}},_getBindableFields:function(){return["text","html","icon"]},_updateLoadingState:function(t){var e=!t||this._isLastPage(),n=this._scrollBottomMode(),i=e||!n,o=i&&!this._isDataSourceLoading();i||this._scrollViewIsFull()?(this._scrollView.release(o),this._toggleNextButton(this._shouldRenderNextButton()&&!this._isLastPage()),this._loadIndicationSuppressed(!1)):this._infiniteDataLoading()},_shouldRenderNextButton:function(){return this._nextButtonMode()&&this._dataSource&&this._dataSource.isLoaded()},_dataSourceLoadingChangedHandler:function(t){this._loadIndicationSuppressed()||(t&&this.option("indicateLoading")?this._showLoadingIndicatorTimer=setTimeout(function(){var t=!this._itemElements().length;this._scrollView&&!t&&this._scrollView.startLoading()}.bind(this)):(clearTimeout(this._showLoadingIndicatorTimer),this._scrollView&&this._scrollView.finishLoading()))},_dataSourceChangedHandler:function(t){!this._shouldAppendItems()&&C.hasWindow()&&this._scrollView&&this._scrollView.scrollTo(0),this.callBase.apply(this,arguments)},_refreshContent:function(){this._prepareContent(),this._fireContentReadyAction()},_hideLoadingIfLoadIndicationOff:function(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_loadIndicationSuppressed:function(t){if(!arguments.length)return this._isLoadIndicationSuppressed;this._isLoadIndicationSuppressed=t},_scrollViewIsFull:function(){return!this._scrollView||this._scrollView.isFull()},_pullDownHandler:function(t){this._pullRefreshAction(t),this._dataSource&&!this._isDataSourceLoading()?(this._clearSelectedItems(),this._dataSource.pageIndex(0),this._dataSource.reload()):this._updateLoadingState()},_infiniteDataLoading:function(){!this.$element().is(":visible")||this._scrollViewIsFull()||this._isDataSourceLoading()||this._isLastPage()||(clearTimeout(this._loadNextPageTimer),this._loadNextPageTimer=setTimeout(this._loadNextPage.bind(this)))},_scrollBottomHandler:function(t){this._pageLoadingAction(t),this._isDataSourceLoading()||this._isLastPage()?this._updateLoadingState():this._loadNextPage()},_renderItems:function(t){this.option("grouped")?(u(t,this._renderGroup.bind(this)),this._attachGroupCollapseEvent(),this._renderEmptyMessage(),x.isMaterial()&&this.attachGroupHeaderInkRippleEvents()):this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},_attachGroupCollapseEvent:function(){var t=w.addNamespace(f.name,this.NAME),e=this.$element(),n=this.option("collapsibleGroups");e.toggleClass("dx-list-collapsible-groups",n),o.off(e,t,".dx-list-group-header"),n&&o.on(e,t,".dx-list-group-header",function(t){this._createAction(function(t){var e=i(t.event.currentTarget).parent();this._collapseGroupHandler(e),this.option("focusStateEnabled")&&this.option("focusedElement",l(e.find(".dx-list-item").eq(0)))}.bind(this),{validatingTargetName:"element"})({event:t})}.bind(this))},_collapseGroupHandler:function(t,e){var n=new E;if(t.hasClass("dx-list-group-collapsed")===e)return n.resolve();var i=t.children(".dx-list-group-body"),o=i.outerHeight(),r=0===o?i.height("auto").outerHeight():0;return t.toggleClass("dx-list-group-collapsed",e),h.animate(i,{type:"custom",from:{height:o},to:{height:r},duration:200,complete:function(){this.updateDimensions(),this._updateLoadingState(),n.resolve()}.bind(this)}),n.promise()},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading(),this._initialized&&(this._renderEmptyMessage(),this._updateLoadingState())},_initMarkup:function(){this._itemElementsCache=i(),this.$element().addClass("dx-list"),this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.setAria("role",this.option("_listAttributes").role)},_renderInkRipple:function(){this._inkRipple=_.render()},_toggleActiveState:function(t,e,n){this.callBase.apply(this,arguments);var i=this;if(this._inkRipple){var o={element:t,event:n};e?x.isMaterial()?this._inkRippleTimer=setTimeout((function(){i._inkRipple.showWave(o)}),35):i._inkRipple.showWave(o):(clearTimeout(this._inkRippleTimer),this._inkRipple.hideWave(o))}},_postprocessRenderItem:function(t){this._refreshItemElements(),this.callBase.apply(this,arguments),this.option("onItemSwipe")&&this._attachSwipeEvent(i(t.itemElement))},_attachSwipeEvent:function(t){var e=w.addNamespace(p.end,this.NAME);o.on(t,e,this._itemSwipeEndHandler.bind(this))},_itemSwipeEndHandler:function(t){this._itemDXEventHandler(t,"onItemSwipe",{direction:t.offset<0?"left":"right"})},_nextButtonHandler:function(t){this._pageLoadingAction(t);var e=this._dataSource;e&&!e.isLoading()&&(this._scrollView.toggleLoading(!0),this._$nextButton.detach(),this._loadIndicationSuppressed(!0),this._loadNextPage())},_renderGroup:function(t,e){var n=i("
").addClass("dx-list-group").appendTo(this._itemContainer()),o=i("
").addClass("dx-list-group-header").appendTo(n),r=this.option("groupTemplate"),a=this._getTemplate(e.template||r,e,t,o),s={index:t,itemData:e,container:l(o)};this._createItemByTemplate(a,s),x.isMaterial()&&i("
").addClass("dx-list-group-header-indicator").prependTo(o),this._renderingGroupIndex=t;var c=i("
").addClass("dx-list-group-body").appendTo(n);u(P(e)||[],function(t,e){this._renderItem(t,e,c)}.bind(this)),this._groupRenderAction({groupElement:l(n),groupIndex:t,groupData:e})},downInkRippleHandler:function(t){this._toggleActiveState(i(t.currentTarget),!0,t)},upInkRippleHandler:function(t){this._toggleActiveState(i(t.currentTarget),!1)},attachGroupHeaderInkRippleEvents:function(){var t=this.$element();this._downInkRippleHandler=this._downInkRippleHandler||this.downInkRippleHandler.bind(this),this._upInkRippleHandler=this._upInkRippleHandler||this.upInkRippleHandler.bind(this);var e=[t,"dxpointerdown",".dx-list-group-header",this._downInkRippleHandler],n=[t,"dxpointerup dxpointerout",".dx-list-group-header",this._upInkRippleHandler];o.off.apply(o,e),o.on.apply(o,e),o.off.apply(o,n),o.on.apply(o,n)},_createGroupRenderAction:function(){this._groupRenderAction=this._createActionByOption("onGroupRendered")},_clean:function(){clearTimeout(this._inkRippleTimer),this._$nextButton&&(this._$nextButton.remove(),this._$nextButton=null),this.callBase.apply(this,arguments)},_dispose:function(){clearTimeout(this._holdTimer),clearTimeout(this._loadNextPageTimer),clearTimeout(this._showLoadingIndicatorTimer),this.callBase()},_toggleDisabledState:function(t){this.callBase(t),this._scrollView.option("disabled",t||!this.option("scrollingEnabled"))},_toggleNextButton:function(t){var e=this._dataSource,n=this._getNextButton();this.$element().toggleClass("dx-has-next",t),t&&e&&e.isLoaded()&&n.appendTo(this._itemContainer()),t||n.detach()},_getNextButton:function(){return this._$nextButton||(this._$nextButton=this._createNextButton()),this._$nextButton},_createNextButton:function(){var t=i("
").addClass("dx-list-next-button"),e=i("
").appendTo(t);return this._createComponent(e,b,{text:this.option("nextButtonText"),onClick:this._nextButtonHandler.bind(this),type:x.isMaterial()?"default":void 0,integrationOptions:{}}),t},_moveFocus:function(){this.callBase.apply(this,arguments),this.scrollToItem(this.option("focusedElement"))},_refresh:function(){if(C.hasWindow()){var t=this._scrollView.scrollTop();this.callBase(),t&&this._scrollView.scrollTo(t)}else this.callBase()},_optionChanged:function(t){switch(t.name){case"pageLoadMode":this._toggleNextButton(t.value),this._initScrollView();break;case"dataSource":this.callBase(t),this._initScrollView();break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"useNative":case"showScrollbar":case"bounceEnabled":case"scrollByContent":case"scrollByThumb":case"scrollingEnabled":case"pullRefreshEnabled":this._initScrollView(),this._updateLoadingState();break;case"nextButtonText":case"onItemSwipe":case"useInkRipple":this._invalidate();break;case"onScroll":case"onPullRefresh":case"onPageLoading":this._createScrollViewActions(),this._invalidate();break;case"grouped":case"collapsibleGroups":case"groupTemplate":this._invalidate();break;case"wrapItemText":this._$container.toggleClass("dx-wrap-item-text",t.value);break;case"onGroupRendered":this._createGroupRenderAction();break;case"width":case"height":this.callBase(t),this._scrollView.update();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;case"visible":this.callBase(t),this._scrollView.update();break;case"rtlEnabled":this._initScrollView(),this.callBase(t);break;case"showChevronExpr":case"badgeExpr":this._invalidate();break;case"_listAttributes":break;default:this.callBase(t)}},_extendActionArgs:function(t){if(!this.option("grouped"))return this.callBase(t);var e=t.closest(".dx-list-group"),n=e.find(".dx-list-item");return d(this.callBase(t),{itemIndex:{group:e.index(),item:n.index(t)}})},expandGroup:function(t){var e=new E,n=this._itemContainer().find(".dx-list-group").eq(t);return this._collapseGroupHandler(n,!1).done(function(){e.resolveWith(this)}.bind(this)),e.promise()},collapseGroup:function(t){var e=new E,n=this._itemContainer().find(".dx-list-group").eq(t);return this._collapseGroupHandler(n,!0).done(function(){e.resolveWith(this)}.bind(this)),e},updateDimensions:function(){var t=this,e=new E;return t._scrollView?t._scrollView.update().done((function(){!t._scrollViewIsFull()&&t._updateLoadingState(!0),e.resolveWith(t)})):e.resolveWith(t),e.promise()},reload:function(){this.callBase(),this.scrollTo(0),this._pullDownHandler()},repaint:function(){this.scrollTo(0),this.callBase()},scrollTop:function(){return this._scrollView.scrollOffset().top},clientHeight:function(){return this._scrollView.clientHeight()},scrollHeight:function(){return this._scrollView.scrollHeight()},scrollBy:function(t){this._scrollView.scrollBy(t)},scrollTo:function(t){this._scrollView.scrollTo(t)},scrollToItem:function(t){var e=this._editStrategy.getItemElement(t);this._scrollView.scrollToElement(e)}}).include(O);D.ItemClass=y,t.exports=D},function(t,e,n){"use strict";var i=n(3),o=n(18),r=n(10),a=n(12),s=n(8),l=n(17).getPublicElement,u=n(0).extend,c=n(4).noop,d=n(684),h=n(685),f=n(686),p=n(103),m=n(81),g=n(36),_=n(195),v={pullDown:d,swipeDown:h,simulated:f},y=!r.hasWindow(),b={finishLoading:c,release:c,refresh:c,_optionChanged:function(t){if("onUpdated"!==t.name)return this.callBase.apply(this,arguments)}},w=p.inherit(y?b:{_getDefaultOptions:function(){return u(this.callBase(),{pullingDownText:a.format("dxScrollView-pullingDownText"),pulledDownText:a.format("dxScrollView-pulledDownText"),refreshingText:a.format("dxScrollView-refreshingText"),reachBottomText:a.format("dxScrollView-reachBottomText"),onPullDown:null,onReachBottom:null,refreshStrategy:"pullDown"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return"android"===o.real().platform},options:{refreshStrategy:"swipeDown"}},{device:function(){return g.isMaterial()},options:{pullingDownText:"",pulledDownText:"",refreshingText:"",reachBottomText:""}}])},_init:function(){this.callBase(),this._loadingIndicatorEnabled=!0},_initScrollableMarkup:function(){this.callBase(),this.$element().addClass("dx-scrollview"),this._initContent(),this._initTopPocket(),this._initBottomPocket(),this._initLoadPanel()},_initContent:function(){var t=i("
").addClass("dx-scrollview-content");this._$content.wrapInner(t)},_initTopPocket:function(){var t=this._$topPocket=i("
").addClass("dx-scrollview-top-pocket"),e=this._$pullDown=i("
").addClass("dx-scrollview-pull-down");t.append(e),this._$content.prepend(t)},_initBottomPocket:function(){var t=this._$bottomPocket=i("
").addClass("dx-scrollview-bottom-pocket"),e=this._$reachBottom=i("
").addClass("dx-scrollview-scrollbottom"),n=i("
").addClass("dx-scrollview-scrollbottom-indicator"),o=new m(i("
")).$element(),r=this._$reachBottomText=i("
").addClass("dx-scrollview-scrollbottom-text");this._updateReachBottomText(),e.append(n.append(o)).append(r),t.append(e),this._$content.append(t)},_initLoadPanel:function(){var t=i("
").addClass("dx-scrollview-loadpanel").appendTo(this.$element()),e={shading:!1,delay:400,message:this.option("refreshingText"),position:{of:this.$element()}};this._loadPanel=this._createComponent(t,_,e)},_updateReachBottomText:function(){this._$reachBottomText.text(this.option("reachBottomText"))},_createStrategy:function(){var t=this.option("useNative")?this.option("refreshStrategy"):"simulated",e=v[t];if(!e)throw Error("E1030",this.option("refreshStrategy"));this._strategy=new e(this),this._strategy.pullDownCallbacks.add(this._pullDownHandler.bind(this)),this._strategy.releaseCallbacks.add(this._releaseHandler.bind(this)),this._strategy.reachBottomCallbacks.add(this._reachBottomHandler.bind(this))},_createActions:function(){this.callBase(),this._pullDownAction=this._createActionByOption("onPullDown"),this._reachBottomAction=this._createActionByOption("onReachBottom"),this._tryRefreshPocketState()},_tryRefreshPocketState:function(){this._pullDownEnable(this.hasActionSubscription("onPullDown")),this._reachBottomEnable(this.hasActionSubscription("onReachBottom"))},on:function(t){var e=this.callBase.apply(this,arguments);return"pullDown"!==t&&"reachBottom"!==t||this._tryRefreshPocketState(),e},_pullDownEnable:function(t){if(0===arguments.length)return this._pullDownEnabled;this._$pullDown&&this._strategy&&(this._$pullDown.toggle(t),this._strategy.pullDownEnable(t),this._pullDownEnabled=t)},_reachBottomEnable:function(t){if(0===arguments.length)return this._reachBottomEnabled;this._$reachBottom&&this._strategy&&(this._$reachBottom.toggle(t),this._strategy.reachBottomEnable(t),this._reachBottomEnabled=t)},_pullDownHandler:function(){this._loadingIndicator(!1),this._pullDownLoading()},_loadingIndicator:function(t){if(arguments.length<1)return this._loadingIndicatorEnabled;this._loadingIndicatorEnabled=t},_pullDownLoading:function(){this.startLoading(),this._pullDownAction()},_reachBottomHandler:function(){this._loadingIndicator(!1),this._reachBottomLoading()},_reachBottomLoading:function(){this.startLoading(),this._reachBottomAction()},_releaseHandler:function(){this.finishLoading(),this._loadingIndicator(!0)},_optionChanged:function(t){switch(t.name){case"onPullDown":case"onReachBottom":this._createActions();break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"refreshStrategy":this._invalidate();break;case"reachBottomText":this._updateReachBottomText();break;default:this.callBase(t)}},isEmpty:function(){return!i(this.content()).children().length},content:function(){return l(this._$content.children().eq(1))},release:function(t){return void 0!==t&&this.toggleLoading(!t),this._strategy.release()},toggleLoading:function(t){this._reachBottomEnable(t)},isFull:function(){return i(this.content()).height()>this._$container.height()},refresh:function(){this.hasActionSubscription("onPullDown")&&(this._strategy.pendingRelease(),this._pullDownLoading())},startLoading:function(){this._loadingIndicator()&&this.$element().is(":visible")&&this._loadPanel.show(),this._lock()},finishLoading:function(){this._loadPanel.hide(),this._unlock()},_dispose:function(){this._strategy.dispose(),this.callBase(),this._loadPanel&&this._loadPanel.$element().remove()}});s("dxScrollView",w),t.exports=w},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=f(n(3)),r=f(n(6)),a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var e=h();if(e&&e.has(t))return e.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=o?Object.getOwnPropertyDescriptor(t,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=t[r]}n.default=t,e&&e.set(t,n);return n}(n(11)),s=n(4),l=n(5),u=f(n(18)),c=f(n(21)),d=f(n(381));function h(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return h=function(){return t},t}function f(t){return t&&t.__esModule?t:{default:t}}var p=c.default.inherit({ctor:function(t){this._init(t)},_init:function(t){this._component=t,this._$element=t.$element(),this._$container=t._$container,this._$content=t._$content,this._direction=t.option("direction"),this._useSimulatedScrollbar=t.option("useSimulatedScrollbar"),this._showScrollbar=t.option("showScrollbar"),this.option=t.option.bind(t),this._createActionByOption=t._createActionByOption.bind(t),this._isLocked=t._isLocked.bind(t),this._isDirection=t._isDirection.bind(t),this._allowedDirection=t._allowedDirection.bind(t)},render:function(){this._renderPushBackOffset();var t=u.default.real().platform;this._$element.addClass("dx-scrollable-native").addClass("dx-scrollable-native-"+t).toggleClass("dx-scrollable-scrollbars-hidden",!this._showScrollbar),this._showScrollbar&&this._useSimulatedScrollbar&&this._renderScrollbars()},updateBounds:s.noop,_renderPushBackOffset:function(){var t=this.option("pushBackValue");(t||this._component._lastPushBackValue)&&(this._$content.css({paddingTop:t,paddingBottom:t}),this._component._lastPushBackValue=t)},_renderScrollbars:function(){this._scrollbars={},this._hideScrollbarTimeout=0,this._$element.addClass("dx-scrollable-scrollbar-simulated"),this._renderScrollbar("vertical"),this._renderScrollbar("horizontal")},_renderScrollbar:function(t){this._isDirection(t)&&(this._scrollbars[t]=new d.default((0,o.default)("
").appendTo(this._$element),{direction:t,expandable:this._component.option("scrollByThumb")}))},handleInit:s.noop,handleStart:function(){this._disablePushBack=!0},handleMove:function(t){this._isLocked()?t.cancel=!0:this._allowedDirection()&&(t.originalEvent.isScrollingEvent=!0)},handleEnd:function(){this._disablePushBack=!1},handleCancel:s.noop,handleStop:s.noop,_eachScrollbar:function(t){t=t.bind(this),(0,l.each)(this._scrollbars||{},(function(e,n){t(n,e)}))},createActions:function(){this._scrollAction=this._createActionByOption("onScroll"),this._updateAction=this._createActionByOption("onUpdated")},_createActionArgs:function(){var t=this.location(),e=this._$container.get(0);return{event:this._eventForUserAction,scrollOffset:{top:-t.top,left:-t.left},reachedLeft:this._isDirection("horizontal")?t.left>=0:void 0,reachedRight:this._isDirection("horizontal")?Math.abs(t.left)>=e.scrollWidth-e.clientWidth:void 0,reachedTop:this._isDirection("vertical")?t.top>=0:void 0,reachedBottom:this._isDirection("vertical")?Math.abs(t.top)>=e.scrollHeight-e.clientHeight-2*this.option("pushBackValue"):void 0}},handleScroll:function(t){this._isScrollLocationChanged()?(this._eventForUserAction=t,this._moveScrollbars(),this._scrollAction(this._createActionArgs()),this._lastLocation=this.location(),this._pushBackFromBoundary()):t.stopImmediatePropagation()},_pushBackFromBoundary:function(){var t=this.option("pushBackValue");if(t&&!this._disablePushBack){var e=this._containerSize.height-this._contentSize.height,n=this._$container.scrollTop();n?e+n-2*t||this._$container.scrollTop(t-e):this._$container.scrollTop(t)}},_isScrollLocationChanged:function(){var t=this.location(),e=this._lastLocation||{},n=e.top!==t.top,i=e.left!==t.left;return n||i},_moveScrollbars:function(){this._eachScrollbar((function(t){t.moveTo(this.location()),t.option("visible",!0)})),this._hideScrollbars()},_hideScrollbars:function(){clearTimeout(this._hideScrollbarTimeout),this._hideScrollbarTimeout=setTimeout(function(){this._eachScrollbar((function(t){t.option("visible",!1)}))}.bind(this),500)},location:function(){return{left:-this._$container.scrollLeft(),top:this.option("pushBackValue")-this._$container.scrollTop()}},disabledChanged:s.noop,update:function(){this._update(),this._updateAction(this._createActionArgs())},_update:function(){this._updateDimensions(),this._updateScrollbars()},_updateDimensions:function(){this._containerSize={height:this._$container.height(),width:this._$container.width()},this._componentContentSize={height:this._component.$content().height(),width:this._component.$content().width()},this._contentSize={height:this._$content.height(),width:this._$content.width()},this._pushBackFromBoundary()},_updateScrollbars:function(){this._eachScrollbar((function(t,e){var n="vertical"===e?"height":"width";t.option({containerSize:this._containerSize[n],contentSize:this._componentContentSize[n]}),t.update()}))},_allowedDirections:function(){return{vertical:this._isDirection("vertical")&&this._contentSize.height>this._containerSize.height,horizontal:this._isDirection("horizontal")&&this._contentSize.width>this._containerSize.width}},dispose:function(){var t=this._$element.get(0).className,e=new RegExp("dx-scrollable-native\\S*","g");e.test(t)&&this._$element.removeClass(t.match(e).join(" ")),r.default.off(this._$element,".dxNativeScrollable"),r.default.off(this._$container,".dxNativeScrollable"),this._removeScrollbars(),clearTimeout(this._hideScrollbarTimeout)},_removeScrollbars:function(){this._eachScrollbar((function(t){t.$element().remove()}))},scrollBy:function(t){var e=this.location();this._$container.scrollTop(Math.round(-e.top-t.top+this.option("pushBackValue"))),this._$container.scrollLeft(Math.round(-e.left-t.left))},validate:function(t){return!this.option("disabled")&&((!a.isDxMouseWheelEvent(t)||!this._isScrolledInMaxDirection(t))&&!!this._allowedDirection())},_isScrolledInMaxDirection:function(t){var e=this._$container.get(0);return t.delta>0?t.shiftKey?!e.scrollLeft:!e.scrollTop:t.shiftKey?e.clientWidth+e.scrollLeft>=e.scrollWidth:e.clientHeight+e.scrollTop>=e.scrollHeight},getDirection:function(){return this._allowedDirection()},verticalOffset:function(){return this.option("pushBackValue")}});t.exports=p},function(t,e,n){"use strict";var i=n(6),o=n(21),r=o.abstract,a=n(11),s=n(262),l=n(131),u=n(184),c=n(18).real(),d=n(187).compare,h=o.inherit(function(){var t=a.addNamespace("scroll","dxScrollEmitter");return{ctor:function(e){this._element=e,this._locked=!1;var n=this;this._proxiedScroll=function(t){n._scroll(t)},i.on(this._element,t,this._proxiedScroll)},_scroll:r,check:function(t,e){this._locked&&e()},dispose:function(){i.off(this._element,t,this._proxiedScroll)}}}()),f=h.inherit({ctor:function(t,e){this.callBase(t),this._timeout=e},_scroll:function(){this._prepare(),this._forget()},_prepare:function(){this._timer&&this._clearTimer(),this._locked=!0},_clearTimer:function(){clearTimeout(this._timer),this._locked=!1,this._timer=null},_forget:function(){var t=this;this._timer=setTimeout((function(){t._clearTimer()}),this._timeout)},dispose:function(){this.callBase(),this._clearTimer()}}),p=f.inherit({ctor:function(t){this.callBase(t,400),this._lastWheelDirection=null},check:function(t,e){this._checkDirectionChanged(t),this.callBase(t,e)},_checkDirectionChanged:function(t){if(a.isDxMouseWheelEvent(t)){var e=t.shiftKey||!1,n=null!==this._lastWheelDirection&&e!==this._lastWheelDirection;this._lastWheelDirection=e,this._locked=this._locked&&!n}else this._lastWheelDirection=null}}),m=f.inherit({ctor:function(t){this.callBase(t,400)}});!function(){var t=c.ios&&d(c.version,[8])>=0,e=c.android&&d(c.version,[5])>=0;(t||e)&&(m=h.inherit({_scroll:function(){this._locked=!0;var t=this;u.cancelAnimationFrame(this._scrollFrame),this._scrollFrame=u.requestAnimationFrame((function(){t._locked=!1}))},check:function(t,e){u.cancelAnimationFrame(this._scrollFrame),u.cancelAnimationFrame(this._checkFrame);var n=this,i=this.callBase;this._checkFrame=u.requestAnimationFrame((function(){i.call(n,t,e),n._locked=!1}))},dispose:function(){this.callBase(),u.cancelAnimationFrame(this._scrollFrame),u.cancelAnimationFrame(this._checkFrame)}}))}(),l({emitter:s.inherit(function(){var t=Math.round(1e3/60);return{ctor:function(t){this.callBase.apply(this,arguments),this.direction="both",this._pointerLocker=new m(t),this._wheelLocker=new p(t)},validate:function(){return!0},configure:function(t){t.scrollTarget&&(this._pointerLocker.dispose(),this._wheelLocker.dispose(),this._pointerLocker=new m(t.scrollTarget),this._wheelLocker=new p(t.scrollTarget)),this.callBase(t)},_init:function(t){this._wheelLocker.check(t,function(){a.isDxMouseWheelEvent(t)&&this._accept(t)}.bind(this)),this._pointerLocker.check(t,function(){var e=this.isNative&&a.isMouseEvent(t);a.isDxMouseWheelEvent(t)||e||this._accept(t)}.bind(this)),this._fireEvent("dxscrollinit",t),this._prevEventData=a.eventData(t)},move:function(t){this.callBase.apply(this,arguments),t.isScrollingEvent=this.isNative||t.isScrollingEvent},_start:function(t){this._savedEventData=a.eventData(t),this._fireEvent("dxscrollstart",t),this._prevEventData=a.eventData(t)},_move:function(t){var e=a.eventData(t);this._fireEvent("dxscroll",t,{delta:a.eventDelta(this._prevEventData,e)}),a.eventDelta(this._savedEventData,e).time>200&&(this._savedEventData=this._prevEventData),this._prevEventData=a.eventData(t)},_end:function(e){var n=a.eventDelta(this._prevEventData,a.eventData(e)),i={x:0,y:0};if(!a.isDxMouseWheelEvent(e)&&n.time<100){var o=a.eventDelta(this._savedEventData,this._prevEventData),r=t/o.time;i={x:o.x*r,y:o.y*r}}this._fireEvent("dxscrollend",e,{velocity:i})},_stop:function(t){this._fireEvent("dxscrollstop",t)},cancel:function(t){this.callBase.apply(this,arguments),this._fireEvent("dxscrollcancel",t)},dispose:function(){this.callBase.apply(this,arguments),this._pointerLocker.dispose(),this._wheelLocker.dispose()},_clearSelection:function(){if(!this.isNative)return this.callBase.apply(this,arguments)},_toggleGestureCover:function(){if(!this.isNative)return this.callBase.apply(this,arguments)}}}()),events:["dxscrollinit","dxscrollstart","dxscroll","dxscrollend","dxscrollstop","dxscrollcancel"]}),t.exports={init:"dxscrollinit",start:"dxscrollstart",move:"dxscroll",end:"dxscrollend",stop:"dxscrollstop",cancel:"dxscrollcancel"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.default={_getSpecificDataSourceOption:function(){var t=this.option("dataSource"),e=!1,n={};return this._getGroupedOption()&&function(t){return Array.isArray(t)&&t.every((function(t){return 2===Object.keys(t).length&&("key"in t&&"items"in t)&&Array.isArray(t.items)}))}(t)&&(n=t.reduce((function(t,n){var o=n.items.map((function(t){return(0,i.isObject)(t)||(t={text:t},e=!0),"key"in t||(t.key=n.key),t}));return t.concat(o)}),[]),t={store:{type:"array",data:n},group:{selector:"key",keepInitialKeyOrder:!0}},e&&(t.searchExpr="text")),t}}},function(t,e,n){"use strict";var i=f(n(3)),o=f(n(8)),r=n(0),a=f(n(223)),s=n(17),l=n(10),u=n(24),c=f(n(33)),d=f(n(47)),h=n(7);function f(t){return t&&t.__esModule?t:{default:t}}var p=function(t){return(0,i.default)(t).is(":visible")},m=function(t,e){var n,i;if(t){var o=(null===(n=e.to)||void 0===n?void 0:n.left)||0,r=(null===(i=e.to)||void 0===i?void 0:i.top)||0;t.style.transform="translate(".concat(o,"px,").concat(r,"px)"),t.style.transition=d.default.off?"":"all ".concat(e.duration,"ms ").concat(e.easing)}},g=a.default.inherit({_getDefaultOptions:function(){return(0,r.extend)(this.callBase(),{clone:!0,filter:"> *",itemOrientation:"vertical",dropFeedbackMode:"push",allowDropInsideItem:!1,allowReordering:!0,moveItemOnDrop:!1,onDragChange:null,onAdd:null,onRemove:null,onReorder:null,onPlaceholderPrepared:null,animation:{type:"slide",duration:300,easing:"ease"},fromIndex:null,toIndex:null,dropInsideItem:!1,itemPoints:null})},reset:function(){this.option({dropInsideItem:!1,toIndex:null,fromIndex:null}),this._$placeholderElement&&this._$placeholderElement.remove(),this._$placeholderElement=null,!this._isIndicateMode()&&this._$modifiedItem&&(this._$modifiedItem.css("marginBottom",this._modifiedItemMargin),this._$modifiedItem=null)},_getPrevVisibleItem:function(t,e){return t.slice(0,e).reverse().filter(p)[0]},_dragStartHandler:function(t){if(this.callBase.apply(this,arguments),!0!==t.cancel){var e=this._getSourceElement();this._updateItemPoints(),this.option("fromIndex",this._getElementIndex(e))}},_dragEnterHandler:function(){if(this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&(this._updateItemPoints(),this.option("fromIndex",-1),!this._isIndicateMode())){var t=this.option("itemPoints"),e=t[t.length-1];if(e){var n=this.$element(),o=this._getSourceElement(),r=this._isVerticalOrientation(),a=r?o.outerHeight(!0):o.outerWidth(!0),s=n.get(0)[r?"scrollHeight":"scrollWidth"],l=n.get(0)[r?"scrollTop":"scrollLeft"],u=r?"top":"left",c=e[u],d=n.offset()[u],h=d+s-l-c;if(h=t.pageY&&i.top<=t.pageY,r=i.left+n.width()>=t.pageX&&i.left<=t.pageX;return o&&r}return!0},dragEnd:function(t){var e,n,i=this._getSourceElement(),o=this._getSourceDraggable(),r=o.NAME!==this.NAME,a=this.option("toIndex"),s=this._isInsideTargetDraggable(t.event);if(null!==a&&a>=0&&s&&(o!==this&&((e=this._fireAddEvent(t))||(n=this._fireRemoveEvent(t))),r&&c.default.resetPosition(i),this.option("moveItemOnDrop")&&!e&&this._moveItem(i,a,n),o===this))return this._fireReorderEvent(t);return(new h.Deferred).resolve()},dragMove:function(t){var e=this.option("itemPoints");if(e){for(var n,i=this._isVerticalOrientation(),o=i?"top":"left",r=i?t.pageY:t.pageX,a=this.option("rtlEnabled"),s=e.length-1;s>=0;s--){var l=e[s+1]&&(e[s][o]+e[s+1][o])/2;if(!(!i&&a?r>l:l>r)&&void 0!==l)break;n=e[s]}n&&(this._updatePlaceholderPosition(t,n),this._verticalScrollHelper.isScrolling()&&this._isIndicateMode()&&this._movePlaceholder())}},_isIndicateMode:function(){return"indicate"===this.option("dropFeedbackMode")||this.option("allowDropInsideItem")},_createPlaceholder:function(){var t;return this._isIndicateMode()&&(t=(0,i.default)("
").addClass(this._addWidgetPrefix("placeholder")).insertBefore(this._getSourceDraggable()._$dragElement)),this._$placeholderElement=t,t},_getItems:function(){var t=this._getItemsSelector();return this._$content().find(t).not("."+this._addWidgetPrefix("placeholder")).not("."+this._addWidgetPrefix("clone")).toArray()},_allowReordering:function(){return this._getSourceDraggable()!==this._getTargetDraggable()||this.option("allowReordering")},_isValidPoint:function(t,e,n){var i=this.option("allowDropInsideItem");return!!(n||this._allowReordering()||0===t&&i)&&(!this._isIndicateMode()||(-1===e||t!==e&&(n||t!==e+1)))},_getItemPoints:function(){var t,e,n,o=[],a=this.option("rtlEnabled"),s=this._isVerticalOrientation(),l=this._getItems(),u=l.filter(p),c=u.length,d=this._getDraggableElement(),h=u.indexOf(d.get(0));if(c){for(var f=0;f<=c;f++){var m=!s&&a^f===c,g=s&&f===c;f=t||e?t:t-1,0)},_updatePlaceholderPosition:function(t,e){var n=this._getSourceDraggable(),i=this._normalizeToIndex(e.index,e.dropInsideItem),o=(0,r.extend)(this._getEventArgs(t),{toIndex:i,dropInsideItem:e.dropInsideItem});e.isValid&&this._getAction("onDragChange")(o),!o.cancel&&e.isValid?(this.option({dropInsideItem:e.dropInsideItem,toIndex:e.index}),this._getAction("onPlaceholderPrepared")((0,r.extend)(this._getEventArgs(t),{placeholderElement:(0,s.getPublicElement)(this._$placeholderElement),dragElement:(0,s.getPublicElement)(n._$dragElement)})),this._updateItemPoints()):e.isValid||this.option({dropInsideItem:!1,toIndex:null})},_makeWidthCorrection:function(t,e){if(this._$scrollable=this._getScrollable(t),this._$scrollable&&this._$scrollable.width()0?n-i:o>0?n-o:n}return e},_updatePlaceholderSizes:function(t,e){var n=this.option("dropInsideItem"),o=e?(0,i.default)(e):this._getSourceElement(),r=this._isVerticalOrientation(),a="",s="";t.toggleClass(this._addWidgetPrefix("placeholder-inside"),n),(r||n)&&(a=o.outerWidth()),r&&!n||(s=o.outerHeight()),a=this._makeWidthCorrection(o,a),t.css({width:a,height:s})},_moveItem:function(t,e,n){var i,o=this._getItems(),r=o[e],a=this._getSourceDraggable();n&&(t=t.clone(),a._toggleDragSourceClass(!1,t)),r||(i=o[e-1]),this._moveItemCore(t,r,i)},_moveItemCore:function(t,e,n){e||n?n?t.insertAfter((0,i.default)(n)):t.insertBefore((0,i.default)(e)):t.appendTo(this.$element())},_getDragStartArgs:function(t,e){return(0,r.extend)(this.callBase.apply(this,arguments),{fromIndex:this._getElementIndex(e)})},_getEventArgs:function(t){var e=this._getSourceDraggable(),n=this._getTargetDraggable(),i=n.option("dropInsideItem");return(0,r.extend)(this.callBase.apply(this,arguments),{fromIndex:e.option("fromIndex"),toIndex:this._normalizeToIndex(n.option("toIndex"),i),dropInsideItem:i})},_optionChanged:function(t){var e=this,n=t.name;switch(n){case"onDragChange":case"onPlaceholderPrepared":case"onAdd":case"onRemove":case"onReorder":this["_"+n+"Action"]=this._createActionByOption(n);break;case"itemOrientation":case"allowDropInsideItem":case"moveItemOnDrop":case"dropFeedbackMode":case"itemPoints":case"animation":case"allowReordering":break;case"fromIndex":this._$sourceElement||[!1,!0].forEach((function(n){var o=n?t.value:t.previousValue;if(null!==o){var r=(0,i.default)(e._getItems()[o]);e._toggleDragSourceClass(n,r)}}));break;case"dropInsideItem":this._optionChangedDropInsideItem(t);break;case"toIndex":this._optionChangedToIndex(t);break;default:this.callBase(t)}},_optionChangedDropInsideItem:function(){this._isIndicateMode()&&this._$placeholderElement&&this._movePlaceholder()},_isPositionVisible:function(t){var e,n=this.$element();if("hidden"!==n.css("overflow")?e=n.get(0):n.parents().each((function(){if("visible"!==(0,i.default)(this).css("overflow"))return e=this,!1})),e){var o=(0,u.getBoundingRect)(e),r=this._isVerticalOrientation(),a=r?"top":"left",s=r?"bottom":"right",c=(0,l.getWindow)(),d=r?c.pageYOffset:c.pageXOffset;if(t[a]o[s]+d)return!1}return!0},_optionChangedToIndex:function(t){var e=t.value;if(this._isIndicateMode()){var n=null!==e&&e>=0;this._togglePlaceholder(n),n&&this._movePlaceholder()}else this._moveItems(t.previousValue,t.value)},_makeLeftCorrection:function(t,e){var n=this._$scrollable;return n&&this._isVerticalOrientation()&&n.scrollLeft()>e&&(t+=n.scrollLeft()-e),t},_movePlaceholder:function(){var t=this._$placeholderElement||this._createPlaceholder(),e=this._getItems(),n=this.option("toIndex"),o=e[n],r=this._isVerticalOrientation(),a=this.option("rtlEnabled"),s=this.option("dropInsideItem"),l=null,u=0;if(this._updatePlaceholderSizes(t,o),o){var c=(0,i.default)(o);l=c.offset(),u=parseFloat(c.css("marginLeft")),r||!a||s||(l.left+=c.outerWidth(!0))}else{var d=this._getPrevVisibleItem(e,n);d&&(l=(0,i.default)(d).offset(),r?l.top+=(0,i.default)(d).outerHeight(!0):a||(l.left+=(0,i.default)(d).outerWidth(!0)))}l&&!this._isPositionVisible(l)&&(l=null),l&&(l.left=this._makeLeftCorrection(l.left,u),this._move(l,t)),t.toggle(!!l)},_getPositions:function(t,e,n,i){for(var o=[],r=0;r=i&&(a=e):-1===i?r>n&&(a=-e):nn&&ri&&r>=i&&r").addClass(n).prependTo(t),this._searchEditor=this._createComponent(this._$searchEditorElement,a.default,r))},_removeSearchBox:function(){this._$searchEditorElement&&this._$searchEditorElement.remove(),delete this._$searchEditorElement,delete this._searchEditor},_getSearchEditorOptions:function(){var t=this,e=t.option("searchEditorOptions"),n=r.default.format("Search");return(0,o.extend)({mode:"search",placeholder:n,tabIndex:t.option("tabIndex"),value:t.option("searchValue"),valueChangeEvent:"input",inputAttr:{"aria-label":n},onValueChanged:function(e){var n=t.option("searchTimeout");t._valueChangeDeferred=new l.Deferred,clearTimeout(t._valueChangeTimeout),t._valueChangeDeferred.done(function(){this.option("searchValue",e.value)}.bind(t)),e.event&&"input"===e.event.type&&n?t._valueChangeTimeout=setTimeout((function(){t._valueChangeDeferred.resolve()}),n):t._valueChangeDeferred.resolve()}},e)},_getAriaTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.$element()},_focusTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_updateFocusState:function(t,e){this.option("searchEnabled")&&this._toggleFocusClass(e,this.$element()),this.callBase(t,e)},getOperationBySearchMode:function(t){return"equals"===t?"=":t},_cleanAria:function(t){this.setAria({role:null,activedescendant:null},t),t.attr("tabIndex",null)},_optionChanged:function(t){switch(t.name){case"searchEnabled":case"searchEditorOptions":this._cleanAria(this.option("searchEnabled")?this.$element():this._itemContainer()),this._invalidate();break;case"searchExpr":case"searchMode":case"searchValue":if(!this._dataSource)return void s.default.log("W1009");"searchMode"===t.name?this._dataSource.searchOperation(this.getOperationBySearchMode(t.value)):this._dataSource[t.name](t.value),this._dataSource.load();break;case"searchTimeout":break;default:this.callBase(t)}},focus:function(){this.option("focusedElement")||!this.option("searchEnabled")?this.callBase():this._searchEditor&&this._searchEditor.focus()},_refresh:function(){this._valueChangeDeferred&&this._valueChangeDeferred.resolve(),this.callBase()}}},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(129),r=n(29),a=n(4),s=n(2),l=n(0).extend,u=n(99),c=n(92),d=n(107),h=n(7).Deferred,f=l({},u,{_dataExpressionDefaultOptions:function(){return{items:[],dataSource:null,itemTemplate:"item",value:null,valueExpr:"this",displayExpr:void 0}},_initDataExpressions:function(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource:function(){this.option("dataSource")||(this._dataSource=new c.DataSource({store:new d(this.option("items")),pageSize:0}))},_compileDisplayGetter:function(){this._displayGetter=r.compileGetter(this._displayGetterExpr())},_displayGetterExpr:function(){return this.option("displayExpr")},_compileValueGetter:function(){this._valueGetter=r.compileGetter(this._valueGetterExpr())},_valueGetterExpr:function(){return this.option("valueExpr")||"this"},_loadValue:function(t){var e=new h;return t=this._unwrappedValue(t),s.isDefined(t)?(this._loadSingle(this._valueGetterExpr(),t).done(function(n){this._isValueEquals(this._valueGetter(n),t)?e.resolve(n):e.reject()}.bind(this)).fail((function(){e.reject()})),e.promise()):e.reject().promise()},_getCurrentValue:function(){return this.option("value")},_unwrappedValue:function(t){return(t=s.isDefined(t)?t:this._getCurrentValue())&&this._dataSource&&"this"===this._valueGetterExpr()&&(t=this._getItemKey(t)),o.unwrap(t)},_getItemKey:function(t){var e=this._dataSource.key();if(Array.isArray(e)){for(var n={},o=0,r=e.length;ot.length)&&(e=t.length);for(var n=0,i=new Array(e);ne)for(o=1,r=t.value.length;o<=r;++o)if(n+t.tspan.getSubStringLength(0,o)>e)return o-1}function it(t){return t.value.length?t.tspan.getSubStringLength(0,t.value.length):0}function ot(t,e){return e.hideOverflowEllipsis&&0===t?"":"..."}function rt(t,e,n){var i=ot(e,n);if(t.value.length&&t.tspan.parentNode)for(var o=t.value.length-1;o>=1;o--){if(t.startBox+t.tspan.getSubStringLength(0,o)i?(a[0].forEach((function(t){t.parts.forEach((function(t){ut(t)}))})),[]):a[0]}function st(t,e,n,i,o){if(!e){var r={value:t.textContent,height:0,line:0};t.textContent="",J([r],t,"tspan"),e=[r]}return e.reduce((function(t,e){var r=p(t,5),a=r[0],s=r[1],l=r[2],u=r[3],c=r[4],d=a[a.length-1];if(u)return[a,s,l,u];if(d&&e.line===c){if(e.startBox=s,s>i&&"none"===o.wordWrap&&"ellipsis"===o.textOverflow)return ut(e),[a,s,l,u,c];d.parts.push(e),d.commonLength+=e.value.length}else e.startBox=s=0,a.push({commonLength:e.value.length,parts:[e]});if(e.endBox=l=s+it(e),s=l,(0,h.isDefined)(n)&&l>n){var f=function t(e,n,i,o){var r,a=e.value;"none"!==o.wordWrap&&(r="normal"===o.wordWrap?function(t,e){for(var n=t.startBox>0?[0]:[],i=t.value.split("").reduce((function(t,e,n){return" "===e&&t.push(n),t}),n),o=0;void 0!==i[o+1]&&t.startBox+t.tspan.getSubStringLength(0,i[o+1])e)return n}(e,n));var s,l=[];if(isFinite(r)){lt(e,r,"");var u=" "===a[r]?1:0,c=a.slice(r+u);if(c.length){var d=tt(e.tspan);if(d.textContent=c,e.tspan.parentNode.appendChild(d),(s=B(B({},e),{value:c,startBox:0,height:0,tspan:d,stroke:tt(e.stroke),endBox:d.getSubStringLength(0,c.length)})).stroke&&(s.stroke.textContent=c),s.endBox>n&&!(l=t(s,n,i,o)).length)return[]}}if(e.value.length){if("ellipsis"===o.textOverflow&&e.tspan.getSubStringLength(0,e.value.length)>n&&rt(e,i,o),"hide"===o.textOverflow&&e.tspan.getSubStringLength(0,e.value.length)>n)return[]}else e.tspan.parentNode.removeChild(e.tspan);var h=[];return s&&h.push(s),[{commonLength:a.length,parts:h}].concat(l)}(e,n,i,o);f.length?a=a.concat(f.filter((function(t){return t.parts.length>0}))):(a=[],u=!0)}return[a,s,l,u,e.line]}),[[],0,0,!1,0])[0]}function lt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",i=t.value.substr(0,e)+n;t.value=t.tspan.textContent=i,t.stroke&&(t.stroke.textContent=i),"..."===n&&(t.hasEllipsis=!0)}function ut(t){t.tspan.parentNode&&t.tspan.parentNode.removeChild(t.tspan),t.stroke&&t.stroke.parentNode&&t.stroke.parentNode.removeChild(t.stroke)}function ct(t,e,n){t.tspan.setAttribute(e,n),t.stroke&&t.stroke.setAttribute(e,n)}function dt(t,e){return t.inherits?ft(t.height,e):t.height||e}function ht(t){if(t._texts){var e,n,i=t._texts,o=t._settings.x,r=t._getLineHeight(),a=i[0];for(ct(a,"x",o),ct(a,"y",t._settings.y),e=1,n=i.length;e=0)ct(a,"x",o),ct(a,"dy",dt(a,r))}}}function ft(t,e){var n=parseFloat(t),i=parseFloat(e),o=n||12,r=i||12;return o>r?isNaN(n)?o:t:isNaN(i)?r:e}function pt(t,e,n,i){var o,r;n=n||{};var a=t.renderer,s=t._settings,l={},u={translateX:0,translateY:0,scaleX:1,scaleY:1,rotate:0,rotateX:0,rotateY:0};if(i&&(n.complete=i),a.animationEnabled()){for(o in e)r=e[o],/^(translate(X|Y)|rotate[XY]?|scale(X|Y))$/i.test(o)?(l.transform=l.transform||{from:{},to:{}},l.transform.from[o]=o in s?Number(s[o].toFixed(3)):u[o],l.transform.to[o]=r):l[o]="arc"===o||"segments"===o?r:{from:o in s?s[o]:parseFloat(t.element.getAttribute(o)||0),to:r};a.animateElement(t,l,B(B({},a._animation),n))}else n.step&&n.step.call(t,1,1),n.complete&&n.complete.call(t),t.attr(e);return t}function mt(t,e){var n={is:!1,name:e.name||e,after:e.after};return t?n.to=t:n.virtual=!0,n}function gt(t,e,n){this.renderer=t,this.element=A(e),this._settings={},this._styles={},"path"===e&&(this.type=n||"line")}function _t(t){kt.remove(t)}function vt(t,e){gt.call(this,t,"path",e)}function yt(t){gt.call(this,t,"path","arc")}function bt(t){gt.call(this,t,"rect")}function wt(t){gt.call(this,t,"text"),this.css({"white-space":"pre"})}function xt(t,e){var n,i;for(n=e;i=t[n];++n)i._link.i=n}function Ct(t,e){var n,i,o=e._links,r=t._link.after=t._link.after||e._linkAfter;if(r){for(n=0;(i=o[n])&&i._link.name!==r;++n);if(i)for(++n;(i=o[n])&&i._link.after===r;++n);}else n=o.length;o.splice(n,0,t),xt(o,n)}function St(t){this.root=this._createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",fill:T,stroke:T,"stroke-width":0}).attr({class:t.cssClass}).css({"line-height":"normal","-ms-user-select":T,"-moz-user-select":T,"-webkit-user-select":T,"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)",display:"block",overflow:"hidden"}),this._init(),this.pathModified=!!t.pathModified,this._$container=(0,i.default)(t.container),this.root.append({element:t.container}),this.fixPlacement(),this._locker=0,this._backed=!1}e.SvgElement=gt,gt.prototype={constructor:gt,_getJQElement:function(){return this._$element||(this._$element=(0,i.default)(this.element))},_addFixIRICallback:function(){var t=this,e=function(){Z(t,"fill"),Z(t,"clip-path"),Z(t,"filter")};t.element._fixFuncIri=e,e.renderer=t.renderer,kt.add(e),t._addFixIRICallback=function(){}},_clearChildrenFuncIri:function(){!function t(e){var n;for(n=0;na&&(o=e.slice(0),s(e,t,n));return o}(r,i=z(t.points,this.type),this.type),t.segments={from:r,to:i,end:o},delete t.points),pt(this,t,e,n)}}),e.ArcSvgElement=yt,yt.prototype=E(gt.prototype),B(yt.prototype,{constructor:yt,attr:function(t){var e,n,i,o,r,a,s=this._settings;return D(t)&&("x"in(t=B({},t))||"y"in t||"innerRadius"in t||"outerRadius"in t||"startAngle"in t||"endAngle"in t)&&(s.x=e="x"in t?t.x:s.x,delete t.x,s.y=n="y"in t?t.y:s.y,delete t.y,s.innerRadius=i="innerRadius"in t?t.innerRadius:s.innerRadius,delete t.innerRadius,s.outerRadius=o="outerRadius"in t?t.outerRadius:s.outerRadius,delete t.outerRadius,s.startAngle=r="startAngle"in t?t.startAngle:s.startAngle,delete t.startAngle,s.endAngle=a="endAngle"in t?t.endAngle:s.endAngle,delete t.endAngle,t.d=V.apply(null,function(t,e,n,i,o,r){var a,s=!0,l=N(r,3)-N(o,3);return l&&(C(l)%360===0&&(o=0,r=360,a=!0,r-=.01),o>360&&(o%=360),r>360&&(r%=360),o>r&&(o-=360),s=!1),o*=k,r*=k,[t,e,v(i,n),_(i,n),x(o),w(o),x(r),w(r),a,y(C(r-o)/S)%2?"1":"0",s]}(e,n,i,o,r,a))),X(this,t)},animate:function(t,e,n){var i=this._settings,o={from:{},to:{}};return this.renderer.animationEnabled()&&("x"in t||"y"in t||"innerRadius"in t||"outerRadius"in t||"startAngle"in t||"endAngle"in t)&&(o.from.x=i.x||0,o.from.y=i.y||0,o.from.innerRadius=i.innerRadius||0,o.from.outerRadius=i.outerRadius||0,o.from.startAngle=i.startAngle||0,o.from.endAngle=i.endAngle||0,o.to.x="x"in t?t.x:i.x,delete t.x,o.to.y="y"in t?t.y:i.y,delete t.y,o.to.innerRadius="innerRadius"in t?t.innerRadius:i.innerRadius,delete t.innerRadius,o.to.outerRadius="outerRadius"in t?t.outerRadius:i.outerRadius,delete t.outerRadius,o.to.startAngle="startAngle"in t?t.startAngle:i.startAngle,delete t.startAngle,o.to.endAngle="endAngle"in t?t.endAngle:i.endAngle,delete t.endAngle,t.arc=o),pt(this,t,e,n)}}),e.RectSvgElement=bt,bt.prototype=E(gt.prototype),B(bt.prototype,{constructor:bt,attr:function(t){var e,n,i,o,r,a,s;return D(t)&&(void 0===(t=B({},t)).x&&void 0===t.y&&void 0===t.width&&void 0===t.height&&void 0===t["stroke-width"]||(e=void 0!==t.x?this._originalX=t.x:this._originalX||0,n=void 0!==t.y?this._originalY=t.y:this._originalY||0,i=void 0!==t.width?this._originalWidth=t.width:this._originalWidth||0,o=void 0!==t.height?this._originalHeight=t.height:this._originalHeight||0,s=((r=void 0!==t["stroke-width"]?this._originalSW=t["stroke-width"]:this._originalSW)||0)<(a=~~((i/i.test(e)&&-1===e.indexOf("&")?/\n/g.test(e)?i=function(t){for(var e=t.replace(/\r/g,"").split(/\n/g),n=0,i=[];n|\/>)/gi,(function(t,n,i,o){return n+(i=(i&&i.match(e)||[]).map((function(t){return t})).join(" "))+o}))}(e),i=function(t){var e=[],n=o.default.createElement("div");return n.innerHTML=t.replace(/\r/g,"").replace(/\n/g,"
"),function t(e,n,i,r,a){var s,l,u,c,d;if(void 0!==i.wholeText)e.push({value:i.wholeText,style:r,className:a,line:n,height:r["font-size"]||0});else if("BR"===i.tagName)++n;else if(o.default.isElementNode(i)){switch(B(s={},r),i.tagName){case"B":case"STRONG":s["font-weight"]="bold";break;case"I":case"EM":s["font-style"]="italic";break;case"U":s["text-decoration"]="underline"}for((l=i.style).color&&(s.fill=l.color),l.fontSize&&(s["font-size"]=l.fontSize),l.fontStyle&&(s["font-style"]=l.fontStyle),l.fontWeight&&(s["font-weight"]=l.fontWeight),l.textDecoration&&(s["text-decoration"]=l.textDecoration),u=0,d=i.childNodes,c=d.length;ut)for(t-c<0?t=0:t-=c,e=function(t,e,n){var i,o,r,a,s,l=[];if(e)for(i=0,o=e.length;it&&ut(s);return u.remove(),this._hasEllipsis=l,l},setMaxSize:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,o=[],r=!1,a=!1,s=t;Q.call(i);var l=et(this.element),u=i.renderer.text("...").attr(i._styles).append(i.renderer.root),c=u.getBBox().width,d=i._getElementBBox(),h=d.width,f=d.height;return(h||f)&&(h>t||e&&f>e)&&(t-c<0?s=0:s-=c,o=at(o=st(i.element,i._texts,t,s,n),s,n,e,parseFloat(this._getLineHeight())),this._texts=o.reduce((function(t,e){return t.concat(e.parts)}),[]).filter((function(t){return""!==t.value})).map((function(t){return t.stroke&&t.tspan.parentNode.appendChild(t.stroke),t})).map((function(t){return t.tspan.parentNode.appendChild(t.tspan),t})),!this._texts.length&&(this._texts=null),r=!0,this._texts?ht(this):(this.element.textContent="",a=!0)),u.remove(),i._hasEllipsis=r,l(),{rowCount:o.length,textChanged:r,textIsEmpty:a}},restoreText:Q,_getLineHeight:function(){return isNaN(parseFloat(this._styles["font-size"]))?12:this._styles["font-size"]}}),e.Renderer=St,St.prototype={constructor:St,_init:function(){this._defs=this._createElement("defs").append(this.root),this._animationController=new c.default.AnimationController(this.root.element),this._animation={enabled:!0,duration:1e3,easing:"easeOutCubic"}},fixPlacement:function(){if(l.default.mozilla||l.default.msie){var t=function(t){var e;try{e=t.getBoundingClientRect()}catch(n){}return e||{left:0,top:0}}(this._$container.get(0)),e=N(t.left%1,2),n=N(t.top%1,2);l.default.msie?this.root.css({transform:"translate("+-e+"px,"+-n+"px)"}):l.default.mozilla&&this.root.move(-e,-n)}},removePlacementFix:function(){(l.default.mozilla||l.default.msie)&&(l.default.msie?this.root.css({transform:""}):l.default.mozilla&&this.root.attr({transform:null}))},setOptions:function(t){return this.rtl=!!t.rtl,this.encodeHtml=!!t.encodeHtml,this.updateAnimationOptions(t.animation||{}),this.root.attr({direction:this.rtl?"rtl":"ltr"}),this},_createElement:function(t,n,i){var o=new e.SvgElement(this,t,i);return n&&o.attr(n),o},lock:function(){var t;return 0===this._locker&&(this._backed=!this._$container.is(":visible"),this._backed&&(t=this.root,0===M().backupCounter&&o.default.getBody().appendChild(M().backupContainer),++M().backupCounter,t.append({element:M().backupContainer}))),++this._locker,this},unlock:function(){var t,e;return--this._locker,0===this._locker&&(this._backed&&(t=this.root,e=this._$container[0],t.append({element:e}),--M().backupCounter,0===M().backupCounter&&o.default.getBody().removeChild(M().backupContainer),this.fixPlacement()),this._backed=!1),this},resize:function(t,e){return t>=0&&e>=0&&this.root.attr({width:t,height:e}),this},dispose:function(){var t;for(t in this.root.dispose(),this._defs.dispose(),this._animationController.dispose(),kt.removeByRenderer(this),this)this[t]=null;return this},animationEnabled:function(){return!!this._animation.enabled},updateAnimationOptions:function(t){return B(this._animation,t),this},stopAllAnimations:function(t){return this._animationController[t?"lock":"stop"](),this},animateElement:function(t,e,n){return this._animationController.animateElement(t,e,n),this},svg:function(){this.removePlacementFix();var t=this.root.markup();return this.fixPlacement(),t},getRootOffset:function(){return this.root.getOffset()},onEndAnimation:function(t){this._animationController.onEndAnimation(t)},rect:function(t,n,i,o){return new e.RectSvgElement(this).attr({x:t||0,y:n||0,width:i||0,height:o||0})},simpleRect:function(){return this._createElement("rect")},circle:function(t,e,n){return this._createElement("circle",{cx:t||0,cy:e||0,r:n||0})},g:function(){return this._createElement("g")},image:function(t,e,n,i,o,r){var a=this._createElement("image",{x:t||0,y:e||0,width:n||0,height:i||0,preserveAspectRatio:L[(0,d.normalizeEnum)(r)]||T});return a.element.setAttributeNS("http://www.w3.org/1999/xlink","href",o||""),a},path:function(t,n){return new e.PathSvgElement(this,n).attr({points:t||[]})},arc:function(t,n,i,o,r,a){return new e.ArcSvgElement(this).attr({x:t||0,y:n||0,innerRadius:i||0,outerRadius:o||0,startAngle:r||0,endAngle:a||0})},text:function(t,n,i){return new e.TextSvgElement(this).attr({text:t,x:n||0,y:i||0})},linearGradient:function(t){var e=P(),n=this,i=n._createElement("linearGradient",{id:e}).append(n._defs);return i.id=e,t.forEach((function(t){n._createElement("stop",{offset:t.offset,"stop-color":t["stop-color"]}).append(i)})),i},pattern:function(t,n,i){var o=(n=n||{}).step||6,r=o/2,a=1.5*o,s=i||P(),l="right"===(0,d.normalizeEnum)(n.direction)?"M "+r+" "+-r+" L "+-r+" "+r+" M 0 "+o+" L "+o+" 0 M "+a+" "+r+" L "+r+" "+a:"M 0 0 L "+o+" "+o+" M "+-r+" "+r+" L "+r+" "+a+" M "+r+" "+-r+" L "+a+" "+r,u=this._createElement("pattern",{id:s,width:o,height:o,patternUnits:"userSpaceOnUse"}).append(this._defs);return u.id=s,this.rect(0,0,o,o).attr({fill:t,opacity:n.opacity}).append(u),new e.PathSvgElement(this).attr({d:l,"stroke-width":n.width||1,stroke:t}).append(u),u},_getPointsWithYOffset:function(t,e){return t.map((function(t,n){return n%2!==0?t+e:t}))},clipShape:function(t,e){var n=P(),i=this._createElement("clipPath",{id:n}).append(this._defs),o=t.apply(this,e).append(i);return o.id=n,o.remove=function(){throw"Not implemented"},o.dispose=function(){return i.dispose(),i=null,this},o},clipRect:function(t,e,n,i){return this.clipShape(this.rect,arguments)},clipCircle:function(t,e,n){return this.clipShape(this.circle,arguments)},shadowFilter:function(t,e,n,i,o,r,a,s,l){var u=P(),c=this._createElement("filter",{id:u,x:t||0,y:e||0,width:n||0,height:i||0}).append(this._defs),d=this._createElement("feGaussianBlur",{in:"SourceGraphic",result:"gaussianBlurResult",stdDeviation:a||0}).append(c),h=this._createElement("feOffset",{in:"gaussianBlurResult",result:"offsetResult",dx:o||0,dy:r||0}).append(c),f=this._createElement("feFlood",{result:"floodResult","flood-color":s||"","flood-opacity":l}).append(c),p=this._createElement("feComposite",{in:"floodResult",in2:"offsetResult",operator:"in",result:"compositeResult"}).append(c),m=this._createElement("feComposite",{in:"SourceGraphic",in2:"compositeResult",operator:"over"}).append(c);return c.id=u,c.gaussianBlur=d,c.offset=h,c.flood=f,c.composite=p,c.finalComposite=m,c.attr=function(t){var e={},n={},i={};return"x"in t&&(e.x=t.x),"y"in t&&(e.y=t.y),"width"in t&&(e.width=t.width),"height"in t&&(e.height=t.height),X(this,e),"blur"in t&&this.gaussianBlur.attr({stdDeviation:t.blur}),"offsetX"in t&&(n.dx=t.offsetX),"offsetY"in t&&(n.dy=t.offsetY),this.offset.attr(n),"color"in t&&(i["flood-color"]=t.color),"opacity"in t&&(i["flood-opacity"]=t.opacity),this.flood.attr(i),this},c},brightFilter:function(t,e){var n=P(),i=this._createElement("filter",{id:n}).append(this._defs),o=this._createElement("feComponentTransfer").append(i),r={type:t,slope:e};return i.id=n,this._createElement("feFuncR",r).append(o),this._createElement("feFuncG",r).append(o),this._createElement("feFuncB",r).append(o),i},getGrayScaleFilter:function(){if(this._grayScaleFilter)return this._grayScaleFilter;var t=P(),e=this._createElement("filter",{id:t}).append(this._defs);return this._createElement("feColorMatrix").attr({type:"matrix",values:"0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 0.6 0"}).append(e),e.id=t,this._grayScaleFilter=e,e},initHatching:function(){var t,e=this._hatchingStorage=this._hatchingStorage||{byHash:{},baseId:P()},n=e.byHash;for(t in n)n[t].pattern.dispose();e.byHash={},e.refToHash={},e.nextId=0},lockHatching:function(t,e,n){var i,o,r=this._hatchingStorage,a=function(t,e){return"@"+t+"::"+e.step+":"+e.width+":"+e.opacity+":"+e.direction}(t,e);return r.refToHash[n]!==a&&(n&&this.releaseHatching(n),(i=r.byHash[a])||(o=this.pattern(t,e,r.baseId+"-hatching-"+r.nextId++),i=r.byHash[a]={pattern:o,count:0},r.refToHash[o.id]=a),++i.count,n=i.pattern.id),n},releaseHatching:function(t){var e=this._hatchingStorage,n=e.refToHash[t],i=e.byHash[n];i&&0===--i.count&&(i.pattern.dispose(),delete e.byHash[n],delete e.refToHash[t])}};var kt=function(){var t=[];return{add:function(e){t.push(e)},remove:function(e){t=t.filter((function(t){return t!==e}))},removeByRenderer:function(e){t=t.filter((function(t){return t.renderer!==e}))},fire:function(){t.forEach((function(t){t()}))}}}();e.refreshPaths=function(){kt.fire()}},function(t,e,n){"use strict";var i=n(15),o=n(10).getWindow(),r=n(3);e.getSvgMarkup=function(t,e){return function(t){var e=!0;return-1===t.indexOf("xmlns:xlink")&&(t=t.replace("0&&!s(t[e-1])&&("."===t[e-1]||a.indexOf(t[e-1])<0);)e--;return e},c=function(t,e){return Array.isArray(t)?t.map((function(t){return(e(t)||"").toString()})):(e(t)||"").toString()},d=/[a-zA-Z]/g;e.getFormat=function(t){var e=[],n=c(new Date(2009,8,8,6,5,4),t),i=n.split("").map((function(t,e){return e})),o=n,r={},a=[{date:new Date(2009,8,8,6,5,4,100),pattern:"S"},{date:new Date(2009,8,8,6,5,2),pattern:"s"},{date:new Date(2009,8,8,6,2,4),pattern:"m"},{date:new Date(2009,8,8,18,5,4),pattern:"H",isDigit:!0},{date:new Date(2009,8,8,2,5,4),pattern:"h",isDigit:!0},{date:new Date(2009,8,8,18,5,4),pattern:"a",isDigit:!1},{date:new Date(2009,8,1,6,5,4),pattern:"d"},{date:[new Date(2009,8,2,6,5,4),new Date(2009,8,3,6,5,4),new Date(2009,8,4,6,5,4)],pattern:"E"},{date:new Date(2009,9,6,6,5,4),pattern:"M"},{date:new Date(1998,8,8,6,5,4),pattern:"y"}];if(o)return a.forEach((function(a){var d=function(t,e,n,i){var o=0,r=[],a=function(e){return t[o]!==e[o]&&(void 0===i||s(t[o])===i)};for(Array.isArray(e)||(e=[e]),o=0;ol;){for(a=i[r=e.pop()],i[r]=-1,o=r+1;o1?n[i]:n)+t.substr(r+i+1)})),1===e.length&&(t=(t=t.replace("0"+n,n+n)).replace("\u0660"+n,n+n)),t}(t,e,n,i)}(o,d,h,i),r[h]=d.length})),o=function(t,e,n,i){var o=e.split("").map((function(t,e){return n.indexOf(e)<0&&(t.match(d)||"'"===t)?i[e]:-1}));return t=t.split("").map((function(t,e){var n=t,i=o.indexOf(e)>=0,r=e>0&&o.indexOf(e-1)>=0,a=o.indexOf(e+1)>=0;return i&&(r||(n="'"+n),a||(n+="'")),n})).join("")}(o,n,e,i),e.length?o:void 0}},function(t,e,n){"use strict";var i=n(4).escapeRegExp,o={3:"abbreviated",4:"wide",5:"narrow"},r=function(t,e){return t>2?Object.keys(o).map((function(t){return["format","standalone"].map((function(n){return e.getMonthNames(o[t],n).join("|")})).join("|")})).join("|"):"0?[1-9]|1[012]"},a={y:function(t){return"[0-9]+"},M:r,L:r,Q:function(t,e){return t>2?e.getQuarterNames(o[t],"format").join("|"):"0?[1-4]"},E:function(t,e){return"\\D*"},a:function(t,e){return e.getPeriodNames(o[t<3?3:t],"format").join("|")},d:function(t){return"0?[1-9]|[12][0-9]|3[01]"},H:function(t){return"0?[0-9]|1[0-9]|2[0-3]"},h:function(t){return"0?[1-9]|1[012]"},m:function(t){return"0?[0-9]|[1-5][0-9]"},s:function(t){return"0?[0-9]|[1-5][0-9]"},S:function(t){return"[0-9]{1,"+t+"}"}},s=Number,l=function(t,e){return t.map((function(t){return t.toLowerCase()})).indexOf(e.toLowerCase())},u=function(t,e,n){return e>2?["format","standalone"].map((function(e){return Object.keys(o).map((function(i){var r=n.getMonthNames(o[i],e);return l(r,t)}))})).reduce((function(t,e){return t.concat(e)})).filter((function(t){return t>=0}))[0]:s(t)-1},c={y:function(t,e){var n=s(t);return 2===e?n<30?2e3+n:1900+n:n},M:u,L:u,Q:function(t,e,n){return e>2?n.getQuarterNames(o[e],"format").indexOf(t):s(t)-1},E:function(t,e,n){var i=n.getDayNames(o[e<3?3:e],"format");return l(i,t)},a:function(t,e,n){var i=n.getPeriodNames(o[e<3?3:e],"format");return l(i,t)},d:s,H:s,h:s,m:s,s:s,S:function(t,e){for(e=Math.max(e,3),t=t.slice(0,3);e<3;)t+="0",e++;return s(t)}},d=["y","M","d","h","m","s","S"],h={y:"setFullYear",M:"setMonth",L:"setMonth",a:function(t,e,n){var i=t.getHours(),o=n.h;void 0!==o&&o!==i&&i--,e||12!==i?e&&12!==i&&(i+=12):i=0,t.setHours(i)},d:"setDate",H:"setHours",h:"setHours",m:"setMinutes",s:"setSeconds",S:"setMilliseconds"},f=function(t,e){var n=t[e],i=0;do{e++,i++}while(t[e]===n);return i},p=function(t,e){for(var n="",i=0;is)){var f=a.indexOf(t);if(f>=0){var p=n.patterns[f],m=i[f+1];!function(t,e,n,i,o){var r=e[0],a=h[r],s=c[r];if(a&&s){var l=s(n,e.length,i);o[e]=l,t[a]?t[a](l):a(t,l,o)}}(r,p,m,e,u)}else!function(t,e,n){var i=h[e],o=n["g"+i.substr(1)]();t[i](o)}(r,t,o)}})),r}return null}},e.getRegExpInfo=m,e.getPatternSetters=function(){return h}},function(t,e,n){"use strict";var i=n(224).fileSaver,o=n(711),r=n(395),a=n(720),s=n(2).isFunction,l=n(7).Deferred;e.export=function(t,e,n){if(!t)return(new l).resolve();var o=e.exportingAction,r=e.exportedAction,a=e.fileSavingAction,u={fileName:e.fileName,format:e.format,cancel:!1};return s(o)&&o(u),u.cancel?(new l).resolve():n(t,e).then((function(t){s(r)&&r(),s(a)&&(u.data=t,a(u)),u.cancel||i.saveAs(u.fileName,e.format,t,e.proxyUrl,e.forceProxy)}))},e.fileSaver=i,e.excel={creator:o.ExcelCreator,getData:o.getData,formatConverter:n(390)},e.image={creator:r.imageCreator,getData:r.getData,testFormats:r.testFormats},e.pdf={getData:n(721).getData},e.svg={creator:a.svgCreator,getData:a.getData}},function(t,e,n){"use strict";var i=n(4).noop,o=Math.round,r=n(54),a={horizontal:0,vertical:0},s={center:.5,right:1,bottom:1,left:0,top:0};function l(t){this._options=t}function u(t,e){this._renderElement=t,this._cacheBBox=e}l.prototype={constructor:l,position:function(t){var e=t.of.getLayoutOptions(),n=this.getLayoutOptions(),i=t.at,r=t.my,l=t.offset||a,u=-s[r.horizontal]*n.width+e.x+s[i.horizontal]*e.width+parseInt(l.horizontal),c=-s[r.vertical]*n.height+e.y+s[i.vertical]*e.height+parseInt(l.vertical);this.shift(o(u),o(c))},getLayoutOptions:i};var c=u.prototype=r.clone(l.prototype);c.constructor=u,c.getLayoutOptions=function(){return this._cacheBBox||this._renderElement.getBBox()},c.shift=function(t,e){var n=this.getLayoutOptions();this._renderElement.move(o(t-n.x),o(e-n.y))},e.LayoutElement=l,e.WrapperLayoutElement=u},function(t,e,n){"use strict";var i=n(13);t.exports={logarithmic:"logarithmic",discrete:"discrete",numeric:"numeric",left:"left",right:"right",top:"top",bottom:"bottom",center:"center",horizontal:"horizontal",vertical:"vertical",convertTicksToValues:function(t){return(0,i.map)(t||[],(function(t){return t.value}))},validateOverlappingMode:function(t){return"ignore"===t||"none"===t?t:"hide"},getTicksCountInRange:function(t,e,n){var i=1;if(t.length>1)for(;i=n);i++);return i},areLabelsOverlap:function(t,e,n,i){var o=t.x>e.x,r=t.y>e.y,a=t.x,s=e.x,l=t.width,u=e.width;"left"===i?(a+=l/2,s+=u/2):"right"===i&&(a-=l/2,s-=u/2);var c=o?s+u+n>a:a+l+n>s,d=r?e.y+e.height>t.y:t.y+t.height>e.y;return c&&d}}},function(t,e,n){"use strict";var i=n(4).noop,o=n(67),r=n(2).isDefined,a={string:function(t){return r(t)?""+t:t},numeric:function(t){if(!r(t))return t;var e=Number(t);return isNaN(e)&&(e=void 0),e},datetime:function(t){if(!r(t))return t;var e,n=Number(t);return e=isNaN(n)?o.deserializeDate(t):new Date(n),isNaN(Number(e))&&(e=void 0),e}};function s(t){return"numeric"===t||"datetime"===t||"string"===t?t:""}t.exports={correctValueType:s,getParser:function(t){return a[s(t)]||i}}},function(t,e,n){"use strict";var i=n(0),o=n(5),r=n(123),a=p(n(722)),s=p(n(723)),l=p(n(724)),u=p(n(725)),c=n(13),d=n(2),h=n(37),f=n(26);function p(t){return t&&t.__esModule?t:{default:t}}var m,g=Math.abs,_=["width","height","left","top","bottom","right"],v={to:function(t){var e=this._canvasOptions.startPoint+(this._options.conversionValue?t:Math.round(t));return e>this._canvasOptions.endPoint?this._canvasOptions.endPoint:e},from:function(t){return t-this._canvasOptions.startPoint}},y=function(t){return(0,o.each)(_,(function(e,n){t[n]=parseInt(t[n])||0})),t};function b(t){return{isStartSide:t?function(t,e,n,i){return t<=e[e.length-1][i]}:function(t,e,n,i){return te[0][n]}:function(t,e,n,i){return t>=e[e.length-1][i]},isInBreak:t?function(t,e,n,i){return t>e[i]&&t<=e[n]}:function(t,e,n,i){return t>=e[n]&&t=e[o]&&t=n[o]},getLength:t?function(t,e){return e.length-t.length}:function(t){return t.length},getBreaksSize:t?function(t,e){return e.cumulativeWidth-t.cumulativeWidth}:function(t){return t.cumulativeWidth}}}e.Translator2D=m=function(t,e,n){this.update(t,e,n)},m.prototype={constructor:m,reinit:function(){var t=this,e=t._options,n=t._businessRange,o=n.categories||[],r={},d=t._prepareCanvasOptions(),h=(0,c.getCategoriesInfo)(o,n.minVisible,n.maxVisible).categories,p=h.length;if(n.isEmpty())r=v;else switch(n.axisType){case"logarithmic":r=u.default;break;case"semidiscrete":r=s.default,d.ratioOfCanvasRange=d.canvasLength/((0,f.addInterval)(d.rangeMaxVisible,e.interval)-d.rangeMinVisible);break;case"discrete":r=a.default,t._categories=o,d.interval=t._getDiscreteInterval(e.addSpiderCategory?p+1:p,d),t._categoriesToPoints=function(t){var e={};return t.forEach((function(t,n){e[t.valueOf()]=n})),e}(o,d.invert),p&&(d.startPointIndex=t._categoriesToPoints[h[0].valueOf()],t.visibleCategories=h);break;default:"datetime"===n.dataType&&(r=l.default)}(t._oldMethods||[]).forEach((function(e){delete t[e]})),t._oldMethods=Object.keys(r),(0,i.extend)(t,r),t._conversionValue=e.conversionValue?function(t){return t}:function(t){return Math.round(t)},t.sc={},t._checkingMethodsAboutBreaks=[b(!1),b(t.isInverted())],t._translateBreaks(),t._calculateSpecialValues()},_translateBreaks:function(){var t,e,n,i,o=this._breaks,r=this._options.breaksSize;if(void 0!==o)for(t=0,i=o.length;t0?e.canvasLength/n:e.canvasLength},_prepareCanvasOptions:function(){var t,e=this._businessRange,n=this._canvasOptions=function(t){var e=t.min,n=t.max,i=t.minVisible,o=t.maxVisible;return"logarithmic"===t.axisType&&(o=(0,c.getLogExt)(o,t.base,t.allowNegatives,t.linearThreshold),i=(0,c.getLogExt)(i,t.base,t.allowNegatives,t.linearThreshold),e=(0,c.getLogExt)(e,t.base,t.allowNegatives,t.linearThreshold),n=(0,c.getLogExt)(n,t.base,t.allowNegatives,t.linearThreshold)),{base:t.base,rangeMin:e,rangeMax:n,rangeMinVisible:i,rangeMaxVisible:o}}(e),i=this._canvas,o=this._breaks;return n.startPadding=i.startPadding||0,n.endPadding=i.endPadding||0,this._options.isHorizontal?(n.startPoint=i.left+n.startPadding,t=i.width,n.endPoint=i.width-i.right-n.endPadding,n.invert=e.invert):(n.startPoint=i.top+n.startPadding,t=i.height,n.endPoint=i.height-i.bottom-n.endPadding,n.invert=!e.invert),this.canvasLength=n.canvasLength=n.endPoint-n.startPoint,n.rangeDoubleError=Math.pow(10,(0,c.getPower)(n.rangeMax-n.rangeMin)-(0,c.getPower)(t)-2),n.ratioOfCanvasRange=n.canvasLength/(n.rangeMaxVisible-n.rangeMinVisible),void 0!==o&&(n.ratioOfCanvasRange=(n.canvasLength-o[o.length-1].cumulativeWidth)/(n.rangeMaxVisible-n.rangeMinVisible-o[o.length-1].length)),n},updateCanvas:function(t){this._canvas=y(t),this.reinit()},updateBusinessRange:function(t){var e=t.breaks||[];this._businessRange=function(t){function e(e,n){!(0,d.isDefined)(t[e])&&(0,d.isDefined)(t[n])&&(t[e]=t[n])}return t instanceof r.Range||(t=new r.Range(t)),e("minVisible","min"),e("maxVisible","max"),t}(t),this._breaks=e.length?function(t,e){var n,i,o,r,a="logarithmic"===e.axisType?function(t){return(0,c.getLogExt)(t,e.base)}:function(t){return t},s=[],l=t.length,u=0;for(r=0;r0&&r!==a&&(t=this.translate(0,1)),!(0,d.isDefined)(t)){var l=o.invert^(r<0&&a<=0);t=this._options.isHorizontal?l?i:n:l?n:i}this.sc={canvas_position_default:t,canvas_position_left:n,canvas_position_top:n,canvas_position_center:s,canvas_position_middle:s,canvas_position_right:i,canvas_position_bottom:i,canvas_position_start:e.invert?i:n,canvas_position_end:e.invert?n:i}},translateSpecialCase:function(t){return this.sc[t]},_calculateProjection:function(t){var e=this._canvasOptions;return e.invert?e.endPoint-t:e.startPoint+t},_calculateUnProjection:function(t){var e=this._canvasOptions;return e.invert?e.rangeMaxVisible.valueOf()-t:e.rangeMinVisible.valueOf()+t},getMinBarSize:function(t){var e=this.getCanvasVisibleArea(),n=this.from(e.min+t);return g(this.from(e.min)-((0,d.isDefined)(n)?n:this.from(e.max)))},checkMinBarSize:function(t,e,n){return g(t)=0?e:-e:t},translate:function(t,e){var n=this.translateSpecialCase(t);return(0,d.isDefined)(n)?Math.round(n):isNaN(t)?null:this.to(t,e)},getInterval:function(t){var e,n=this._canvasOptions;return(t=null!==(e=t)&&void 0!==e?e:this._businessRange.interval)?Math.round(n.ratioOfCanvasRange*t):Math.round(n.endPoint-n.startPoint)},zoom:function(t,e,n){var i=this._canvasOptions;if(i.rangeMinVisible.valueOf()===i.rangeMaxVisible.valueOf()&&0!==t)return this.zoomZeroLengthRange(t,e);var o=i.startPoint,r=i.endPoint,a=this.isInverted(),s=(o+t)/e,l=(r+t)/e;n=n||{};var u,c,f=this.to(a?n.endValue:n.startValue),p=this.to(a?n.startValue:n.endValue);return f>s&&(l-=s-f,s=f,u=a?n.endValue:n.startValue),p(c=(0,d.isDefined)(c)?c:(0,h.adjust)(this.from(l,-1)))?(u=u>n.endValue?n.endValue:u,c=cn.endValue?n.endValue:c),{min:u,max:c,translate:(0,h.adjust)(t),scale:(0,h.adjust)(e)}},zoomZeroLengthRange:function(t,e){var n=this._canvasOptions,i=n.rangeMin,o=n.rangeMax,r=(o.valueOf()!==i.valueOf()?o.valueOf()-i.valueOf():g(n.rangeMinVisible.valueOf()-i.valueOf()))/n.canvasLength,a=(0,d.isDate)(o)||(0,d.isDate)(i),s="logarithmic"===this._businessRange.axisType,l=n.rangeMinVisible.valueOf()-r,u=n.rangeMaxVisible.valueOf()+r;return{min:l=s?(0,h.adjust)((0,c.raiseToExt)(l,n.base)):a?new Date(l):l,max:u=s?(0,h.adjust)((0,c.raiseToExt)(u,n.base)):a?new Date(u):u,translate:t,scale:e}},getMinScale:function(t){return t?1.1:.9},getScale:function(t,e){var n=this._canvasOptions;return n.rangeMax===n.rangeMin?1:(t=(0,d.isDefined)(t)?this._fromValue(t):n.rangeMin,e=(0,d.isDefined)(e)?this._fromValue(e):n.rangeMax,(n.rangeMax-n.rangeMin)/Math.abs(t-e))},isValid:function(t){var e=this._canvasOptions;return null!==(t=this._fromValue(t))&&!isNaN(t)&&t.valueOf()+e.rangeDoubleError>=e.rangeMin&&t.valueOf()-e.rangeDoubleError<=e.rangeMax},getCorrectValue:function(t,e){var n,i=this._breaks;return t=this._fromValue(t),this._breaks&&!0===(n=this._checkValueAboutBreaks(i,t,"trFrom","trTo",this._checkingMethodsAboutBreaks[0])).inBreak?this._toValue(e>0?n.break.trTo:n.break.trFrom):this._toValue(t)},to:function(t,e){var n=this.getBusinessRange();if((0,d.isDefined)(n.maxVisible)&&(0,d.isDefined)(n.minVisible)&&n.maxVisible.valueOf()===n.minVisible.valueOf())return(0,d.isDefined)(t)&&n.maxVisible.valueOf()===t.valueOf()?this.translateSpecialCase(0===t&&this._options.shiftZeroValue?"canvas_position_default":"canvas_position_middle"):null;t=this._fromValue(t);var i=this._canvasOptions,o=this._breaks,r={length:0},a=0;return void 0!==o&&(r=this._checkValueAboutBreaks(o,t,"trFrom","trTo",this._checkingMethodsAboutBreaks[0]),a=(0,d.isDefined)(r.breaksSize)?r.breaksSize:0),!0===r.inBreak?e>0?r.break.start:e<0?r.break.end:null:this._conversionValue(this._calculateProjection((t-i.rangeMinVisible-r.length)*i.ratioOfCanvasRange+a))},from:function(t,e){var n=this._breaks,i={length:0},o=this._canvasOptions,r=o.startPoint,a=0;return void 0!==n&&(i=this._checkValueAboutBreaks(n,t,"start","end",this._checkingMethodsAboutBreaks[1]),a=(0,d.isDefined)(i.breaksSize)?i.breaksSize:0),!0===i.inBreak?e>0?this._toValue(i.break.trTo):e<0?this._toValue(i.break.trFrom):null:this._toValue(this._calculateUnProjection((t-r-a)/o.ratioOfCanvasRange+i.length))},isValueProlonged:!1,getRange:function(){return[this._toValue(this._canvasOptions.rangeMin),this._toValue(this._canvasOptions.rangeMax)]},getScreenRange:function(){return[this._canvasOptions.startPoint,this._canvasOptions.endPoint]},add:function(t,e,n){return this._add(t,e,(this._businessRange.invert?-1:1)*n)},_add:function(t,e,n){return this._toValue(this._fromValue(t)+e*n)},_fromValue:function(t){return null!==t?Number(t):null},_toValue:function(t){return null!==t?Number(t):null},ratioOfCanvasRange:function(){return this._canvasOptions.ratioOfCanvasRange}}},function(t,e,n){"use strict";var i=n(4).noop,o=n(5).each,r=isFinite,a=Number,s=Math.round,l=n(162),u=l.formatValue,c=l.getSampleText,d=n(13).patchFontOptions,h=n(0).extend,f=n(21).inherit({ctor:function(t){var e=this;o(t,(function(t,n){e["_"+t]=n})),e._init()},dispose:function(){var t=this;return t._dispose(),o(t,(function(e){t[e]=null})),t},getOffset:function(){return a(this._options.offset)||0}}),p=f.inherit({_init:function(){this._rootElement=this._createRoot().linkOn(this._owner,{name:"value-indicator",after:"core"}),this._trackerElement=this._createTracker()},_dispose:function(){this._rootElement.linkOff()},_setupAnimation:function(){var t=this;t._options.animation&&(t._animation={step:function(e){t._actualValue=t._animation.start+t._animation.delta*e,t._actualPosition=t._translator.translate(t._actualValue),t._move()},duration:t._options.animation.duration>0?a(t._options.animation.duration):0,easing:t._options.animation.easing})},_runAnimation:function(t){var e=this._animation;e.start=this._actualValue,e.delta=t-this._actualValue,this._rootElement.animate({_:0},{step:e.step,duration:e.duration,easing:e.easing})},_createRoot:function(){return this._renderer.g().attr({class:this._className})},_createTracker:function(){return this._renderer.path([],"area")},_getTrackerSettings:i,clean:function(){return this._animation&&this._rootElement.stopAnimation(),this._rootElement.linkRemove().clear(),this._clear(),this._tracker.detach(this._trackerElement),this._options=this.enabled=this._animation=null,this},render:function(t){return this.type=t.type,this._options=t,this._actualValue=this._currentValue=this._translator.adjust(this._options.currentValue),this.enabled=this._isEnabled(),this.enabled&&(this._setupAnimation(),this._rootElement.attr({fill:this._options.color}).linkAppend(),this._tracker.attach(this._trackerElement,this,this._trackerInfo)),this},resize:function(t){return this._rootElement.clear(),this._clear(),this.visible=this._isVisible(t),this.visible&&(h(this._options,t),this._actualPosition=this._translator.translate(this._actualValue),this._render(),this._trackerElement.attr(this._getTrackerSettings()),this._move()),this},value:function(t,e){var n,i=this._rootElement,o=null;return void 0===t?this._currentValue:(null===t?(o="hidden",this._currentValue=t):(n=this._translator.adjust(t),this._currentValue!==n&&r(n)&&(this._currentValue=n,this.visible&&(this._animation&&!e?this._runAnimation(n):(this._actualValue=n,this._actualPosition=this._translator.translate(n),this._move())))),i.attr({visibility:o}),this)},_isEnabled:null,_isVisible:null,_render:null,_clear:null,_move:null}),m={};m["right-bottom"]=m.rb=[0,-1,-1,0,0,1,1,0],m["bottom-right"]=m.br=[-1,0,0,-1,1,0,0,1],m["left-bottom"]=m.lb=[0,-1,1,0,0,1,-1,0],m["bottom-left"]=m.bl=[1,0,0,-1,-1,0,0,1],m["left-top"]=m.lt=[0,1,1,0,0,-1,-1,0],m["top-left"]=m.tl=[1,0,0,1,-1,0,0,-1],m["right-top"]=m.rt=[0,1,-1,0,0,-1,1,0],m["top-right"]=m.tr=[-1,0,0,1,1,0,0,-1];var g=p.inherit({_move:function(){var t=this._getTextCloudOptions(),e=u(this._actualValue,this._options.text);this._text.attr({text:e});var n=this._text.getBBox(),i=function(t){var e,n,i=t.x,o=t.y,r=m[t.type],a=t.textWidth+2*t.horMargin,l=t.textHeight+2*t.verMargin,u=i,c=o;return e=n=t.tailLength,1&r[0]?n=Math.min(n,l/3):e=Math.min(e,a/3),{cx:s(u+r[0]*e+(r[0]+r[2])*a/2),cy:s(c+r[1]*n+(r[1]+r[3])*l/2),points:[s(i),s(o),s(i+=r[0]*(a+e)),s(o+=r[1]*(l+n)),s(i+=r[2]*a),s(o+=r[3]*l),s(i+=r[4]*a),s(o+=r[5]*l),s(i+=r[6]*(a-e)),s(o+=r[7]*(l-n))]}}({x:t.x,y:t.y,textWidth:n.width||e.length*this._textUnitWidth,textHeight:n.height||this._textHeight,horMargin:this._options.horizontalOffset,verMargin:this._options.verticalOffset,tailLength:this._options.arrowLength,type:t.type});this._text.attr({x:i.cx,y:i.cy+this._textVerticalOffset}),this._cloud.attr({points:i.points}),this._trackerElement&&this._trackerElement.attr({points:i.points})},_measureText:function(){var t,e,n;this._textVerticalOffset||(t=this._createRoot().append(this._owner),n=c(this._translator,this._options.text),e=this._renderer.text(n,0,0).attr({align:"center"}).css(d(this._options.text.font)).append(t).getBBox(),t.remove(),this._textVerticalOffset=-e.y-e.height/2,this._textWidth=e.width,this._textHeight=e.height,this._textUnitWidth=this._textWidth/n.length,this._textFullWidth=this._textWidth+2*this._options.horizontalOffset,this._textFullHeight=this._textHeight+2*this._options.verticalOffset)},_render:function(){this._measureText(),this._cloud=this._cloud||this._renderer.path([],"area").append(this._rootElement),this._text=this._text||this._renderer.text().append(this._rootElement),this._text.attr({align:"center"}).css(d(this._options.text.font))},_clear:function(){delete this._cloud,delete this._text},getTooltipParameters:function(){var t=this._getTextCloudOptions();return{x:t.x,y:t.y,value:this._currentValue,color:this._options.color}}}),_=p.inherit({_measureText:function(){var t,e;this._hasText=this._isTextVisible(),this._hasText&&!this._textVerticalOffset&&(t=this._createRoot().append(this._owner),e=this._renderer.text(c(this._translator,this._options.text),0,0).attr({class:"dxg-text",align:"center"}).css(d(this._options.text.font)).append(t).getBBox(),t.remove(),this._textVerticalOffset=-e.y-e.height/2,this._textWidth=e.width,this._textHeight=e.height)},_move:function(){this._updateBarItemsPositions(),this._hasText&&(this._text.attr({text:u(this._actualValue,this._options.text)}),this._updateTextPosition(),this._updateLinePosition())},_updateBarItems:function(){var t,e=this._options,n=this._translator;this._setBarSides(),this._startPosition=n.translate(n.getDomainStart()),this._endPosition=n.translate(n.getDomainEnd()),this._basePosition=n.translate(e.baseValue),this._space=this._getSpace();var i=e.backgroundColor||"none";"none"!==i&&this._space>0?t=e.containerBackgroundColor||"none":(this._space=0,t="none"),this._backItem1.attr({fill:i}),this._backItem2.attr({fill:i}),this._spaceItem1.attr({fill:t}),this._spaceItem2.attr({fill:t})},_getSpace:function(){return 0},_updateTextItems:function(){this._hasText?(this._line=this._line||this._renderer.path([],"line").attr({class:"dxg-main-bar","stroke-linecap":"square"}).append(this._rootElement),this._text=this._text||this._renderer.text("",0,0).attr({class:"dxg-text"}).append(this._rootElement),this._text.attr({align:this._getTextAlign()}).css(this._getFontOptions()),this._setTextItemsSides()):(this._line&&(this._line.remove(),delete this._line),this._text&&(this._text.remove(),delete this._text))},_isTextVisible:function(){return!1},_getTextAlign:function(){return"center"},_getFontOptions:function(){var t=this._options,e=t.text.font;return e&&e.color||(e=h({},e,{color:t.color})),d(e)},_updateBarItemsPositions:function(){var t=this._getPositions();this._backItem1.attr(this._buildItemSettings(t.start,t.back1)),this._backItem2.attr(this._buildItemSettings(t.back2,t.end)),this._spaceItem1.attr(this._buildItemSettings(t.back1,t.main1)),this._spaceItem2.attr(this._buildItemSettings(t.main2,t.back2)),this._mainItem.attr(this._buildItemSettings(t.main1,t.main2)),this._trackerElement&&this._trackerElement.attr(this._buildItemSettings(t.main1,t.main2))},_render:function(){this._measureText(),this._backItem1||(this._backItem1=this._createBarItem(),this._backItem1.attr({class:"dxg-back-bar"})),this._backItem2||(this._backItem2=this._createBarItem(),this._backItem2.attr({class:"dxg-back-bar"})),this._spaceItem1||(this._spaceItem1=this._createBarItem(),this._spaceItem1.attr({class:"dxg-space-bar"})),this._spaceItem2||(this._spaceItem2=this._createBarItem(),this._spaceItem2.attr({class:"dxg-space-bar"})),this._mainItem||(this._mainItem=this._createBarItem(),this._mainItem.attr({class:"dxg-main-bar"})),this._updateBarItems(),this._updateTextItems()},_clear:function(){delete this._backItem1,delete this._backItem2,delete this._spaceItem1,delete this._spaceItem2,delete this._mainItem,delete this._hasText,delete this._line,delete this._text},getTooltipParameters:function(){var t=this._getTooltipPosition();return{x:t.x,y:t.y,value:this._currentValue,color:this._options.color,offset:0}}});e.BaseElement=f,e.BaseIndicator=p,e.BaseTextCloudMarker=g,e.BaseRangeBar=_},function(t,e,n){"use strict";var i=d(n(3)),o=d(n(20)),r=d(n(42)),a=d(n(69)),s=d(n(8)),l=n(0),u=n(2),c=n(73);function d(t){return t&&t.__esModule?t:{default:t}}var h=a.default.inherit({_initTemplates:function(){var t=this;this.callBase(),this._templateManager.addDefaultTemplates({item:new c.BindableTemplate((function(e,n,i){t._prepareItemStyles(e),t._createComponent(e,r.default,(0,l.extend)({},i,n,t._getBasicButtonOptions(),{_templateData:i,template:i.template||t.option("buttonTemplate")}))}),["text","type","icon","disabled","visible","hint"],this.option("integrationOptions.watchMethod"))})},_getBasicButtonOptions:function(){return{focusStateEnabled:!1,onClick:null,hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode")}},_getDefaultOptions:function(){return(0,l.extend)(this.callBase(),{itemTemplateProperty:null})},_prepareItemStyles:function(t){var e=t.data("dxItemIndex");0===e&&t.addClass("dx-buttongroup-first-item");var n=this.option("items");n&&e===n.length-1&&t.addClass("dx-buttongroup-last-item"),t.addClass("dx-shape-standard")},_renderItemContent:function(t){return t.container=(0,i.default)(t.container).parent(),this.callBase(t)},_renderItemContentByNode:function(t,e){return t.container=(0,i.default)(t.container.children().first()),this.callBase(t,e)},_focusTarget:function(){return this.$element().parent()},_keyboardEventBindingTarget:function(){return this._focusTarget()},_refreshContent:function(){this._prepareContent(),this._renderContent()},_itemClass:function(){return"dx-buttongroup-item"},_itemSelectHandler:function(t){"single"===this.option("selectionMode")&&this.isItemSelected(t.currentTarget)||this.callBase(t)}}),f=o.default.inherit({_getDefaultOptions:function(){return(0,l.extend)(this.callBase(),{hoverStateEnabled:!0,focusStateEnabled:!0,selectionMode:"single",selectedItems:[],selectedItemKeys:[],stylingMode:"contained",keyExpr:"text",items:[],buttonTemplate:"content",onSelectionChanged:null,onItemClick:null})},_setDeprecatedOptions:function(){this.callBase(),(0,l.extend)(this._deprecatedOptions,{itemTemplate:{since:"19.2",alias:"buttonTemplate"}})},_init:function(){this.callBase(),this._createItemClickAction()},_createItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initMarkup:function(){this.setAria("role","group"),this.$element().addClass("dx-buttongroup"),this._renderButtons(),this._syncSelectionOptions(),this.callBase()},_fireSelectionChangeEvent:function(t,e){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:t,removedItems:e})},_renderButtons:function(){var t=this,e=(0,i.default)("
").addClass("dx-buttongroup-wrapper").appendTo(this.$element()),n=this.option("selectedItems"),o={selectionMode:this.option("selectionMode"),items:this.option("items"),keyExpr:this.option("keyExpr"),buttonTemplate:this.option("buttonTemplate"),scrollingEnabled:!1,selectedItemKeys:this.option("selectedItemKeys"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode"),accessKey:this.option("accessKey"),tabIndex:this.option("tabIndex"),noDataText:"",selectionRequired:!1,onItemRendered:function(e){var n=t.option("width");(0,u.isDefined)(n)&&(0,i.default)(e.itemElement).addClass("dx-buttongroup-item-has-width")},onSelectionChanged:function(e){t._syncSelectionOptions(),t._fireSelectionChangeEvent(e.addedItems,e.removedItems)},onItemClick:function(e){t._itemClickAction(e)}};(0,u.isDefined)(n)&&n.length&&(o.selectedItems=n),this._buttonsCollection=this._createComponent(e,h,o)},_syncSelectionOptions:function(){this._setOptionWithoutOptionChange("selectedItems",this._buttonsCollection.option("selectedItems")),this._setOptionWithoutOptionChange("selectedItemKeys",this._buttonsCollection.option("selectedItemKeys"))},_optionChanged:function(t){switch(t.name){case"stylingMode":case"selectionMode":case"keyExpr":case"buttonTemplate":case"items":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":case"tabIndex":this._invalidate();break;case"selectedItemKeys":case"selectedItems":this._buttonsCollection.option(t.name,t.value);break;case"onItemClick":this._createItemClickAction();break;case"onSelectionChanged":break;case"width":this.callBase(t),this._buttonsCollection.itemElements().toggleClass("dx-buttongroup-item-has-width",!!t.value);break;default:this.callBase(t)}}});(0,s.default)("dxButtonGroup",f),t.exports=f,t.exports.default=t.exports},function(t,e,n){"use strict";t.exports=n(739),t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(4),o=v(n(6)),r=n(2),a=n(5),s=n(0),l=n(16),u=n(11),c=v(n(118)),d=v(n(227)),h=v(n(287)),f=v(n(288)),p=v(n(407)),m=v(n(408)),g=v(n(755)),_=n(13);function v(t){return t&&t.__esModule?t:{default:t}}var y=Array.isArray,b=["_reinit","_updateDataSource","_dataInit","_forceRender","_resize"];function w(t,e){var n=e.end-e.start,i=0;for(t.forEach((function(t){i+=t.getBoundingRect().width}));no.oppositeStart||o.oppositeStart<=i.oppositeStart&&o.oppositeEnd>i.oppositeStart);return i.end>o.start&&r}}function k(t){var e,n,i;for(e=0;ea.start-(a.end-e.end)){r.toChain(o),t[n]=o=null;break}o&&o.setRollingStockInCanvas(e)}}function T(t,e){return t&&t.getBoundingRect().end>e.end}function E(t,e,n){var i=t.getBoundingRect(),o=i.x,r=i.y,a=i.x+i.width,s=i.y+i.height;return this.labels=[t],this.shiftFunction=n,this._bBox={start:e?o:r,width:e?i.width:i.height,end:e?a:s,oppositeStart:e?r:o,oppositeEnd:e?s:a},this._initialPosition=e?i.x:i.y,this}E.prototype={toChain:function(t){var e=t.getBoundingRect();t.shift(e.start-this._bBox.end),this._changeBoxWidth(e.width),this.labels=this.labels.concat(t.labels)},getBoundingRect:function(){return this._bBox},shift:function(t){var e=this.shiftFunction;(0,a.each)(this.labels,(function(n,i){var o=i.getBoundingRect(),r=e(o,t);i.hideInsideLabel(r)||i.shift(r.x,r.y)})),this._bBox.end-=t,this._bBox.start-=t},setRollingStockInCanvas:function(t){this._bBox.end>t.end&&this.shift(this._bBox.end-t.end)},getLabels:function(){return this.labels},value:function(){return this.labels[0].getData().value},getInitialPosition:function(){return this._initialPosition},_changeBoxWidth:function(t){this._bBox.end+=t,this._bBox.width+=t}};var O={resolveLabelOverlappingInOneDirection:function(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 0},r=[],a={start:n?e.left:e.top,end:n?e.width-e.right:e.height-e.bottom},s=!1;if(t.forEach((function(t){t&&(s=s||t.series.isStackedSeries()||t.series.isFullStackedSeries(),t.getLabels().forEach((function(t){t.isVisible()&&r.push(new E(t,n,i))})))})),s)!n&&r.reverse();else{var l=r.slice();r.sort((function(t,e){return o(t,e)||t.getInitialPosition()-e.getInitialPosition()||l.indexOf(t)-l.indexOf(e)}))}return!!C(r)&&(w(r,a),k(r),r.reverse(),I(r,a),!0)}},M=c.default.inherit({_eventsMap:{onSeriesClick:{name:"seriesClick"},onPointClick:{name:"pointClick"},onArgumentAxisClick:{name:"argumentAxisClick"},onLegendClick:{name:"legendClick"},onSeriesSelectionChanged:{name:"seriesSelectionChanged"},onPointSelectionChanged:{name:"pointSelectionChanged"},onSeriesHoverChanged:{name:"seriesHoverChanged"},onPointHoverChanged:{name:"pointHoverChanged"},onDone:{name:"done"},onZoomStart:{name:"zoomStart"},onZoomEnd:{name:"zoomEnd"}},_fontFields:["legend.font","legend.title.font","legend.title.subtitle.font","commonSeriesSettings.label.font"],_rootClassPrefix:"dxc",_rootClass:"dxc-chart",_initialChanges:["INIT"],_themeDependentChanges:["REFRESH_SERIES_REINIT"],_getThemeManagerOptions:function(){var t=this.callBase.apply(this,arguments);return t.options=this.option(),t},_createThemeManager:function(){var t=this.option(),e=new p.default.ThemeManager(this._getThemeManagerOptions());return e.setTheme(t.theme,t.rtlEnabled),e},_initCore:function(){this._canvasClipRect=this._renderer.clipRect(),this._createHtmlStructure(),this._createLegend(),this._createTracker(),this._needHandleRenderComplete=!0,this.layoutManager=new m.default.LayoutManager,this._createScrollBar(),o.default.on(this._$element,"contextmenu",(function(t){((0,u.isTouchEvent)(t)||(0,u.isPointerEvent)(t))&&t.preventDefault()})),o.default.on(this._$element,"MSHoldVisual",(function(t){t.preventDefault()}))},_getLayoutItems:i.noop,_layoutManagerOptions:function(){return this._themeManager.getOptions("adaptiveLayout")},_reinit:function(){(0,_.setCanvasValues)(this._canvas),this._reinitAxes(),this._requestChange(["DATA_SOURCE","DATA_INIT","CORRECT_AXIS","FULL_RENDER"])},_correctAxes:i.noop,_createHtmlStructure:function(){var t=this._renderer,e=t.root,n=function(){return t.g().attr({class:"dxc-constant-lines-group"}).linkOn(e,"constant-lines")};this._constantLinesGroup={dispose:function(){this.under.dispose(),this.above.dispose()},linkOff:function(){this.under.linkOff(),this.above.linkOff()},clear:function(){this.under.linkRemove().clear(),this.above.linkRemove().clear()},linkAppend:function(){this.under.linkAppend(),this.above.linkAppend()}},this._backgroundRect=t.rect().attr({fill:"gray",opacity:1e-4}).append(e),this._panesBackgroundGroup=t.g().attr({class:"dxc-background"}).append(e),this._stripsGroup=t.g().attr({class:"dxc-strips-group"}).linkOn(e,"strips"),this._gridGroup=t.g().attr({class:"dxc-grids-group"}).linkOn(e,"grids"),this._panesBorderGroup=t.g().attr({class:"dxc-border"}).linkOn(e,"border"),this._axesGroup=t.g().attr({class:"dxc-axes-group"}).linkOn(e,"axes"),this._labelAxesGroup=t.g().attr({class:"dxc-strips-labels-group"}).linkOn(e,"strips-labels"),this._constantLinesGroup.under=n(),this._seriesGroup=t.g().attr({class:"dxc-series-group"}).linkOn(e,"series"),this._constantLinesGroup.above=n(),this._scaleBreaksGroup=t.g().attr({class:"dxc-scale-breaks"}).linkOn(e,"scale-breaks"),this._labelsGroup=t.g().attr({class:"dxc-labels-group"}).linkOn(e,"labels"),this._crosshairCursorGroup=t.g().attr({class:"dxc-crosshair-cursor"}).linkOn(e,"crosshair"),this._legendGroup=t.g().attr({class:"dxc-legend","clip-path":this._getCanvasClipRectID()}).linkOn(e,"legend").linkAppend(e).enableLinks(),this._scrollBarGroup=t.g().attr({class:"dxc-scroll-bar"}).linkOn(e,"scroll-bar")},_disposeObjectsInArray:function(t,e){(0,a.each)(this[t]||[],(function(t,n){e&&n?(0,a.each)(e,(function(t,e){n[e]&&n[e].dispose()})):n&&n.dispose()})),this[t]=null},_disposeCore:function(){var t=this,e=function(e){t[e]&&(t[e].dispose(),t[e]=null)},n=function(e){t[e].linkOff()},i=this._disposeObjectsInArray;t._renderer.stopAllAnimations(),i.call(t,"series"),e("_tracker"),e("_crosshair"),t.layoutManager=t._userOptions=t._canvas=t._groupsData=null,n("_stripsGroup"),n("_gridGroup"),n("_axesGroup"),n("_constantLinesGroup"),n("_labelAxesGroup"),n("_panesBorderGroup"),n("_seriesGroup"),n("_labelsGroup"),n("_crosshairCursorGroup"),n("_legendGroup"),n("_scrollBarGroup"),n("_scaleBreaksGroup"),e("_canvasClipRect"),e("_panesBackgroundGroup"),e("_backgroundRect"),e("_stripsGroup"),e("_gridGroup"),e("_axesGroup"),e("_constantLinesGroup"),e("_labelAxesGroup"),e("_panesBorderGroup"),e("_seriesGroup"),e("_labelsGroup"),e("_crosshairCursorGroup"),e("_legendGroup"),e("_scrollBarGroup"),e("_scaleBreaksGroup")},_getAnimationOptions:function(){return this._themeManager.getOptions("animation")},_getDefaultSize:function(){return{width:400,height:400}},_getOption:function(t){return this._themeManager.getOptions(t)},_applySize:function(t){this._rect=t.slice(),this._changes.has("FULL_RENDER")||this._processRefreshData("_resize")},_resize:function(){this._doRender(this.__renderOptions||{animate:!1,isResize:!0})},_trackerType:"ChartTracker",_createTracker:function(){this._tracker=new g.default[this._trackerType]({seriesGroup:this._seriesGroup,renderer:this._renderer,tooltip:this._tooltip,legend:this._legend,eventTrigger:this._eventTrigger})},_getTrackerSettings:function(){return(0,s.extend)({chart:this},this._getSelectionModes())},_getSelectionModes:function(){var t=this._themeManager;return{seriesSelectionMode:t.getOptions("seriesSelectionMode"),pointSelectionMode:t.getOptions("pointSelectionMode")}},_updateTracker:function(t){this._tracker.update(this._getTrackerSettings()),this._tracker.setCanvases({left:0,right:this._canvas.width,top:0,bottom:this._canvas.height},t)},_createCanvasFromRect:function(t){var e=this._canvas;return(0,_.setCanvasValues)({left:t[0],top:t[1],right:e.width-t[2],bottom:e.height-t[3],width:e.width,height:e.height})},_doRender:function(t){if(0!==this._canvas.width||0!==this._canvas.height){this._resetIsReady();var e=this._prepareDrawOptions(t),n=e.recreateCanvas;this._preserveOriginalCanvas(),n?this.__currentCanvas=this._canvas:this._canvas=this.__currentCanvas,n&&this._updateCanvasClipRect(this._canvas),this._canvas=this._createCanvasFromRect(this._rect),this._renderer.stopAllAnimations(!0),this._cleanGroups();var i=new Date;this._renderElements(e),this._lastRenderingTime=new Date-i}},_preserveOriginalCanvas:function(){this.__originalCanvas=this._canvas,this._canvas=(0,s.extend)({},this._canvas)},_layoutAxes:i.noop,_renderElements:function(t){var e,n,i,o=this,r=o._prepareToRender(t),a=o._isRotated(),l=o._isLegendInside(),u=[];(0,s.extend)({},o._canvas),o._renderer.lock(),t.drawLegend&&o._legend&&o._legendGroup.linkAppend(),o.layoutManager.setOptions(o._layoutManagerOptions());var c=o._getLayoutTargets();this._layoutAxes((function(e){var n=e?(0,s.extend)({},t,{animate:!1}):t,i=o._renderAxes(n,r);o._shrinkAxes(e,i)})),o._applyClipRects(r),o._appendSeriesGroups(),o._createCrosshairCursor(),c.forEach((function(t){var e=t.canvas;u.push({left:e.left,right:e.width-e.right,top:e.top,bottom:e.height-e.bottom})})),o._scrollBar&&("discrete"===(e=o._argumentAxes[0].getTranslator().getBusinessRange()).axisType&&e.categories&&e.categories.length<=1||"discrete"!==e.axisType&&e.min===e.max?n=i=void 0:(n=e.minVisible,i=e.maxVisible),o._scrollBar.init(e,!o._argumentAxes[0].getOptions().valueMarginsEnabled).setPosition(n,i)),o._updateTracker(u),o._updateLegendPosition(t,l),o._applyPointMarkersAutoHiding(),o._renderSeries(t,a,l),o._renderer.unlock()},_updateLegendPosition:i.noop,_createCrosshairCursor:i.noop,_appendSeriesGroups:function(){this._seriesGroup.linkAppend(),this._labelsGroup.linkAppend(),this._appendAdditionalSeriesGroups()},_renderSeries:function(t,e,n){this._calculateSeriesLayout(t,e),this._renderSeriesElements(t,n)},_calculateSeriesLayout:function(t,e){t.hideLayoutLabels=this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),e)&&!this._themeManager.getOptions("adaptiveLayout").keepLabels,this._updateSeriesDimensions(t)},_getArgFilter:function(){return function(){return!0}},_getValFilter:function(t){return function(){return!0}},_getPointsToAnimation:function(t){var e=this,n=this._getArgFilter();return t.map((function(t){var i=e._getValFilter(t);return t.getPoints().filter((function(t){return t.getOptions().visible&&n(t.argument)&&(i(t.getMinValue(!0))||i(t.getMaxValue(!0)))})).length}))},_renderSeriesElements:function(t,e){var n,i,o=this.series,r=o.length,a=this._themeManager.getOptions("resolveLabelOverlapping"),s=this._getPointsToAnimation(o);for(n=0;n=l.x&&s.x<=l.x+l.width)&&(s.y<=l.y&&l.y<=s.y+s.height||s.y>=l.y&&s.y<=l.y+l.height)&&e.draw(!1)},_cleanGroups:function(){this._stripsGroup.linkRemove().clear(),this._gridGroup.linkRemove().clear(),this._axesGroup.linkRemove().clear(),this._constantLinesGroup.above.clear(),this._labelAxesGroup.linkRemove().clear(),this._labelsGroup.linkRemove().clear(),this._crosshairCursorGroup.linkRemove().clear(),this._scaleBreaksGroup.linkRemove().clear()},_allowLegendInsidePosition:function(){return!1},_createLegend:function(){var t=function(t){var e,n={nameField:(e=t)+"Name",colorField:e+"Color",indexField:e+"Index"};return{getFormatObject:function(t){var e={};return e[n.indexField]=t.id,e[n.colorField]=t.states.normal.fill,e[n.nameField]=t.text,e},textField:n.nameField}}(this._legendDataField);this._legend=new d.default.Legend({renderer:this._renderer,widget:this,group:this._legendGroup,backgroundClass:"dxc-border",itemGroupClass:"dxc-item",titleGroupClass:"dxc-title",textField:t.textField,getFormatObject:t.getFormatObject,allowInsidePosition:this._allowLegendInsidePosition()}),this._updateLegend(),this._layout.add(this._legend)},_updateLegend:function(){var t=this._themeManager,e=t.getOptions("legend"),n=this._getLegendData();e.containerBackgroundColor=t.getOptions("containerBackgroundColor"),e._incidentOccurred=this._incidentOccurred,this._legend.update(n,e,t.theme("legend").title),this._change(["LAYOUT"])},_prepareDrawOptions:function(t){var e=this._getAnimationOptions(),n=(0,s.extend)({},{force:!1,adjustAxes:!0,drawLegend:!0,drawTitle:!0,animate:e.enabled,animationPointsLimit:e.maxPointCountSupported},t,this.__renderOptions);return(0,r.isDefined)(n.recreateCanvas)||(n.recreateCanvas=n.adjustAxes&&n.drawLegend&&n.drawTitle),n},_processRefreshData:function(t){var e=(0,l.inArray)(this._currentRefreshData,b),n=(0,l.inArray)(t,b);(!this._currentRefreshData||e>=0&&n.3)&&(i=.3),e.textOpacity=.3);var o={opacity:i};return e.states={hover:(0,s.extend)({},n.hover,o),selection:(0,s.extend)({},n.selection,o),normal:(0,s.extend)({},n.normal,o)},e}))},_getLegendOptions:function(t){return{legendData:{text:t[this._legendItemTextField],id:t.index,visible:!0},getLegendStyles:t.getLegendStyles(),visible:t.isVisible()}},_disposeSeries:function(t){var e;this.series&&((0,r.isDefined)(t)?(this.series[t].dispose(),this.series.splice(t,1)):((0,a.each)(this.series,(function(t,e){return e.dispose()})),this.series.length=0)),(null===(e=this.series)||void 0===e?void 0:e.length)||(this.series=[])},_disposeSeriesFamilies:function(){(0,a.each)(this.seriesFamilies||[],(function(t,e){e.dispose()})),this.seriesFamilies=null,this._needHandleRenderComplete=!0},_optionChanged:function(t){this._themeManager.resetOptions(t.name),this.callBase.apply(this,arguments)},_applyChanges:function(){var t=this;t._themeManager.update(t._options.silent()),t.callBase.apply(t,arguments)},_optionChangesMap:{animation:"ANIMATION",dataSource:"DATA_SOURCE",palette:"PALETTE",paletteExtensionMode:"PALETTE",legend:"FORCE_DATA_INIT",seriesTemplate:"FORCE_DATA_INIT",export:"FORCE_RENDER",valueAxis:"AXES_AND_PANES",argumentAxis:"AXES_AND_PANES",commonAxisSettings:"AXES_AND_PANES",panes:"AXES_AND_PANES",commonPaneSettings:"AXES_AND_PANES",defaultPane:"AXES_AND_PANES",useAggregation:"AXES_AND_PANES",containerBackgroundColor:"AXES_AND_PANES",rotated:"ROTATED",autoHidePointMarkers:"REFRESH_SERIES_REINIT",customizePoint:"REFRESH_SERIES_REINIT",customizeLabel:"REFRESH_SERIES_REINIT",scrollBar:"SCROLL_BAR"},_optionChangesOrder:["ROTATED","PALETTE","REFRESH_SERIES_REINIT","AXES_AND_PANES","INIT","REINIT","DATA_SOURCE","REFRESH_SERIES_DATA_INIT","DATA_INIT","FORCE_DATA_INIT","REFRESH_AXES","CORRECT_AXIS"],_customChangesOrder:["ANIMATION","REFRESH_SERIES_FAMILIES","FORCE_FIRST_DRAWING","FORCE_DRAWING","FORCE_RENDER","VISUAL_RANGE","SCROLL_BAR","REINIT","REFRESH","FULL_RENDER"],_change_ANIMATION:function(){this._renderer.updateAnimationOptions(this._getAnimationOptions())},_change_DATA_SOURCE:function(){this._needHandleRenderComplete=!0,this._updateDataSource()},_change_PALETTE:function(){this._themeManager.updatePalette(),this._refreshSeries("DATA_INIT")},_change_REFRESH_SERIES_DATA_INIT:function(){this._refreshSeries("DATA_INIT")},_change_DATA_INIT:function(){this.series&&!this.needToPopulateSeries||this._changes.has("FORCE_DATA_INIT")||this._dataInit()},_change_FORCE_DATA_INIT:function(){this._dataInit()},_change_REFRESH_SERIES_FAMILIES:function(){this._processSeriesFamilies(),this._populateBusinessRange(),this._processRefreshData("_forceRender")},_change_FORCE_RENDER:function(){this._processRefreshData("_forceRender")},_change_AXES_AND_PANES:function(){this._refreshSeries("INIT")},_change_ROTATED:function(){this._createScrollBar(),this._refreshSeries("INIT")},_change_REFRESH_SERIES_REINIT:function(){this._refreshSeries("INIT")},_change_REFRESH_AXES:function(){(0,_.setCanvasValues)(this._canvas),this._reinitAxes(),this._requestChange(["CORRECT_AXIS","FULL_RENDER"])},_change_SCROLL_BAR:function(){this._createScrollBar(),this._processRefreshData("_forceRender")},_change_REINIT:function(){this._processRefreshData("_reinit")},_change_FORCE_DRAWING:function(){this._resetComponentsAnimation()},_change_FORCE_FIRST_DRAWING:function(){this._resetComponentsAnimation(!0)},_resetComponentsAnimation:function(t){this.series.forEach((function(e){e.resetApplyingAnimation(t)})),this._resetAxesAnimation(t)},_resetAxesAnimation:i.noop,_refreshSeries:function(t){this.needToPopulateSeries=!0,this._requestChange([t])},_change_CORRECT_AXIS:function(){this._correctAxes()},_doRefresh:function(){var t=this._currentRefreshData;t&&(this._currentRefreshData=null,this._renderer.stopAllAnimations(!0),this[t]())},_updateCanvasClipRect:function(t){var e=Math.max(t.width-t.left-t.right,0),n=Math.max(t.height-t.top-t.bottom,0);this._canvasClipRect.attr({x:t.left,y:t.top,width:e,height:n}),this._backgroundRect.attr({x:t.left,y:t.top,width:e,height:n})},_getCanvasClipRectID:function(){return this._canvasClipRect.id},_dataSourceChangedHandler:function(){this._changes.has("INIT")?this._requestChange(["DATA_INIT"]):this._requestChange(["FORCE_DATA_INIT"])},_dataInit:function(){this._dataSpecificInit(!0)},_processSingleSeries:function(t){t.createPoints(!1)},_handleSeriesDataUpdated:function(){var t=this;this._getVisibleSeries().some((function(t){return t.useAggregation()}))&&this._populateMarginOptions(),this.series.forEach((function(e){return t._processSingleSeries(e)}),this)},_dataSpecificInit:function(t){this.series&&!this.needToPopulateSeries||(this.series=this._populateSeries()),this._repopulateSeries(),this._seriesPopulatedHandlerCore(),this._populateBusinessRange(),this._tracker.updateSeries(this.series,this._changes.has("INIT")),this._updateLegend(),t&&this._requestChange(["FULL_RENDER"])},_forceRender:function(){this._doRender({force:!0})},_repopulateSeries:function(){var t=this._themeManager,e=this._dataSourceItems(),n=t.getOptions("dataPrepareSettings");t.getOptions("seriesTemplate")&&this._populateSeries(e),this._groupSeries();var i=h.default.validateData(e,this._groupsData,this._incidentOccurred,n);t.resetPalette(),this.series.forEach((function(t){t.updateData(i[t.getArgumentField()])})),this._handleSeriesDataUpdated()},_renderCompleteHandler:function(){var t=!0;this._needHandleRenderComplete&&((0,a.each)(this.series,(function(e,n){t=t&&n.canRenderCompleteHandle()})),t&&(this._needHandleRenderComplete=!1,this._eventTrigger("done",{target:this})))},_dataIsReady:function(){return(0,r.isDefined)(this.option("dataSource"))&&this._dataIsLoaded()},_populateSeriesOptions:function(t){for(var e,n,i=this,o=i._themeManager,r=o.getOptions("seriesTemplate"),a=r?(0,_.processSeriesTemplate)(r,t||[]):i.option("series"),l=y(a)?a:a?[a]:[],u=i._getExtraOptions(),c=[],d=function(t){i._specialProcessSeries(),i._populateBusinessRange(t&&t.getValueAxis(),!0),i._renderer.stopAllAnimations(!0),i._updateLegend(),i._requestChange(["FULL_RENDER"])},h=0;h=0&&t.slice(i).forEach((function(t){s(t[n])&&(e[n]+=t[n],t[n]=void 0)}))}(a,r,n,"smallValueThreshold"===o?function(t,e,n){var i,o,r=t.length;for(i=0;io));++i);return i}(a,n,i.threshold):i.topCount),r[n]&&t.push(r)}}function C(t,e){var n=t-e;return isNaN(n)?s(t)?s(e)?0:-1:1:n}function S(t,e){return t.slice().sort((function(t,n){return C(t[e],n[e])}))}function k(t,e,n,i){var o,r={},a="discrete"===e.argumentAxisType,u=a&&e.argumentOptions&&e.argumentOptions.categories,c=function(t){return t},d=n.sortingMethod;return!u&&l(d)&&(t=function(t,e){return t.slice().sort(e)}(t,d)),a&&(e.categories=function(t,e,n){var i=n?n.slice():[];return e.forEach((function(e){t.forEach((function(t){var n=t[e];s(n)&&function(t,e){return-1===t.map((function(t){return t.valueOf()})).indexOf(e.valueOf())}(i,n)&&i.push(n)}))})),i}(t,i,u)),u||!l(d)&&"string"===e.argumentType&&!n._skipArgumentSorting?c=function(t){var e={};return t.forEach((function(t,n){e[t]=n})),function(t,n){return p(t.slice(),!0,(function(t){return e[t[n]]}))}}(e.categories):!0===d&&"string"!==e.argumentType&&(c=S,o=a),i.forEach((function(e){r[e]=c(t,e)})),o&&(e.categories=e.categories.sort(C)),r}function I(t,e,n){var i,o=[],a=[],s=e.argumentOptions&&r(e.argumentOptions.argumentType);e.groups.forEach((function(t){if(t.series.length){var n=t.valueOptions&&r(t.valueOptions.valueType);t.valueType=n,e.argumentType=s,!n&&o.push(t),!s&&a.push(t)}})),(o.length||a.length)&&(i=o.map((function(t,e){return e})),t.some((function(t){var r;if(o.forEach((function(e,n){(function(t,e){return t.series.forEach((function(n){n.getValueFields().forEach((function(n){t.valueType=_(e[n],t.valueType)}))})),t.valueType})(e,t)&&i.indexOf(n)>=0&&i.splice(n,1)})),r||a.forEach((function(n){r=function(t,e,n){return t.forEach((function(t){n.argumentType=_(e[t.getArgumentField()],n.argumentType)})),n.argumentType}(n.series,t,e)})),!n&&r&&0===i.length)return!0})))}e.validateData=function(t,e,n,i){var o;return t=function(t,e){var n,i,o,r,a=[],l=s(t),c=l&&!u(t);if(l&&!c)for(n=0,i=t.length,o=0;n0}:function(){return!0}}w.mixins={chart:{},pie:{},polar:{}},w.mixins.chart.scatter=d.default.chart,w.mixins.polar.scatter=d.default.polar,(0,o.extend)(w.mixins.pie,_.default),(0,o.extend)(w.mixins.chart,h.default.chart,f.default.chart,p.default.chart,m.default.chart,g.default.chart,v.default,y.default.chart),(0,o.extend)(w.mixins.polar,h.default.polar,f.default.polar,p.default.polar,m.default.polar,g.default.polar,y.default.polar),e.Series=A,e.mixins=w.mixins,A.prototype={constructor:A,_createLegendState:l.noop,getLegendStyles:function(){return this._styles.legendStyles},_createStyles:function(t){var e=t.mainSeriesColor;this._styles={normal:this._parseStyle(t,e,e),hover:this._parseStyle(t.hoverStyle||{},e,e),selection:this._parseStyle(t.selectionStyle||{},e,e),legendStyles:{normal:this._createLegendState(t,e),hover:this._createLegendState(t.hoverStyle||{},e),selection:this._createLegendState(t.selectionStyle||{},e)}}},setClippingParams:function(t,e,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._paneClipRectID=t,this._widePaneClipRectID=e,this._forceClipping=n,this._clipLabels=i},applyClip:function(){this._group.attr({"clip-path":this._paneClipRectID})},resetClip:function(){this._group.attr({"clip-path":null})},getTagField:function(){return this._options.tagField||"tag"},getValueFields:l.noop,getSizeField:l.noop,getArgumentField:l.noop,getPoints:function(){return this._points},getPointsInViewPort:function(){return c.default.getPointsInViewPort(this)},_createPoint:function(t,e,n){t.index=e;var i=this.pointsByArgument,o=this._getCreatingPointOptions(t),r=t.argument.valueOf(),s=n;s?s.update(t,o):(s=new a.default.Point(this,t,o),this.isSelected()&&P(this.lastSelectionMode)&&s.setView(I));var l=i[r];return l?l.push(s):i[r]=[s],s.hasValue()&&this.customizePoint(s,t),s},getRangeData:function(){return this._visible?this._getRangeData():{arg:{},val:{}}},getArgumentRange:function(){return this._visible?c.default.getArgumentRange(this):{arg:{},val:{}}},getViewport:function(){return c.default.getViewport(this)},_deleteGroup:function(t){var e=this[t];e&&(e.dispose(),this[t]=null)},updateOptions:function(t,e){var n=t.widgetType,i=this.type,o=t.type;if(this.type=o&&(0,s.normalizeEnum)(o.toString()),!this._checkType(n)||this._checkPolarBarType(n,t))return this.dispose(),void(this.isUpdated=!1);i!==this.type?(this._firstDrawing=!0,this._resetType(i,n),this._setType(this.type,n)):this._defineDrawingState(),this._options=t,this._pointOptions=null,this.name=t.name,this.pane=t.pane,this.tag=t.tag,e&&(this._seriesModes=e.commonSeriesModes||this._seriesModes,this._valueAxis=e.valueAxis||this._valueAxis,this.axis=this._valueAxis&&this._valueAxis.name,this._argumentAxis=e.argumentAxis||this._argumentAxis),this._createStyles(t),this._stackName=null,this._updateOptions(t),this._visible=t.visible,this.isUpdated=!0,this.stack=t.stack,this.barOverlapGroup=t.barOverlapGroup,this._createGroups(),this._processEmptyValue=t.ignoreEmptyPoints?function(t){return null===t?void 0:t}:function(t){return t}},_defineDrawingState:function(){this._firstDrawing=!0},_disposePoints:function(t){(0,r.each)(t||[],(function(t,e){e.dispose()}))},updateDataType:function(t){return this.argumentType=t.argumentType,this.valueType=t.valueType,this.argumentAxisType=t.argumentAxisType,this.valueAxisType=t.valueAxisType,this.showZero=t.showZero,this._argumentChecker=B(t.argumentAxisType,this.getArgumentAxis()),this._valueChecker=B(t.valueAxisType,this.getValueAxis()),this},_argumentChecker:function(){return!0},_valueChecker:function(){return!0},getOptions:function(){return this._options},_getOldPoint:function(t,e,n){var i=t.argument&&t.argument.valueOf(),o=(e[i]||[])[0];return o&&e[i].splice(0,1),o},updateData:function(t){var e=this._options,n=e.nameField;(t=t||[]).length&&(this._canRenderCompleteHandle=!0);var o=this._getPointDataSelector(),r=0;this._data=t.reduce((function(t,a,s){var l=o(a);return(0,i.isDefined)(l.argument)?n&&a[n]!==e.nameFieldValue||(l.index=s,t.push(l)):r++,t}),[]),r&&r===t.length&&this._incidentOccurred("W2002",[this.name,this.getArgumentField()]),this._endUpdateData()},_getData:function(){var t=this._data||[];return this.useAggregation()&&(t=this._resample(this.getArgumentAxis().getAggregationInfo(this._useAllAggregatedPoints,"discrete"!==this.argumentAxisType?this.getArgumentRange():{}),t)),t},useAggregation:function(){var t=this.getOptions().aggregation;return t&&t.enabled},autoHidePointMarkersEnabled:l.noop,usePointsToDefineAutoHiding:l.noop,createPoints:function(t){this._normalizeUsingAllAggregatedPoints(t),this._createPoints()},_normalizeUsingAllAggregatedPoints:function(t){this._useAllAggregatedPoints=this.useAggregation()&&("discrete"===this.argumentAxisType||(this._data||[]).length>1&&!!t)},_createPoints:function(){var t=this,e=t.pointsByArgument||{},n=t._getData();t.pointsByArgument={},t._calculateErrorBars(n);var i={},o=n.reduce((function(n,o){if(t._checkData(o,i)){var r=n.length,a=t._getOldPoint(o,e,r),s=t._createPoint(o,r,a);n.push(s)}return n}),[]);for(var r in i)i[r]===n.length&&t._incidentOccurred("W2002",[t.name,r]);Object.keys(e).forEach((function(n){return t._disposePoints(e[n])})),t._points=o},_removeOldSegments:function(){var t=this,e=t._segments.length;(0,r.each)(t._graphics.splice(e,t._graphics.length)||[],(function(e,n){t._removeElement(n)})),t._trackers&&(0,r.each)(t._trackers.splice(e,t._trackers.length)||[],(function(t,e){e.remove()}))},_drawElements:function(t,e,n){var i=this,o=i._points||[],r=o[0]&&o[0].hasValue()&&i._options.closed,a={markers:i._markersGroup,errorBars:i._errorBarGroup};i._drawnPoints=[],i._graphics=i._graphics||[],i._segments=[];var s=o.reduce((function(o,r){var s=o[o.length-1];return r.translated&&!n||(r.translate(),!n&&r.setDefaultCoords()),r.hasValue()&&r.hasCoords()?(n&&i._drawPoint({point:r,groups:a,hasAnimation:t,firstDrawing:e}),s.push(r)):r.hasValue()?r.setInvisibility():s.length&&o.push([]),o}),[[]]);s.forEach((function(e,n){e.length&&i._drawSegment(e,t,n,r&&n===this.length-1)}),s),i._firstDrawing=!o.length,i._removeOldSegments(),t&&i._animate(e)},draw:function(t,e,n){var i=this._firstDrawing;if(this._legendCallback=n||this._legendCallback,!this._visible)return t=!1,void this._group.remove();this._appendInGroup(),this._applyVisibleArea(),this._setGroupsSettings(t,i),!i&&!this._resetApplyingAnimation&&this._drawElements(!1,i,!1),this._drawElements(t,i,!0),e&&this.hideLabels(),this.isSelected()?this._changeStyle(this.lastSelectionMode,void 0,!0):this.isHovered()?this._changeStyle(this.lastHoverMode,void 0,!0):this._applyStyle(this._styles.normal),this._resetApplyingAnimation=!1},_setLabelGroupSettings:function(t){var e={class:"dxc-labels","pointer-events":"none"};this._clipLabels&&this._applyElementsClipRect(e),this._applyClearingSettings(e),t&&(e.opacity=.001),this._labelsGroup.attr(e).append(this._extGroups.labelsGroup)},_checkType:function(t){return!!w.mixins[t][this.type]},_checkPolarBarType:function(t,e){return"polar"===t&&e.spiderWidget&&-1!==this.type.indexOf("bar")},_resetType:function(t,e){var n;if(t)for(n in w.mixins[e][t])delete this[n]},_setType:function(t,e){var n,i=w.mixins[e][t];for(n in i)this[n]=i[n]},_setPointsView:function(t,e){this.getPoints().forEach((function(n){e!==n&&n.setView(t)}))},_resetPointsView:function(t,e){this.getPoints().forEach((function(n){e!==n&&n.resetView(t)}))},_resetNearestPoint:function(){this._nearestPoint&&null!==this._nearestPoint.series&&this._nearestPoint.resetView(S),this._nearestPoint=null},_setSelectedState:function(t){this.lastSelectionMode=(0,s.normalizeEnum)(t||this._options.selectionMode),this.fullState=this.fullState|x,this._resetNearestPoint(),this._changeStyle(this.lastSelectionMode),"none"!==this.lastSelectionMode&&this.isHovered()&&P(this.lastHoverMode)&&this._resetPointsView(S)},_releaseSelectedState:function(){this.fullState=this.fullState&~x,this._changeStyle(this.lastSelectionMode,I),"none"!==this.lastSelectionMode&&this.isHovered()&&P(this.lastHoverMode)&&this._setPointsView(S)},isFullStackedSeries:function(){return 0===this.type.indexOf("fullstacked")},isStackedSeries:function(){return 0===this.type.indexOf("stacked")},resetApplyingAnimation:function(t){this._resetApplyingAnimation=!0,t&&(this._firstDrawing=!0)},isFinancialSeries:function(){return"stock"===this.type||"candlestick"===this.type},_canChangeView:function(){return!this.isSelected()&&"none"!==(0,s.normalizeEnum)(this._options.hoverMode)},_changeStyle:function(t,e,n){var i=this.fullState,o=[k,S,I,I];"none"===this.lastHoverMode&&(i&=~C),"none"===this.lastSelectionMode&&(i&=~x),P(t)&&!n&&(e?this._resetPointsView(e):this._setPointsView(o[i])),this._legendCallback([O,E,T,T][i]),this._applyStyle(this._styles[o[i]])},updateHover:function(t,e){var n=this._nearestPoint,i=this.isHovered()&&"nearestpoint"===this.lastHoverMode&&this.getNeighborPoint(t,e);i===n||this.isSelected()&&"none"!==this.lastSelectionMode||(this._resetNearestPoint(),i&&(i.setView(S),this._nearestPoint=i))},_getMainAxisName:function(){return this._options.rotated?"X":"Y"},areLabelsVisible:function(){return!(0,i.isDefined)(this._options.maxLabelCount)||this._points.length<=this._options.maxLabelCount},getLabelVisibility:function(){return this.areLabelsVisible()&&this._options.label&&this._options.label.visible},customizePoint:function(t,e){var n,r,a,s,l,u,c=this._options,d=c.customizePoint,h=c.customizeLabel;h&&h.call&&((n=(0,o.extend)({seriesName:this.name},e)).series=this,a=(l=(a=h.call(n,n))&&!(0,i.isEmptyObject)(a))?(0,o.extend)(!0,{},c.label,a):null),d&&d.call&&((n=n||(0,o.extend)({seriesName:this.name},e)).series=this,u=(s=d.call(n,n))&&!(0,i.isEmptyObject)(s)),(l||u)&&((r=this._parsePointOptions(this._preparePointOptions(s),a||c.label,e,t)).styles.useLabelCustomOptions=l,r.styles.usePointCustomOptions=u,t.updateOptions(r))},show:function(){this._visible||this._changeVisibility(!0)},hide:function(){this._visible&&this._changeVisibility(!1)},_changeVisibility:function(t){this._visible=this._options.visible=t,this._updatePointsVisibility(),this.hidePointTooltip(),this._options.visibilityChanged(this)},_updatePointsVisibility:l.noop,hideLabels:function(){(0,r.each)(this._points,(function(t,e){e._label.draw(!1)}))},_parsePointOptions:function(t,e,n,r){var a=this._options,l=this._createPointStyles(t,n,r),u=(0,o.extend)({},t,{type:a.type,rotated:a.rotated,styles:l,widgetType:a.widgetType,visibilityChanged:a.visibilityChanged});return u.label=function(t,e){var n=t||{},r=(0,o.extend)({},n.font)||{},a=n.border||{},l=n.connector||{},u={fill:n.backgroundColor||e,"stroke-width":a.visible&&a.width||0,stroke:a.visible&&a.width?a.color:"none",dashStyle:a.dashStyle},c={stroke:l.visible&&l.width?l.color||e:"none","stroke-width":l.visible&&l.width||0};return r.color="none"===n.backgroundColor&&"#ffffff"===(0,s.normalizeEnum)(r.color)&&"inside"!==n.position?e:r.color,{alignment:n.alignment,format:n.format,argumentFormat:n.argumentFormat,customizeText:(0,i.isFunction)(n.customizeText)?n.customizeText:void 0,attributes:{font:r},visible:0!==r.size&&n.visible,showForZeroValues:n.showForZeroValues,horizontalOffset:n.horizontalOffset,verticalOffset:n.verticalOffset,radialOffset:n.radialOffset,background:u,position:n.position,connector:c,rotationAngle:n.rotationAngle,wordWrap:n.wordWrap,textOverflow:n.textOverflow,cssClass:n.cssClass}}(e,l.normal.fill),this.areErrorBarsVisible()&&(u.errorBars=a.valueErrorBar),u},_preparePointOptions:function(t){var e=this._getOptionsForPoint();return t?function(t,e){var n=D(t,e);return n.image=(0,o.extend)(!0,{},t.image,e.image),n.selectionStyle=D(t.selectionStyle,e.selectionStyle),n.hoverStyle=D(t.hoverStyle,e.hoverStyle),n}(e,t):e},_getMarkerGroupOptions:function(){return(0,o.extend)(!1,{},this._getOptionsForPoint(),{hoverStyle:{},selectionStyle:{}})},_getAggregationMethod:function(t,e){var n,i=this.getOptions().aggregation,o=(0,s.normalizeEnum)(i.method),r="custom"===o&&i.calculate;return n=t&&!e?function(t){return t.data[0]}:this._aggregators[o]||this._aggregators[this._defaultAggregator],r||n},_resample:function(t,e){var n=t.interval,i=t.ticks,o=t.aggregateByCategory,r=this,a="discrete"===r.argumentAxisType||"discrete"===r.valueAxisType,s=0,l=this._getPointDataSelector(),u=r.getOptions(),c=function(t,e,n){if(e){var i=function(e){var i=e&&l(e,u);i&&r._checkData(i)&&(i.aggregationInfo=n,t.push(i))};e.length?e.forEach(i):i(e)}},d=this._getAggregationMethod(a,o);if(a){if(o){var h=this.getArgumentAxis().getTranslator().getBusinessRange().categories,f=h.reduce((function(t,e){return t[e.valueOf()]=[],t}),{});return e.forEach((function(t){f[t.argument].push(t)})),h.reduce((function(t,e){return c(t,d({aggregationInterval:null,intervalStart:e,intervalEnd:e,data:f[e].map(R)},r)),t}),[])}return e.reduce((function(t,e,i,o){if(t[1].push(e),i===o.length-1||(i+1)%n===0){var a=t[1],s={aggregationInterval:n,data:a.map(R)};c(t[0],d(s,r)),t[1]=[]}return t}),[[],[]])[0]}for(var p=[],m=1;m=_&&v.push(e[s]),s++;var y={intervalStart:_,intervalEnd:g,aggregationInterval:n,data:v.map(R)};c(p,d(y,r),y)}return r._endUpdateData(),p},canRenderCompleteHandle:function(){var t=this._canRenderCompleteHandle;return delete this._canRenderCompleteHandle,!!t},isHovered:function(){return!!(1&this.fullState)},isSelected:function(){return!!(2&this.fullState)},isVisible:function(){return this._visible},getAllPoints:function(){return this._createAllAggregatedPoints(),(this._points||[]).slice()},getPointByPos:function(t){return this._createAllAggregatedPoints(),(this._points||[])[t]},getVisiblePoints:function(){return(this._drawnPoints||[]).slice()},selectPoint:function(t){t.isSelected()||(!function(t,e){t.fullState|=x,t.applyView(e)}(t,this._legendCallback),this._eventPipe({action:"pointSelect",target:t}),this._eventTrigger("pointSelectionChanged",{target:t}))},deselectPoint:function(t){t.isSelected()&&(!function(t,e){t.fullState&=~x,t.applyView(e)}(t,this._legendCallback),this._eventPipe({action:"pointDeselect",target:t}),this._eventTrigger("pointSelectionChanged",{target:t}))},hover:function(t){var e=this._eventTrigger;this.isHovered()||(this.lastHoverMode=(0,s.normalizeEnum)(t||this._options.hoverMode),this.fullState=this.fullState|C,this._changeStyle(this.lastHoverMode,void 0,this.isSelected()&&"none"!==this.lastSelectionMode),e("seriesHoverChanged",{target:this}))},clearHover:function(){var t=this._eventTrigger;this.isHovered()&&(this._resetNearestPoint(),this.fullState=this.fullState&~C,this._changeStyle(this.lastHoverMode,S,this.isSelected()&&"none"!==this.lastSelectionMode),t("seriesHoverChanged",{target:this}))},hoverPoint:function(t){t.isHovered()||(t.clearHover(),function(t,e){t.fullState|=C,t.applyView(e)}(t,this._legendCallback),this._canChangeView()&&this._applyStyle(this._styles.hover),this._eventPipe({action:"pointHover",target:t}),this._eventTrigger("pointHoverChanged",{target:t}))},clearPointHover:function(){var t=this;t.getPoints().some((function(e){return!!e.isHovered()&&(n=e,i=t._legendCallback,n.fullState&=~C,n.applyView(i),n.releaseHoverState(),t._canChangeView()&&t._applyStyle(t._styles.normal),t._eventPipe({action:"clearPointHover",target:e}),t._eventTrigger("pointHoverChanged",{target:e}),!0);var n,i}))},showPointTooltip:function(t){M(this._extGroups.seriesGroup,"showpointtooltip",t)},hidePointTooltip:function(t){M(this._extGroups.seriesGroup,"hidepointtooltip",t)},select:function(){this.isSelected()||(this._setSelectedState(this._options.selectionMode),this._eventPipe({action:"seriesSelect",target:this}),this._group.toForeground(),this._eventTrigger("seriesSelectionChanged",{target:this}))},clearSelection:function(){this.isSelected()&&(this._releaseSelectedState(),this._eventTrigger("seriesSelectionChanged",{target:this}))},getPointsByArg:function(t,e){var n=t.valueOf(),i=this.pointsByArgument[n];return i||e||!this._createAllAggregatedPoints()||(i=this.pointsByArgument[n]),i||[]},_createAllAggregatedPoints:function(){return!(!this.useAggregation()||this._useAllAggregatedPoints)&&(this.createPoints(!0),!0)},getPointsByKeys:function(t){return this.getPointsByArg(t)},notify:function(t){var e=this,n=t.action,i=e._seriesModes,o=t.target,r=o.getOptions(),a=(0,s.normalizeEnum)(r.hoverMode),l=(0,s.normalizeEnum)(r.selectionMode);"pointHover"===n?e._hoverPointHandler(o,a,t.notifyLegend):"clearPointHover"===n?e._clearPointHoverHandler(o,a,t.notifyLegend):"seriesSelect"===n?o!==e&&"single"===i.seriesSelectionMode&&e.clearSelection():"pointSelect"===n?("single"===i.pointSelectionMode&&e.getPoints().some((function(t){return!(t===o||!t.isSelected())&&(e.deselectPoint(t),!0)})),e._selectPointHandler(o,l)):"pointDeselect"===n&&e._deselectPointHandler(o,l)},_selectPointHandler:function(t,e){"allseriespoints"===e?t.series===this&&this._setPointsView(I,t):"allargumentpoints"===e&&this.getPointsByKeys(t.argument,t.argumentIndex).forEach((function(e){e!==t&&e.setView(I)}))},_deselectPointHandler:function(t,e){"allseriespoints"===e?t.series===this&&this._resetPointsView(I,t):"allargumentpoints"===e&&this.getPointsByKeys(t.argument,t.argumentIndex).forEach((function(e){e!==t&&e.resetView(I)}))},_hoverPointHandler:function(t,e,n){t.series!==this&&"allargumentpoints"===e?(this.getPointsByKeys(t.argument,t.argumentIndex).forEach((function(t){t.setView(S)})),n&&this._legendCallback(t)):"allseriespoints"===e&&t.series===this&&this._setPointsView(S,t)},_clearPointHoverHandler:function(t,e,n){"allargumentpoints"===e?(t.series!==this&&this.getPointsByKeys(t.argument,t.argumentIndex).forEach((function(t){t.resetView(S)})),n&&this._legendCallback(t)):"allseriespoints"===e&&t.series===this&&this._resetPointsView(S,t)},_deletePoints:function(){this._disposePoints(this._points),this._points=this._drawnPoints=null},_deleteTrackers:function(){(0,r.each)(this._trackers||[],(function(t,e){e.remove()})),this._trackersGroup&&this._trackersGroup.dispose(),this._trackers=this._trackersGroup=null},dispose:function(){this._deletePoints(),this._group.dispose(),this._labelsGroup&&this._labelsGroup.dispose(),this._errorBarGroup&&this._errorBarGroup.dispose(),this._deleteTrackers(),this._group=this._extGroups=this._markersGroup=this._elementsGroup=this._bordersGroup=this._labelsGroup=this._errorBarGroup=this._graphics=this._rangeData=this._renderer=this._styles=this._options=this._pointOptions=this._drawnPoints=this.pointsByArgument=this._segments=this._prevSeries=null},correctPosition:l.noop,drawTrackers:l.noop,getNeighborPoint:l.noop,areErrorBarsVisible:l.noop,getMarginOptions:function(){return this._patchMarginOptions({percentStick:this.isFullStackedSeries()})},getColor:function(){return this.getLegendStyles().normal.fill},getOpacity:function(){return this._options.opacity},getStackName:function(){return this._stackName},getBarOverlapGroup:function(){return this._options.barOverlapGroup},getPointByCoord:function(t,e){var n=this.getNeighborPoint(t,e);return(null===n||void 0===n?void 0:n.coordsIn(t,e))?n:null},getValueAxis:function(){return this._valueAxis},getArgumentAxis:function(){return this._argumentAxis},getMarkersGroup:function(){return this._markersGroup},getRenderer:function(){return this._renderer}}},function(t,e,n){"use strict";var i=n(94),o=n(13),r=n(5),a=n(0),s=Math,l=s.round,u=s.floor,c=s.abs;function d(t,e){var n,i=1/0;return(0,r.each)(e,(function(e,o){var r=t[0]-o[0],a=t[1]-o[1],s=r*r+a*a;sr&&o[0]l&&o[1]e.x+e.width||t.x+t.widthe.x+e.r||t.x+t.width=d&&d>=a||o<=d&&d<=a)&&t.push([(d-o)*(r-i)/(a-o)+i,d]):(i>=s&&s>=r||i<=s&&s<=r)&&t.push([s,(s-i)*(a-o)/(r-i)+o]),t}),[])},isHorizontal:function(t,e){return t.x>e.x||e.x>t.x+t.width},getFigureCenter:p.getFigureCenter,findFigurePoint:function(t,e,n){if(!n)return[t.x,t.y];var i=e[0],r=l(t.x+(t.y-e[1])/Math.tan((0,o.degreesToRadians)(t.angle))),a=[t.x,t.y,r,e[1]];return t.x<=r&&r<=i||i<=r&&r<=t.x||(c(t.x-i)<12?a=[t.x,t.y]:t.x<=i?a[2]=t.x+12:a[2]=t.x-12),a},adjustPoints:function(t){return t}};function g(t){return void 0!==t.angle&&m||void 0!==t.r&&p||f}function _(t,e){t[e]&&t[e].dispose(),t[e]=null}function v(t){return t&&(t.fill&&"none"!==t.fill||t["stroke-width"]>0&&t.stroke&&"none"!==t.stroke)}function y(t){return t&&t["stroke-width"]>0&&t.stroke&&"none"!==t.stroke}function b(t){this._renderer=t.renderer,this._container=t.labelsGroup,this._point=t.point,this._strategy=t.strategy,this._rowCount=1}b.prototype={constructor:b,setColor:function(t){this._color=t},setOptions:function(t){this._options=t},setData:function(t){this._data=t},setDataField:function(t,e){this._data=this._data||{},this._data[t]=e},getData:function(){return this._data},setFigureToDrawConnector:function(t){this._figure=t},dispose:function(){_(this,"_group"),this._data=this._options=this._textContent=this._visible=this._insideGroup=this._text=this._background=this._connector=this._figure=null},_setVisibility:function(t,e){this._group&&this._group.attr({visibility:t}),this._visible=e},isVisible:function(){return this._visible},hide:function(t){this._holdVisibility=!!t,this._hide()},_hide:function(){this._setVisibility("hidden",!1)},show:function(t){var e=!this._drawn;this._point.hasValue()&&(this._holdVisibility=!!t,this._show(),e&&this._point.correctLabelPosition(this))},_show:function(){var t=this._renderer,e=this._container,n=this._options||{},r=this._textContent=function(t,e){var n=e.format;return t.valueText=(0,i.format)(t.value,n),t.argumentText=(0,i.format)(t.argument,e.argumentFormat),void 0!==t.percent&&(t.percentText=(0,i.format)(t.percent,{type:"percent",precision:n&&n.percentPrecision})),void 0!==t.total&&(t.totalText=(0,i.format)(t.total,n)),void 0!==t.openValue&&(t.openValueText=(0,i.format)(t.openValue,n)),void 0!==t.closeValue&&(t.closeValueText=(0,i.format)(t.closeValue,n)),void 0!==t.lowValue&&(t.lowValueText=(0,i.format)(t.lowValue,n)),void 0!==t.highValue&&(t.highValueText=(0,i.format)(t.highValue,n)),void 0!==t.reductionValue&&(t.reductionValueText=(0,i.format)(t.reductionValue,n)),e.customizeText?e.customizeText.call(t,t):t.valueText}(this._data,this._options)||null;r?(this._group||(this._group=t.g().append(e),this._insideGroup=t.g().append(this._group),this._text=t.text("",0,0).append(this._insideGroup)),this._text.css(n.attributes?(0,o.patchFontOptions)(n.attributes.font):{}),v(n.background)?(this._background=this._background||t.rect().append(this._insideGroup).toBackground(),this._background.attr(n.background),this._color&&this._background.attr({fill:this._color})):_(this,"_background"),y(n.connector)?(this._connector=this._connector||t.path([],"line").sharp().append(this._group).toBackground(),this._connector.attr(n.connector),this._color&&this._connector.attr({stroke:this._color})):_(this,"_connector"),this._text.attr({text:r,align:n.textAlignment,class:n.cssClass}),this._updateBackground(this._text.getBBox()),this._setVisibility("visible",!0),this._drawn=!0):this._hide()},_getLabelVisibility:function(t){return this._holdVisibility?this.isVisible():t},draw:function(t){return this._getLabelVisibility(t)?(this._show(),this._point&&this._point.correctLabelPosition(this)):(this._drawn=!1,this._hide()),this},_updateBackground:function(t){this._background&&(t.x-=8,t.y-=4,t.width+=16,t.height+=8,this._background.attr(t)),this._bBoxWithoutRotation=(0,a.extend)({},t);var e=this._options.rotationAngle||0;this._insideGroup.rotate(e,t.x+t.width/2,t.y+t.height/2),t=(0,o.rotateBBox)(t,[t.x+t.width/2,t.y+t.height/2],-e),this._bBox=t},getFigureCenter:function(){var t=this._figure;return(this._strategy||g(t)).getFigureCenter(t)},_getConnectorPoints:function(){var t,e,n=this._figure,i=this._options,o=this._strategy||g(n),r=this._shiftBBox(this._bBoxWithoutRotation),a=this.getBoundingRect(),s=[];if(!o.isLabelInside(r,n,"inside"!==i.position)){e=o.isHorizontal(r,n);var l=this.getFigureCenter();t=d(l,s=o.prepareLabelPoints(r,a,e,-i.rotationAngle||0,l)),s=(s=o.findFigurePoint(n,t,e)).concat(t)}return o.adjustPoints(s)},fit:function(t){var e=this._background?16:0,n=!1;if(this._text){var i=this._text.setMaxSize(t-e,void 0,this._options),o=i.rowCount;0===o&&(o=1),o!==this._rowCount&&(n=!0,this._rowCount=o),i.textIsEmpty&&_(this,"_background")}return this._updateBackground(this._text.getBBox()),n},resetEllipsis:function(){this._text&&this._text.restoreText(),this._updateBackground(this._text.getBBox())},setTrackerData:function(t){this._text.data({"chart-data-point":t}),this._background&&this._background.data({"chart-data-point":t})},hideInsideLabel:function(t){return this._point.hideInsideLabel(this,t)},getPoint:function(){return this._point},shift:function(t,e){return this._textContent&&(this._insideGroup.attr({translateX:this._x=l(t-this._bBox.x),translateY:this._y=l(e-this._bBox.y)}),this._connector&&this._connector.attr({points:this._getConnectorPoints()})),this},getBoundingRect:function(){return this._shiftBBox(this._bBox)},_shiftBBox:function(t){return this._textContent?{x:t.x+this._x,y:t.y+this._y,width:t.width,height:t.height}:{}},getLayoutOptions:function(){var t=this._options;return{alignment:t.alignment,background:v(t.background),horizontalOffset:t.horizontalOffset,verticalOffset:t.verticalOffset,radialOffset:t.radialOffset,position:t.position,connectorOffset:(y(t.connector)?12:0)+(v(t.background)?8:0)}}},e.Label=b},function(t,e,n){"use strict";var i,o=n(125),r=(i=o)&&i.__esModule?i:{default:i};t.exports={registerKeyboardAction:function(t,e,n,i,o){var a=e.getController("keyboardNavigation");if(!(e.option("useLegacyKeyboardNavigation")||a&&!a.isKeyboardEnabled())){e.createAction("onKeyDown"),r.default.registerKeyboardAction(t,e,n,i,o,(function(t){e.executeAction("onKeyDown",t)}))}}}},function(t,e,n){"use strict";var i=n(3),o=n(10).getWindow(),r=n(18),a=n(8),s=n(0).extend,l=n(20),u=n(42),c=n(137),d=n(99),h=n(108),f=n(36),p=n(157).ChildDefaultTemplate,m={popupWidth:"width",popupHeight:"height",popupMaxHeight:"maxHeight",popupAutoResizeEnabled:"autoResizeEnabled"},g={buttonIcon:"icon",buttonText:"text",buttonWidth:"width",buttonHeight:"height",buttonTemplate:"template"},_=l.inherit({_supportedKeys:function(){var t={};return this.option("opened")&&this._list.option("focusedElement")||(t=this._button._supportedKeys()),s(this.callBase(),t,{tab:function(){this._popup&&this._popup.hide()}})},_getDefaultOptions:function(){return s(this.callBase(),{items:[],onItemClick:null,dataSource:null,itemTemplate:"item",buttonText:"",buttonIcon:"overflow",buttonWidth:void 0,buttonHeight:void 0,buttonTemplate:"content",onButtonClick:null,usePopover:!1,popupWidth:"auto",popupHeight:"auto",activeStateEnabled:!0,hoverStateEnabled:!0,opened:!1,selectionMode:"none",selectedItemKeys:[],deferRendering:!1,popupPosition:{my:"top center",at:"bottom center",collision:"fit flip",offset:{v:1}},popupAnimation:void 0,onItemRendered:null,menuWidget:h,popupMaxHeight:void 0,closeOnClick:!0,useInkRipple:!1,container:void 0,popupAutoResizeEnabled:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{usePopover:!0}},{device:{platform:"generic"},options:{popupPosition:{offset:{v:4}}}},{device:function(){return"desktop"===r.real().deviceType&&!r.isSimulator()},options:{focusStateEnabled:!0}},{device:{platform:"android"},options:{popupPosition:{my:"top "+(this.option("rtlEnabled")?"left":"right"),at:"top "+(this.option("rtlEnabled")?"left":"right"),collision:"flipfit"},popupAnimation:{show:{type:"pop",duration:200,from:{scale:0},to:{scale:1}},hide:{type:"pop",duration:200,from:{scale:1},to:{scale:0}}}}},{device:function(){return f.isMaterial()},options:{useInkRipple:!0}}])},_initOptions:function(t){"android"===r.current().platform&&(t.popupPosition||(t.popupPosition={at:(t.usePopover?"bottom ":"top ")+(t.rtlEnabled?"left":"right")})),this.callBase(t)},_dataSourceOptions:function(){return{paginate:!1}},_init:function(){this.callBase(),this.$element().addClass("dx-dropdownmenu"),this._initDataSource(),this._initItemClickAction(),this._initButtonClickAction()},_initItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initButtonClickAction:function(){this._buttonClickAction=this._createActionByOption("onButtonClick")},_initTemplates:function(){this._templateManager.addDefaultTemplates({content:new p("content")}),this.callBase()},_initMarkup:function(){this._renderButton(),this.callBase()},_render:function(){this.callBase(),this.setAria({role:"menubar",haspopup:!0,expanded:this.option("opened")})},_renderContentImpl:function(){this.option("opened")&&this._renderPopup()},_clean:function(){this._cleanFocusState(),this._popup&&(this._popup.$element().remove(),delete this._$popup)},_renderButton:function(){var t=this.$element().addClass("dx-dropdownmenu-button"),e=this._buttonOptions();this._button=this._createComponent(t,u,e)},_toggleActiveState:function(t,e,n){this._button._toggleActiveState(t,e,n)},_buttonOptions:function(){return{text:this.option("buttonText"),icon:this.option("buttonIcon"),width:this.option("buttonWidth"),height:this.option("buttonHeight"),useInkRipple:this.option("useInkRipple"),template:this.option("buttonTemplate"),focusStateEnabled:!1,onClick:function(t){this.option("opened",!this.option("opened")),this._buttonClickAction(t)}.bind(this)}},_toggleMenuVisibility:function(t){var e=void 0===t?!this._popup.option("visible"):t;t&&this._renderPopup(),this._popup.toggle(e),this.setAria("expanded",e)},_renderPopup:function(){if(!this._$popup){var t=this._$popup=i("
").appendTo(this.$element()),e=this._popupOptions();this._popup=this._createComponent(t,c,e)}},_popupOptions:function(){var t=!this.option("usePopover");return{onInitialized:function(e){e.component._wrapper().addClass("dx-dropdownmenu-popup-wrapper").toggleClass("dx-dropdownmenu-popup",t)},visible:this.option("opened"),deferRendering:!1,contentTemplate:function(t){this._renderList(t)}.bind(this),position:this.option("popupPosition"),animation:this.option("popupAnimation"),onOptionChanged:function(t){"visible"===t.name&&this.option("opened",t.value)}.bind(this),target:this.$element(),height:this.option("popupHeight"),width:this.option("popupWidth"),maxHeight:this.option("popupMaxHeight"),container:this.option("container"),autoResizeEnabled:this.option("popupAutoResizeEnabled")}},_renderList:function(t){var e=i(t),n=this._listOptions();e.addClass("dx-dropdownmenu-list"),this._list=this._createComponent(e,this.option("menuWidget"),n),this._list._getAriaTarget=function(){return this.$element()}.bind(this),this._setListDataSource();var r=.5*i(o).height();e.height()>r&&e.height(r)},_listOptions:function(){return{pageLoadMode:"scrollBottom",indicateLoading:!1,noDataText:"",selectionMode:this.option("selectionMode"),selectedItemKeys:this.option("selectedItemKeys"),itemTemplate:this.option("itemTemplate"),onItemClick:function(t){this.option("closeOnClick")&&this.option("opened",!1),this._itemClickAction(t)}.bind(this),tabIndex:-1,focusStateEnabled:this.option("focusStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),onItemRendered:this.option("onItemRendered"),_itemAttributes:{role:"menuitem"}}},_setListDataSource:function(){this._list&&this._list.option("dataSource",this._dataSource||this.option("items")),delete this._deferRendering},_getKeyboardListeners:function(){return this.callBase().concat([this._list])},_toggleVisibility:function(t){this.callBase(t),this._button.option("visible",t)},_optionChanged:function(t){var e=t.name,n=t.value;switch(e){case"items":case"dataSource":this.option("deferRendering")&&!this.option("opened")?this._deferRendering=!0:(this._refreshDataSource(),this._setListDataSource());break;case"itemTemplate":this._list&&this._list.option(e,this._getTemplate(n));break;case"onItemClick":this._initItemClickAction();break;case"onButtonClick":this._buttonClickAction();break;case"buttonIcon":case"buttonText":case"buttonWidth":case"buttonHeight":case"buttonTemplate":this._button.option(g[e],n),this._renderPopup();break;case"popupWidth":case"popupHeight":case"popupMaxHeight":case"popupAutoResizeEnabled":this._popup.option(m[e],n);break;case"usePopover":case"menuWidget":case"useInkRipple":this._invalidate();break;case"focusStateEnabled":case"activeStateEnabled":this._list&&this._list.option(e,n),this.callBase(t);break;case"selectionMode":case"selectedItemKeys":case"onItemRendered":this._list&&this._list.option(e,n);break;case"opened":this._deferRendering&&(this._refreshDataSource(),this._setListDataSource()),this._toggleMenuVisibility(n);break;case"deferRendering":case"popupPosition":case"closeOnClick":break;case"container":this._popup&&this._popup.option(t.name,t.value);break;default:this.callBase(t)}},open:function(){this.option("opened",!0)},close:function(){this.option("opened",!1)}}).include(d);a("dxDropDownMenu",_),t.exports=_},function(t,e,n){"use strict";var i,o=n(40),r=(i=o)&&i.__esModule?i:{default:i},a=n(60);e.createGroupFilter=function(t,e){for(var n=(0,a.normalizeSortingInfo)(e.group),i=[],o=0;o").addClass("dx-tab-text"))}),["title","icon"],this.option("integrationOptions.watchMethod"))})},_createTitleActions:function(){this._createTitleClickAction(),this._createTitleHoldAction(),this._createTitleRenderedAction()},_createTitleClickAction:function(){this._titleClickAction=this._createActionByOption("onTitleClick")},_createTitleHoldAction:function(){this._titleHoldAction=this._createActionByOption("onTitleHold")},_createTitleRenderedAction:function(){this._titleRenderedAction=this._createActionByOption("onTitleRendered")},_renderContent:function(){var t=this;this.callBase(),this.option("templatesRenderAsynchronously")&&(this._resizeEventTimer=setTimeout((function(){t._updateLayout()}),0))},_renderLayout:function(){if(this._tabs)this._updateLayout();else{var t=this.$element();this._$tabContainer=(0,i.default)("
").addClass("dx-tabpanel-tabs").appendTo(t);var e=(0,i.default)("
").appendTo(this._$tabContainer);this._tabs=this._createComponent(e,c.default,this._tabConfig()),this._$container=(0,i.default)("
").addClass("dx-tabpanel-container").appendTo(t),this._$container.append(this._$wrapper),this._updateLayout()}},_updateLayout:function(){if(g.default.hasWindow()){var t=this._$tabContainer.outerHeight();this._$container.css({marginTop:-t,paddingTop:t})}},_refreshActiveDescendant:function(){if(this._tabs){var t=this._tabs,e=t.itemElements(),n=(0,i.default)(e[t.option("selectedIndex")]),o=this.getFocusedItemId();this.setAria("controls",void 0,(0,i.default)(e)),this.setAria("controls",o,n)}},_tabConfig:function(){return{selectOnFocus:!0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),repaintChangesOnly:this.option("repaintChangesOnly"),tabIndex:this.option("tabIndex"),selectedIndex:this.option("selectedIndex"),badgeExpr:this.option("badgeExpr"),onItemClick:this._titleClickAction.bind(this),onItemHold:this._titleHoldAction.bind(this),itemHoldTimeout:this.option("itemHoldTimeout"),onSelectionChanged:function(t){this.option("selectedIndex",t.component.option("selectedIndex")),this._refreshActiveDescendant()}.bind(this),onItemRendered:this._titleRenderedAction.bind(this),itemTemplate:this._getTemplateByOption("itemTitleTemplate"),items:this.option("items"),noDataText:null,scrollingEnabled:this.option("scrollingEnabled"),scrollByContent:this.option("scrollByContent"),showNavButtons:this.option("showNavButtons"),itemTemplateProperty:"tabTemplate",loopItemFocus:this.option("loop"),selectionRequired:!0,onOptionChanged:function(t){if("focusedElement"===t.name)if(t.value){var e=(0,i.default)(t.value),n=this._itemElements().eq(e.index());this.option("focusedElement",(0,f.getPublicElement)(n))}else this.option("focusedElement",t.value)}.bind(this),onFocusIn:function(t){this._focusInHandler(t.event)}.bind(this),onFocusOut:function(t){this._isFocusOutHandlerExecuting||this._focusOutHandler(t.event)}.bind(this)}},_renderFocusTarget:function(){this._focusTarget().attr("tabIndex",-1)},_updateFocusState:function(t,e){this.callBase(t,e),t.target===this._tabs._focusTarget().get(0)&&this._toggleFocusClass(e,this._focusTarget())},_focusOutHandler:function(t){this._isFocusOutHandlerExecuting=!0,this.callBase.apply(this,arguments),this._tabs._focusOutHandler(t),this._isFocusOutHandlerExecuting=!1},_setTabsOption:function(t,e){this._tabs&&this._tabs.option(t,e)},_visibilityChanged:function(t){t&&(this._tabs._dimensionChanged(),this._updateLayout())},registerKeyHandler:function(t,e){this.callBase(t,e),this._tabs&&this._tabs.registerKeyHandler(t,e)},repaint:function(){this.callBase(),this._tabs.repaint()},_optionChanged:function(t){var e=t.name,n=t.value,o=t.fullName;switch(e){case"dataSource":this.callBase(t);break;case"items":this._setTabsOption(e,this.option(e)),this._updateLayout(),this.option("repaintChangesOnly")||this._tabs.repaint(),this.callBase(t);break;case"width":this.callBase(t),this._tabs.repaint();break;case"selectedIndex":case"selectedItem":if(this._setTabsOption(o,n),this.callBase(t),!0===this.option("focusStateEnabled")){var r=this.option("selectedIndex"),a=this._itemElements().eq(r);this.option("focusedElement",(0,f.getPublicElement)(a))}break;case"itemHoldTimeout":case"focusStateEnabled":case"hoverStateEnabled":this._setTabsOption(o,n),this.callBase(t);break;case"scrollingEnabled":case"scrollByContent":case"showNavButtons":this._setTabsOption(o,n);break;case"focusedElement":var s=n?(0,i.default)(n).index():n,l=n?this._tabs._itemElements().eq(s):n;this._setTabsOption("focusedElement",(0,f.getPublicElement)(l)),this.callBase(t);break;case"itemTitleTemplate":this._setTabsOption("itemTemplate",this._getTemplateByOption("itemTitleTemplate"));break;case"onTitleClick":this._createTitleClickAction(),this._setTabsOption("onItemClick",this._titleClickAction.bind(this));break;case"onTitleHold":this._createTitleHoldAction(),this._setTabsOption("onItemHold",this._titleHoldAction.bind(this));break;case"onTitleRendered":this._createTitleRenderedAction(),this._setTabsOption("onItemRendered",this._titleRenderedAction.bind(this));break;case"loop":this._setTabsOption("loopItemFocus",n);break;case"badgeExpr":this._invalidate();break;default:this.callBase(t)}},_clean:function(){clearTimeout(this._resizeEventTimer),this.callBase()}});v.ItemClass=d.default,(0,l.default)("dxTabPanel",v),t.exports=v,t.exports.default=t.exports},function(t,e,n){"use strict";var i=c(n(8)),o=c(n(6)),r=n(4),a=n(0),s=c(n(5)),l=c(n(136)),u=c(n(69));function c(t){return t&&t.__esModule?t:{default:t}}var d=u.default.inherit({_getDefaultOptions:function(){return(0,a.extend)(this.callBase(),{focusStateEnabled:!1,noDataText:null})},_setOptionsByReference:function(){this.callBase(),(0,a.extend)(this._optionsByReference,{validationGroup:!0})},_init:function(){this.callBase(),this._initGroupRegistration()},_initGroupRegistration:function(){var t=this.$element(),e=this.option("validationGroup")||l.default.findGroup(t,this._modelByElement(t)),n=l.default.addGroup(e);this._unsubscribeGroup(),this._groupWasInit=!0,this._validationGroup=e,this.groupSubscription=this._groupValidationHandler.bind(this),n.on("validated",this.groupSubscription)},_unsubscribeGroup:function(){var t=l.default.getGroupConfig(this._validationGroup);t&&t.off("validated",this.groupSubscription)},_getOrderedItems:function(t,e){var n=[];return s.default.each(t,(function(t,i){var o=(0,r.grep)(e,(function(t){if(t.validator===i)return!0}));o.length&&(n=n.concat(o))})),n},_groupValidationHandler:function(t){var e=this,n=this._getOrderedItems(t.validators,s.default.map(t.brokenRules,(function(t){return{text:t.message,validator:t.validator,index:t.index}})));this.validators=t.validators,s.default.each(this.validators,(function(t,n){if(n._validationSummary!==e){var i=e._itemValidationHandler.bind(e);n.on("validated",i),n.on("disposing",(function(){n.off("validated",i),n._validationSummary=null,i=null})),n._validationSummary=e}})),this.option("items",n)},_itemValidationHandler:function(t){for(var e=t.isValid,n=t.validator,i=t.brokenRules,o=this.option("items"),a=!1,l=0,u=function(){var t=o[l];if(t.validator===n){var s=(0,r.grep)(i||[],(function(e){return e.index===t.index}))[0];if(e||!s)return o.splice(l,1),a=!0,"continue";s.message!==t.text&&(t.text=s.message,a=!0)}l++};l").html(e).appendTo(s.value());u=function(){n.remove()},l=new o(n,t)}(t),l.show()},e.hide=function(){return l?l.hide().done(c).promise():(new a).resolve()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getElementMaxHeightByWindow=void 0;var i,o=n(3),r=(i=o)&&i.__esModule?i:{default:i},a=n(10),s=n(2);e.getElementMaxHeightByWindow=function(t,e){var n,i=(0,a.getWindow)();if((0,s.isNumeric)(e))n=(0,r.default)(i).innerHeight()-e+(0,r.default)(i).scrollTop();else{var o=t.offset().top-(0,r.default)(i).scrollTop(),l=(0,r.default)(i).innerHeight()-o-t.outerHeight();n=Math.max(o,l)}return.9*n}},function(t,e,n){"use strict";var i=n(104);function o(t,e){for(var n=0;n0){var e=this.option("uploadChunk");t=e&&(0,u.isFunction)(e)?new W(this):new H(this)}else{var n=this.option("uploadFile");t=n&&(0,u.isFunction)(n)?new K(this):new G(this)}this._uploadStrategy=t}},{key:"_initFileInput",value:function(){var t=this;this._isCustomClickEvent=!1,this._$fileInput||(this._$fileInput=(0,i.default)("").attr("type","file"),a.default.on(this._$fileInput,"change",this._inputChangeHandler.bind(this)),a.default.on(this._$fileInput,"click",(function(e){return e.stopPropagation(),t.option("useNativeInputClick")||t._isCustomClickEvent}))),this._$fileInput.prop({multiple:this.option("multiple"),accept:this.option("accept"),tabIndex:-1})}},{key:"_inputChangeHandler",value:function(){if(!this._doPreventInputChange){var t=this._$fileInput.val().replace(/^.*\\/,""),e=this._$fileInput.prop("files");if(!e||e.length){var n=e?this._getFiles(e):[{name:t}];this._changeValue(n),"instantly"===this.option("uploadMode")&&this._uploadFiles()}}}},{key:"_shouldFileListBeExtended",value:function(){return"useForm"!==this.option("uploadMode")&&this.option("extendSelection")&&this.option("multiple")}},{key:"_removeDuplicates",value:function(t,e){for(var n=[],i=0;i")),this._$inputLabel.text(this.option("labelText"))}},{key:"_focusTarget",value:function(){return this.$element().find(".dx-fileuploader-button")}},{key:"_getSubmitElement",value:function(){return this._$fileInput}},{key:"_initMarkup",value:function(){M(B(n.prototype),"_initMarkup",this).call(this),this.$element().addClass("dx-fileuploader"),this._renderWrapper(),this._renderInputWrapper(),this._renderSelectButton(),this._renderInputContainer(),this._renderUploadButton(),this._preventRecreatingFiles=!0}},{key:"_render",value:function(){this._preventRecreatingFiles=!1,this._renderDragEvents(),this._renderFiles(),M(B(n.prototype),"_render",this).call(this)}},{key:"_createFileProgressBar",value:function(t){t.progressBar=this._createProgressBar(t.value.size),t.progressBar.$element().appendTo(t.$file),this._initStatusMessage(t),this._initCancelButton(t)}},{key:"_setStatusMessage",value:function(t,e){var n=this;setTimeout((function(){n.option("showFileList")&&t.$statusMessage&&(t.$statusMessage.text(n.option(e)),t.$statusMessage.css("display",""),t.progressBar.$element().remove())}),400)}},{key:"_createFiles",value:function(){var t=this,e=this.option("value");!this._files||0!==e.length&&this._shouldFileListBeExtended()||(this._preventFilesUploading(this._files),this._files=null),this._files||(this._files=[]),(0,c.each)(e.slice(this._files.length),(function(e,n){var i=t._createFile(n);t._validateFile(i),t._files.push(i)}))}},{key:"_preventFilesUploading",value:function(t){var e=this;t.forEach((function(t){return e._uploadStrategy.abortUpload(t)}))}},{key:"_validateFile",value:function(t){t.isValidFileExtension=this._validateFileExtension(t),t.isValidMinSize=this._validateMinFileSize(t),t.isValidMaxSize=this._validateMaxFileSize(t)}},{key:"_validateFileExtension",value:function(t){var e=this.option("allowedFileExtensions"),n=t.value.name.substring(t.value.name.lastIndexOf(".")).toLowerCase();if(0===e.length)return!0;for(var i=0;i0)||e<=n}},{key:"_validateMinFileSize",value:function(t){var e=t.value.size,n=this.option("minFileSize");return!(n>0)||e>=n}},{key:"_createUploadStartedAction",value:function(){this._uploadStartedAction=this._createActionByOption("onUploadStarted")}},{key:"_createUploadedAction",value:function(){this._uploadedAction=this._createActionByOption("onUploaded")}},{key:"_createProgressAction",value:function(){this._progressAction=this._createActionByOption("onProgress")}},{key:"_createUploadAbortedAction",value:function(){this._uploadAbortedAction=this._createActionByOption("onUploadAborted")}},{key:"_createUploadErrorAction",value:function(){this._uploadErrorAction=this._createActionByOption("onUploadError")}},{key:"_createFile",value:function(t){return{value:t,loadedSize:0,onProgress:(0,l.default)(),onAbort:(0,l.default)(),onLoad:(0,l.default)(),onError:(0,l.default)(),onLoadStart:(0,l.default)(),isValidFileExtension:!0,isValidMaxSize:!0,isValidMinSize:!0,isValid:function(){return this.isValidFileExtension&&this.isValidMaxSize&&this.isValidMinSize}}}},{key:"_renderFiles",value:function(){var t=this,e=this.option("value");this._$filesContainer?this._shouldFileListBeExtended()&&0!==e.length||this._$filesContainer.empty():this._$filesContainer=(0,i.default)("
").addClass("dx-fileuploader-files-container").appendTo(this._$content);var n=this.option("showFileList");n&&(0,c.each)(this._files,(function(e,n){n.$file||t._renderFile(n)})),this.$element().toggleClass("dx-fileuploader-show-file-list",n),this._toggleFileUploaderEmptyClassName(),this._updateFileNameMaxWidth(),this._$validationMessage&&this._$validationMessage.dxOverlay("instance").repaint()}},{key:"_renderFile",value:function(t){var e=t.value,n=(0,i.default)("
").addClass("dx-fileuploader-file-container").appendTo(this._$filesContainer);this._renderFileButtons(t,n),t.$file=(0,i.default)("
").addClass("dx-fileuploader-file").appendTo(n);var o=(0,i.default)("
").addClass("dx-fileuploader-file-info").appendTo(t.$file);t.$statusMessage=(0,i.default)("
").addClass("dx-fileuploader-file-status-message").appendTo(t.$file),(0,i.default)("
").addClass("dx-fileuploader-file-name").text(e.name).appendTo(o),(0,u.isDefined)(e.size)&&(0,i.default)("
").addClass("dx-fileuploader-file-size").text(this._getFileSize(e.size)).appendTo(o),t.isValid()?t.$statusMessage.text(this.option("readyToUploadMessage")):(t.isValidFileExtension||t.$statusMessage.append(this._createValidationElement("invalidFileExtensionMessage")),t.isValidMaxSize||t.$statusMessage.append(this._createValidationElement("invalidMaxFileSizeMessage")),t.isValidMinSize||t.$statusMessage.append(this._createValidationElement("invalidMinFileSizeMessage")),n.addClass("dx-fileuploader-invalid"))}},{key:"_createValidationElement",value:function(t){return(0,i.default)("").text(this.option(t))}},{key:"_updateFileNameMaxWidth",value:function(){var t=this.option("allowCanceling")&&"useForm"!==this.option("uploadMode")?1:0,e="useButtons"===this.option("uploadMode")?1:0,n=this._$filesContainer.find(".dx-fileuploader-file-container").first().width()||this._$filesContainer.width(),i=this._$filesContainer.find(".dx-fileuploader-button-container").eq(0).width()*(t+e),o=this._$filesContainer.find(".dx-fileuploader-file-size").eq(0),r=o.text();o.text("1000 Mb");var a=o.width();o.text(r),this._$filesContainer.find(".dx-fileuploader-file-name").css("maxWidth",n-i-a)}},{key:"_renderFileButtons",value:function(t,e){var n=this._getCancelButton(t);n&&e.append(n);var i=this._getUploadButton(t);i&&e.append(i)}},{key:"_getCancelButton",value:function(t){var e=this;return"useForm"===this.option("uploadMode")?null:(t.cancelButton=this._createComponent((0,i.default)("
").addClass("dx-fileuploader-button dx-fileuploader-cancel-button"),g.default,{onClick:function(){return e._removeFile(t)},icon:"close",visible:this.option("allowCanceling"),integrationOptions:{}}),(0,i.default)("
").addClass("dx-fileuploader-button-container").append(t.cancelButton.$element()))}},{key:"_getUploadButton",value:function(t){var e=this;return t.isValid()&&"useButtons"===this.option("uploadMode")?(t.uploadButton=this._createComponent((0,i.default)("
").addClass("dx-fileuploader-button dx-fileuploader-upload-button"),g.default,{onClick:function(){return e._uploadFile(t)},icon:"upload"}),t.onLoadStart.add((function(){return t.uploadButton.$element().remove()})),(0,i.default)("
").addClass("dx-fileuploader-button-container").append(t.uploadButton.$element())):null}},{key:"_removeFile",value:function(t){t.$file.parent().remove(),this._files.splice((0,h.inArray)(t,this._files),1);var e=this.option("value").slice();e.splice((0,h.inArray)(t.value,e),1),this._preventRecreatingFiles=!0,this.option("value",e),this._preventRecreatingFiles=!1,this._toggleFileUploaderEmptyClassName(),this._doPreventInputChange=!0,this._$fileInput.val(""),this._doPreventInputChange=!1}},{key:"_toggleFileUploaderEmptyClassName",value:function(){this.$element().toggleClass("dx-fileuploader-empty",!this._files.length||this._hasInvalidFile(this._files))}},{key:"_hasInvalidFile",value:function(t){for(var e=0;e=1024;)t/=1024,e++;return Math.round(t)+" "+n[e]}},{key:"_renderSelectButton",value:function(){var t=(0,i.default)("
").addClass("dx-fileuploader-button").appendTo(this._$inputWrapper);this._selectButton=this._createComponent(t,g.default,{text:this.option("selectButtonText"),focusStateEnabled:!1,integrationOptions:{}}),"desktop"===y.default.real().deviceType?this._selectButton.option("onClick",this._selectButtonClickHandler.bind(this)):(a.default.off(t,"click"),a.default.on(t,"click",this._selectButtonClickHandler.bind(this)))}},{key:"_selectButtonClickHandler",value:function(){if(!this.option("useNativeInputClick")){if(this.option("disabled"))return!1;this._isCustomClickEvent=!0,a.default.trigger(this._$fileInput,"click"),this._isCustomClickEvent=!1}}},{key:"_renderUploadButton",value:function(){if("useButtons"===this.option("uploadMode")){var t=(0,i.default)("
").addClass("dx-fileuploader-button").addClass("dx-fileuploader-upload-button").appendTo(this._$content);this._uploadButton=this._createComponent(t,g.default,{text:this.option("uploadButtonText"),onClick:this._uploadButtonClickHandler.bind(this),type:this.option("_uploadButtonType"),integrationOptions:{}})}}},{key:"_uploadButtonClickHandler",value:function(){this._uploadFiles()}},{key:"_shouldDragOverBeRendered",value:function(){return"useForm"!==this.option("uploadMode")||this.option("nativeDropSupported")}},{key:"_renderInputContainer",value:function(){this._$inputContainer=(0,i.default)("
").addClass("dx-fileuploader-input-container").appendTo(this._$inputWrapper),this._shouldDragOverBeRendered()||this._$inputContainer.css("display","none"),this._$fileInput.addClass("dx-fileuploader-input"),this._renderInput();var t="dx-fileuploader-input-label-".concat(new o.default);this._$inputLabel.attr("id",t).addClass("dx-fileuploader-input-label").appendTo(this._$inputContainer),this.setAria("labelledby",t,this._$fileInput)}},{key:"_renderInput",value:function(){this.option("useNativeInputClick")?this._selectButton.option("template",this._selectButtonInputTemplate.bind(this)):(this._$fileInput.appendTo(this._$inputContainer),this._selectButton.option("template","content")),this._applyInputAttributes(this.option("inputAttr"))}},{key:"_selectButtonInputTemplate",value:function(t,e){var n=(0,i.default)(e),o=(0,i.default)("").addClass("dx-button-text").text(t.text);return n.append(o).append(this._$fileInput),n}},{key:"_renderInputWrapper",value:function(){this._$inputWrapper=(0,i.default)("
").addClass("dx-fileuploader-input-wrapper").appendTo(this._$content)}},{key:"_renderDragEvents",value:function(){a.default.off(this._$inputWrapper,"."+this.NAME),this._shouldDragOverBeRendered()&&(this._dragEventsTargets=[],a.default.on(this._$inputWrapper,b.addNamespace("dragenter",this.NAME),this._dragEnterHandler.bind(this)),a.default.on(this._$inputWrapper,b.addNamespace("dragover",this.NAME),this._dragOverHandler.bind(this)),a.default.on(this._$inputWrapper,b.addNamespace("dragleave",this.NAME),this._dragLeaveHandler.bind(this)),a.default.on(this._$inputWrapper,b.addNamespace("drop",this.NAME),this._dropHandler.bind(this)))}},{key:"_applyInputAttributes",value:function(t){this._$fileInput.attr(t)}},{key:"_useInputForDrop",value:function(){return this.option("nativeDropSupported")&&"useForm"===this.option("uploadMode")}},{key:"_dragEnterHandler",value:function(t){if(this.option("disabled"))return!1;this._useInputForDrop()||t.preventDefault(),this._updateEventTargets(t),this.$element().addClass("dx-fileuploader-dragover")}},{key:"_dragOverHandler",value:function(t){this._useInputForDrop()||t.preventDefault(),t.originalEvent.dataTransfer.dropEffect="copy"}},{key:"_dragLeaveHandler",value:function(t){this._useInputForDrop()||t.preventDefault(),this._updateEventTargets(t),this._dragEventsTargets.length||this.$element().removeClass("dx-fileuploader-dragover")}},{key:"_updateEventTargets",value:function(t){var e=this._dragEventsTargets.indexOf(t.target),n=-1!==e;"dragenter"===t.type?!n&&this._dragEventsTargets.push(t.target):n&&this._dragEventsTargets.splice(e,1)}},{key:"_dropHandler",value:function(t){if(this._dragEventsTargets=[],this.$element().removeClass("dx-fileuploader-dragover"),!this._useInputForDrop()){t.preventDefault();var e=t.originalEvent.dataTransfer.files,n=this._getFiles(e);!this.option("multiple")&&n.length>1||(this._changeValue(this._filterFiles(n)),"instantly"===this.option("uploadMode")&&this._uploadFiles())}}},{key:"_filterFiles",value:function(t){if(!t.length)return t;var e=this.option("accept");if(!e.length)return t;for(var n=[],i=this._getAllowedFileTypes(e),o=0,r=t.length;o").addClass("dx-fileuploader-wrapper").appendTo(this.$element()),e=(0,i.default)("
").addClass("dx-fileuploader-container").appendTo(t);this._$content=(0,i.default)("
").addClass("dx-fileuploader-content").appendTo(e)}},{key:"_clean",value:function(){this._$fileInput.detach(),delete this._$filesContainer,this._files&&this._files.forEach((function(t){t.$file=null,t.$statusMessage=null})),M(B(n.prototype),"_clean",this).call(this)}},{key:"_uploadFiles",value:function(){var t=this;L()&&(0,c.each)(this._files,(function(e,n){return t._uploadFile(n)}))}},{key:"_uploadFile",value:function(t){this._uploadStrategy.upload(t)}},{key:"_updateProgressBar",value:function(t,e){t.progressBar&&t.progressBar.option({value:e.loaded,showStatus:!0}),this._progressAction({file:t.value,segmentSize:e.currentSegmentSize,bytesLoaded:e.loaded,bytesTotal:e.total,event:e.event,request:t.request})}},{key:"_updateTotalProgress",value:function(t,e){var n=t?this._getProgressValue(e/t):0;this.option("progress",n),this._setLoadedSize(e)}},{key:"_getProgressValue",value:function(t){return Math.floor(100*t)}},{key:"_initStatusMessage",value:function(t){t.$statusMessage.css("display","none")}},{key:"_initCancelButton",value:function(t){var e=this;t.cancelButton.option("onClick",(function(){e._preventFilesUploading([t]),e._removeFile(t)}));var n=function(){setTimeout((function(){t.cancelButton.option({visible:!1})}),400)};t.onLoad.add(n),t.onError.add(n)}},{key:"_createProgressBar",value:function(t){var e=this;return this._createComponent((0,i.default)("
"),_.default,{value:void 0,min:0,max:t,statusFormat:function(t){return e._getProgressValue(t)+"%"},showStatus:!1,statusPosition:"right"})}},{key:"_getTotalFilesSize",value:function(){var t=this;return this._totalFilesSize||(this._totalFilesSize=0,(0,c.each)(this._files,(function(e,n){t._totalFilesSize+=n.value.size}))),this._totalFilesSize}},{key:"_getTotalLoadedFilesSize",value:function(){var t=this;return this._totalLoadedFilesSize||(this._totalLoadedFilesSize=0,(0,c.each)(this._files,(function(e,n){t._totalLoadedFilesSize+=n.loadedSize}))),this._totalLoadedFilesSize}},{key:"_setLoadedSize",value:function(t){this._totalLoadedFilesSize=t}},{key:"_recalculateProgress",value:function(){this._totalFilesSize=0,this._totalLoadedFilesSize=0,this._updateTotalProgress(this._getTotalFilesSize(),this._getTotalLoadedFilesSize())}},{key:"_getValidationMessageTarget",value:function(){return this._$inputWrapper}},{key:"_optionChanged",value:function(t){var e=t.value;switch(t.name){case"height":case"width":this._updateFileNameMaxWidth(),M(B(n.prototype),"_optionChanged",this).call(this,t);break;case"value":!e.length&&this._$fileInput.val(""),this._preventRecreatingFiles||(this._createFiles(),this._renderFiles()),this._recalculateProgress(),M(B(n.prototype),"_optionChanged",this).call(this,t);break;case"name":this._initFileInput(),M(B(n.prototype),"_optionChanged",this).call(this,t);break;case"accept":this._initFileInput();break;case"multiple":this._initFileInput(),t.value||this.reset();break;case"selectButtonText":this._selectButton.option("text",e);break;case"uploadButtonText":this._uploadButton&&this._uploadButton.option("text",e);break;case"_uploadButtonType":this._uploadButton&&this._uploadButton.option("type",e);break;case"maxFileSize":case"minFileSize":case"allowedFileExtensions":case"invalidFileExtensionMessage":case"invalidMaxFileSizeMessage":case"invalidMinFileSizeMessage":case"readyToUploadMessage":case"uploadedMessage":case"uploadFailedMessage":this._invalidate();break;case"labelText":this._$inputLabel.text(e);break;case"showFileList":this._preventRecreatingFiles||this._renderFiles();break;case"uploadFile":case"uploadChunk":case"chunkSize":this._setUploadStrategy();break;case"abortUpload":case"uploadUrl":case"progress":case"uploadMethod":case"uploadHeaders":case"extendSelection":break;case"allowCanceling":case"uploadMode":this.reset(),this._invalidate();break;case"onUploadStarted":this._createUploadStartedAction();break;case"onUploaded":this._createUploadedAction();break;case"onProgress":this._createProgressAction();break;case"onUploadError":this._createUploadErrorAction();break;case"onUploadAborted":this._createUploadAbortedAction();break;case"useNativeInputClick":this._renderInput();break;case"useDragOver":this._renderDragEvents();break;case"nativeDropSupported":this._invalidate();break;case"inputAttr":this._applyInputAttributes(e);break;default:M(B(n.prototype),"_optionChanged",this).call(this,t)}}},{key:"reset",value:function(){this.option("value",[])}}]),n}(m.default),V=function(){function t(e,n){T(this,t),this.file=e,this.chunkSize=n,this.index=0}return O(t,[{key:"read",value:function(){if(!this.file)return null;var t=this.createBlobResult(this.file,this.index,this.chunkSize);return t.isCompleted&&(this.file=null),this.index++,t}},{key:"createBlobResult",value:function(t,e,n){var i=e*n;return{blob:this.sliceFile(t,i,n),index:e,isCompleted:i+n>=t.size}}},{key:"sliceFile",value:function(t,e,n){return t.slice?t.slice(e,e+n):t.webkitSlice?t.webkitSlice(e,e+n):null}}]),t}(),z=function(){function t(e){T(this,t),this.fileUploader=e}return O(t,[{key:"upload",value:function(t){t.isValid()&&!t.uploadStarted&&(this._prepareFileBeforeUpload(t),this._uploadCore(t))}},{key:"abortUpload",value:function(t){var e=this;if(!(t._isError||t._isLoaded||t.isAborted)&&(t.request&&t.request.abort(),t.isAborted=!0,this._isCustomAbortUpload())){var n=this.fileUploader.option("abortUpload"),i=this._createAbortUploadArgument(t),o=null;try{var r=n(t.value,i);o=(0,f.fromPromise)(r)}catch(a){o=(new f.Deferred).reject(a).promise()}o.done((function(){return t.onAbort.fire()})).fail((function(n){return e._handleFileError(t,n)}))}}},{key:"_createAbortUploadArgument",value:function(t){}},{key:"_uploadCore",value:function(t){}},{key:"_isCustomAbortUpload",value:function(){var t=this.fileUploader.option("abortUpload");return t&&(0,u.isFunction)(t)}},{key:"_handleFileError",value:function(t,e){t._isError=!0,t.onError.fire(e)}},{key:"_prepareFileBeforeUpload",value:function(t){t.$file&&this.fileUploader._createFileProgressBar(t),t.onLoadStart.add(this._onUploadStarted.bind(this,t)),t.onLoad.add(this._onLoadedHandler.bind(this,t)),t.onError.add(this._onErrorHandler.bind(this,t)),t.onAbort.add(this._onAbortHandler.bind(this,t)),t.onProgress.add(this._onProgressHandler.bind(this,t))}},{key:"_isStatusError",value:function(t){return 400<=t&&t<500||500<=t&&t<600}},{key:"_onUploadStarted",value:function(t,e){t.uploadStarted=!0,this.fileUploader._uploadStartedAction({file:t.value,event:e,request:t.request})}},{key:"_onAbortHandler",value:function(t,e){this.fileUploader._uploadAbortedAction({file:t.value,event:e,request:t.request})}},{key:"_onErrorHandler",value:function(t,e){this.fileUploader._setStatusMessage(t,"uploadFailedMessage"),this.fileUploader._uploadErrorAction({file:t.value,event:void 0,request:t.request,error:e})}},{key:"_onLoadedHandler",value:function(t,e){t._isLoaded=!0,this.fileUploader._setStatusMessage(t,"uploadedMessage"),this.fileUploader._uploadedAction({file:t.value,event:e,request:t.request})}},{key:"_onProgressHandler",value:function(t,e){if(t){var n=this.fileUploader._getTotalFilesSize(),i=this.fileUploader._getTotalLoadedFilesSize(),o=Math.min(e.loaded,t.value.size),r=o-t.loadedSize;t.loadedSize=o,this.fileUploader._updateTotalProgress(n,i+r),this.fileUploader._updateProgressBar(t,this._getLoadedData(o,e.total,r,e))}}},{key:"_getLoadedData",value:function(t,e,n,i){return{loaded:t,total:e,currentSegmentSize:n}}}]),t}(),j=function(t){P(n,t);var e=A(n);function n(t){var i;return T(this,n),(i=e.call(this,t)).chunkSize=i.fileUploader.option("chunkSize"),i}return O(n,[{key:"_uploadCore",value:function(t){var e=t.value,n={name:e.name,loadedBytes:0,type:e.type,blobReader:new V(e,this.chunkSize),guid:new o.default,fileSize:e.size,count:Math.ceil(e.size/this.chunkSize),customData:{}};t.chunksData=n,this._sendChunk(t,n)}},{key:"_sendChunk",value:function(t,e){var n=this,i=e.blobReader.read();e.currentChunk=i,i&&this._sendChunkCore(t,e,i).done((function(){t.isAborted||(e.loadedBytes+=i.blob.size,t.onProgress.fire({loaded:e.loadedBytes,total:t.value.size}),i.isCompleted&&t.onLoad.fire(),setTimeout((function(){return n._sendChunk(t,e)})))})).fail((function(e){n._shouldHandleError(e)&&n._handleFileError(t,e)}))}},{key:"_sendChunkCore",value:function(t,e,n){}},{key:"_shouldHandleError",value:function(t){}},{key:"_tryRaiseStartLoad",value:function(t){t.isStartLoad||(t.isStartLoad=!0,t.onLoadStart.fire())}},{key:"_getEvent",value:function(t){return null}}]),n}(z),H=function(t){P(n,t);var e=A(n);function n(){return T(this,n),e.apply(this,arguments)}return O(n,[{key:"_sendChunkCore",value:function(t,e,n){var i=this;return p.default.sendRequest({url:this.fileUploader.option("uploadUrl"),method:this.fileUploader.option("uploadMethod"),headers:this.fileUploader.option("uploadHeaders"),beforeSend:function(e){t.request=e},upload:{onloadstart:function(){return i._tryRaiseStartLoad(t)},onabort:function(){return t.onAbort.fire()}},data:this._createFormData({fileName:e.name,blobName:this.fileUploader.option("name"),blob:n.blob,index:n.index,count:e.count,type:e.type,guid:e.guid,size:e.fileSize})})}},{key:"_shouldHandleError",value:function(t){return this._isStatusError(t.status)}},{key:"_createFormData",value:function(t){var e=new N.FormData;return e.append(t.blobName,t.blob),e.append("chunkMetadata",JSON.stringify({FileName:t.fileName,Index:t.index,TotalCount:t.count,FileSize:t.size,FileType:t.type,FileGuid:t.guid})),e}}]),n}(j),W=function(t){P(n,t);var e=A(n);function n(){return T(this,n),e.apply(this,arguments)}return O(n,[{key:"_sendChunkCore",value:function(t,e){this._tryRaiseStartLoad(t);var n=this._createChunksInfo(e),i=this.fileUploader.option("uploadChunk");try{var o=i(t.value,n);return(0,f.fromPromise)(o)}catch(r){return(new f.Deferred).reject(r).promise()}}},{key:"_createAbortUploadArgument",value:function(t){return this._createChunksInfo(t.chunksData)}},{key:"_shouldHandleError",value:function(t){return!0}},{key:"_createChunksInfo",value:function(t){return{bytesUploaded:t.loadedBytes,chunkCount:t.count,customData:t.customData,chunkBlob:t.currentChunk.blob,chunkIndex:t.currentChunk.index}}}]),n}(j),U=function(t){P(n,t);var e=A(n);function n(){return T(this,n),e.apply(this,arguments)}return O(n,[{key:"_uploadCore",value:function(t){var e=this;t.loadedSize=0,this._uploadFile(t).done((function(){t.isAborted||t.onLoad.fire()})).fail((function(n){e._shouldHandleError(t,n)&&e._handleFileError(t,n)}))}},{key:"_uploadFile",value:function(t){}},{key:"_shouldHandleError",value:function(t,e){}},{key:"_handleProgress",value:function(t,e){t._isError||(t._isProgressStarted=!0,t.onProgress.fire(e))}},{key:"_getLoadedData",value:function(t,e,i,o){var r=M(B(n.prototype),"_getLoadedData",this).call(this,t,e,i,o);return r.event=o,r}}]),n}(z),G=function(t){P(n,t);var e=A(n);function n(){return T(this,n),e.apply(this,arguments)}return O(n,[{key:"_uploadFile",value:function(t){var e=this;return p.default.sendRequest({url:this.fileUploader.option("uploadUrl"),method:this.fileUploader.option("uploadMethod"),headers:this.fileUploader.option("uploadHeaders"),beforeSend:function(e){t.request=e},upload:{onprogress:function(n){return e._handleProgress(t,n)},onloadstart:function(){return t.onLoadStart.fire()},onabort:function(){return t.onAbort.fire()}},data:this._createFormData(this.fileUploader.option("name"),t.value)})}},{key:"_shouldHandleError",value:function(t,e){return this._isStatusError(e.status)||!t._isProgressStarted}},{key:"_createFormData",value:function(t,e){var n=new N.FormData;return n.append(t,e,e.name),n}}]),n}(U),K=function(t){P(n,t);var e=A(n);function n(){return T(this,n),e.apply(this,arguments)}return O(n,[{key:"_uploadFile",value:function(t){var e=this;t.onLoadStart.fire();var n=this.fileUploader.option("uploadFile");try{var i=n(t.value,(function(n){var i={loaded:n,total:t.size};e._handleProgress(t,i)}));return(0,f.fromPromise)(i)}catch(o){return(new f.Deferred).reject(o).promise()}}},{key:"_shouldHandleError",value:function(t,e){return!0}}]),n}(U);(0,s.default)("dxFileUploader",F),t.exports=F,t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(3),o=n(477),r=n(0).extend,a=n(2).isFunction,s=n(8),l=o.inherit({_getDefaultOptions:function(){return r(this.callBase(),{value:0,statusFormat:function(t){return"Progress: "+Math.round(100*t)+"%"},showStatus:!0,onComplete:null,activeStateEnabled:!1,statusPosition:"bottom left",_animatingSegmentCount:0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(t){return"android"===t.platform},options:{_animatingSegmentCount:2}}])},_initMarkup:function(){this._renderStatus(),this._createCompleteAction(),this.callBase(),this.$element().addClass("dx-progressbar"),this._$wrapper.addClass("dx-progressbar-wrapper"),this._$bar.addClass("dx-progressbar-container"),this.setAria("role","progressbar"),i("
").addClass("dx-progressbar-range-container").appendTo(this._$wrapper).append(this._$bar),this._$range.addClass("dx-progressbar-range"),this._toggleStatus(this.option("showStatus"))},_createCompleteAction:function(){this._completeAction=this._createActionByOption("onComplete")},_renderStatus:function(){this._$status=i("
").addClass("dx-progressbar-status")},_renderIndeterminateState:function(){this._$segmentContainer=i("
").addClass("dx-progressbar-animating-container");for(var t=this.option("_animatingSegmentCount"),e=0;e").addClass("dx-progressbar-animating-segment").addClass("dx-progressbar-animating-segment-"+(e+1)).appendTo(this._$segmentContainer);this._$segmentContainer.appendTo(this._$wrapper)},_toggleStatus:function(t){var e=this.option("statusPosition").split(" ");t?"top"===e[0]||"left"===e[0]?this._$status.prependTo(this._$wrapper):this._$status.appendTo(this._$wrapper):this._$status.detach(),this._togglePositionClass()},_togglePositionClass:function(){var t=this.option("statusPosition").split(" ");this._$wrapper.removeClass("dx-position-top-left dx-position-top-right dx-position-bottom-left dx-position-bottom-right dx-position-left dx-position-right");var e="dx-position-"+t[0];t[1]&&(e+="-"+t[1]),this._$wrapper.addClass(e)},_toggleIndeterminateState:function(t){t?(this._renderIndeterminateState(),this._$bar.toggle(!1)):(this._$bar.toggle(!0),this._$segmentContainer.remove(),delete this._$segmentContainer)},_renderValue:function(){var t=this.option("value"),e=this.option("max");t||0===t?(this._$segmentContainer&&this._toggleIndeterminateState(!1),t===e&&this._completeAction(),this.callBase(),this._setStatus()):this._toggleIndeterminateState(!0)},_setStatus:function(){var t=this.option("statusFormat"),e=(t=a(t)?t.bind(this):function(t){return t})(this._currentRatio,this.option("value"));this._$status.text(e)},_dispose:function(){this._$status.remove(),this.callBase()},_optionChanged:function(t){switch(t.name){case"statusFormat":this._setStatus();break;case"showStatus":this._toggleStatus(t.value);break;case"statusPosition":this._toggleStatus(this.option("showStatus"));break;case"onComplete":this._createCompleteAction();break;case"_animatingSegmentCount":break;default:this.callBase(t)}}});s("dxProgressBar",l),t.exports=l,t.exports.default=t.exports},function(t,e,n){"use strict";var i=b(n(3)),o=b(n(6)),r=b(n(2)),a=n(17),s=b(n(8)),l=n(0),u=n(24),c=b(n(20)),d=n(98),h=n(10),f=b(n(869)),p=b(n(870)),m=b(n(871)),g=n(239),_=n(25),v=b(n(47)),y=n(7);function b(t){return t&&t.__esModule?t:{default:t}}var w=c.default.inherit({_getDefaultOptions:function(){return(0,l.extend)(this.callBase(),{position:"left",opened:!1,minSize:null,maxSize:null,shading:!1,template:"panel",openedStateMode:"shrink",revealMode:"slide",animationEnabled:!0,animationDuration:400,closeOnOutsideClick:!1,contentTemplate:"content",target:void 0})},_setDeprecatedOptions:function(){this.callBase(),(0,l.extend)(this._deprecatedOptions,{target:{since:"20.1",message:"Functionality associated with this option is not intended for the Drawer widget."}})},_init:function(){this.callBase(),this._initStrategy(),this.$element().addClass("dx-drawer"),this._animations=[],this._whenAnimationCompleted=void 0,this._whenPanelContentRendered=void 0,this._whenPanelContentRefreshed=void 0,this._$wrapper=(0,i.default)("
").addClass("dx-drawer-wrapper"),this._$viewContentWrapper=(0,i.default)("
").addClass("dx-drawer-content"),this._$wrapper.append(this._$viewContentWrapper),this.$element().append(this._$wrapper)},_initStrategy:function(){switch(this.option("openedStateMode")){case"push":this._strategy=new f.default(this);break;case"shrink":this._strategy=new p.default(this);break;case"overlap":this._strategy=new m.default(this);break;default:this._strategy=new f.default(this)}},_getAnonymousTemplateName:function(){return"content"},_initTemplates:function(){var t={};t.panel=new d.EmptyTemplate,t.content=new d.EmptyTemplate,this._templateManager.addDefaultTemplates(t),this.callBase()},_viewContentWrapperClickHandler:function(t){var e=this.option("closeOnOutsideClick");r.default.isFunction(e)&&(e=e(t)),e&&this.option("opened")&&(this.stopAnimations(),this.option("shading")&&t.preventDefault(),this.hide())},_initMarkup:function(){this.callBase(),this._toggleOpenedStateClass(this.option("opened")),this._renderPanelContentWrapper(),this._refreshOpenedStateModeClass(),this._refreshRevealModeClass(),this._renderShader(),this._whenPanelContentRendered=new y.Deferred,this._strategy.renderPanelContent(this._whenPanelContentRendered),this._renderViewContent(),o.default.off(this._$viewContentWrapper,_.name),o.default.on(this._$viewContentWrapper,_.name,this._viewContentWrapperClickHandler.bind(this)),this._refreshPositionClass(),this._refreshWrapperChildrenOrder()},_render:function(){var t=this;this._initMinMaxSize(),this.callBase(),this._whenPanelContentRendered.always((function(){t._initMinMaxSize(),t._strategy.refreshPanelElementSize("slide"===t.option("revealMode")||!t.isHorizontalDirection()),t._renderPosition(t.option("opened"),!1)}))},_renderPanelContentWrapper:function(){this._$panelContentWrapper=(0,i.default)("
").addClass("dx-drawer-panel-content"),this._$wrapper.append(this._$panelContentWrapper)},_refreshOpenedStateModeClass:function(t){t&&this.$element().removeClass("dx-drawer-"+t),this.$element().addClass("dx-drawer-"+this.option("openedStateMode"))},_refreshPositionClass:function(t){t&&this.$element().removeClass("dx-drawer-"+t),this.$element().addClass("dx-drawer-"+this.calcTargetPosition())},_refreshWrapperChildrenOrder:function(){var t=this.calcTargetPosition();this._strategy.isViewContentFirst(t,this.option("rtlEnabled"))?this._$wrapper.prepend(this._$viewContentWrapper):this._$wrapper.prepend(this._$panelContentWrapper)},_refreshRevealModeClass:function(t){t&&this.$element().removeClass("dx-drawer-"+t),this.$element().addClass("dx-drawer-"+this.option("revealMode"))},_renderViewContent:function(){var t=this.option("contentTemplate"),e=this._getTemplate(t);if(e){var n=e.render({container:this.viewContent(),noModel:!0,transclude:this._templateManager.anonymousTemplateName===t});n.hasClass("ng-scope")&&(0,i.default)(this._$viewContentWrapper).children().not(".".concat("dx-drawer-shader")).replaceWith(n)}},_renderShader:function(){this._$shader=this._$shader||(0,i.default)("
").addClass("dx-drawer-shader"),this._$shader.appendTo(this.viewContent()),this._toggleShaderVisibility(this.option("opened"))},_initSize:function(){this._initMinMaxSize()},_initMinMaxSize:function(){var t=this.isHorizontalDirection()?this.getRealPanelWidth():this.getRealPanelHeight();this._maxSize=this.option("maxSize")||t,this._minSize=this.option("minSize")||0},calcTargetPosition:function(){var t=this.option("position"),e=this.option("rtlEnabled"),n=t;return"before"===t?n=e?"right":"left":"after"===t&&(n=e?"left":"right"),n},getOverlayTarget:function(){return this._options.silent("target")||this._$wrapper},getOverlay:function(){return this._overlay},getMaxSize:function(){return this._maxSize},getMinSize:function(){return this._minSize},getRealPanelWidth:function(){return(0,h.hasWindow)()?r.default.isDefined(this.option("templateSize"))?this.option("templateSize"):this.getElementWidth(this._strategy.getPanelContent()):0},getElementWidth:function(t){var e=t.children();return e.length?(0,u.getBoundingRect)(e.eq(0).get(0)).width:(0,u.getBoundingRect)(t.get(0)).width},getRealPanelHeight:function(){return(0,h.hasWindow)()?r.default.isDefined(this.option("templateSize"))?this.option("templateSize"):this.getElementHeight(this._strategy.getPanelContent()):0},getElementHeight:function(t){var e=t.children();return e.length?(0,u.getBoundingRect)(e.eq(0).get(0)).height:(0,u.getBoundingRect)(t.get(0)).height},isHorizontalDirection:function(){var t=this.calcTargetPosition();return"left"===t||"right"===t},stopAnimations:function(t){v.default.stop(this._$shader,t),v.default.stop((0,i.default)(this.content()),t),v.default.stop((0,i.default)(this.viewContent()),t);var e=this.getOverlay();e&&v.default.stop((0,i.default)(e.$content()),t)},setZIndex:function(t){this._$shader.css("zIndex",t-1),this._$panelContentWrapper.css("zIndex",t)},resizeContent:function(){this.resizeViewContent},resizeViewContent:function(){(0,a.triggerResizeEvent)(this.viewContent())},_isInvertedPosition:function(){var t=this.calcTargetPosition();return"right"===t||"bottom"===t},_renderPosition:function(t,e,n){this.stopAnimations(n),this._animations=[],(0,h.hasWindow)()&&(e=r.default.isDefined(e)?e&&this.option("animationEnabled"):this.option("animationEnabled"),t&&this._toggleShaderVisibility(t),this._strategy.renderPosition(t,e),this._strategy.renderShaderVisibility(t,e,this.option("animationDuration")))},_animationCompleteHandler:function(){this.resizeViewContent(),this._whenAnimationCompleted&&(this._whenAnimationCompleted.resolve(),this._animations=[])},_getPositionCorrection:function(){return this._isInvertedPosition()?-1:1},_dispose:function(){g.animation.complete((0,i.default)(this.viewContent())),this.callBase()},_visibilityChanged:function(t){t&&this._dimensionChanged()},_dimensionChanged:function(){this._initMinMaxSize(),this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!1)},_toggleShaderVisibility:function(t){this.option("shading")?(this._$shader.toggleClass("dx-state-invisible",!t),this._$shader.css("visibility",t?"visible":"hidden")):this._$shader.toggleClass("dx-state-invisible",!0)},_toggleOpenedStateClass:function(t){this.$element().toggleClass("dx-drawer-opened",t)},_refreshPanel:function(){var t=this;(0,i.default)(this.viewContent()).css("paddingLeft",0),(0,i.default)(this.viewContent()).css("left",0),(0,i.default)(this.viewContent()).css("transform","translate(0px, 0px)"),this._removePanelContentWrapper(),this._removeOverlay(),this._renderPanelContentWrapper(),this._refreshWrapperChildrenOrder(),this._whenPanelContentRefreshed=new y.Deferred,this._strategy.renderPanelContent(this._whenPanelContentRefreshed),(0,h.hasWindow)()&&this._whenPanelContentRefreshed.always((function(){t._strategy.refreshPanelElementSize("slide"===t.option("revealMode")),t._renderPosition(t.option("opened"),!1,!0)}))},_clean:function(){this._cleanFocusState(),this._removePanelContentWrapper(),this._removeOverlay()},_removePanelContentWrapper:function(){this._$panelContentWrapper&&this._$panelContentWrapper.remove()},_removeOverlay:function(){this._overlay&&(this._overlay.dispose(),delete this._overlay,delete this._$panelContentWrapper)},_optionChanged:function(t){switch(t.name){case"width":this.callBase(t),this._dimensionChanged();break;case"opened":this._renderPosition(t.value),this._toggleOpenedStateClass(t.value);break;case"position":this._refreshPositionClass(t.previousValue),this._refreshWrapperChildrenOrder(),this._invalidate();break;case"contentTemplate":case"template":this._invalidate();break;case"openedStateMode":case"target":this._initStrategy(),this._refreshOpenedStateModeClass(t.previousValue),this._refreshPanel();break;case"minSize":case"maxSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!1);break;case"revealMode":this._refreshRevealModeClass(t.previousValue),this._refreshPanel();break;case"shading":this._toggleShaderVisibility(this.option("opened"));break;case"animationEnabled":case"animationDuration":case"closeOnOutsideClick":break;default:this.callBase(t)}},content:function(){return(0,a.getPublicElement)(this._$panelContentWrapper)},viewContent:function(){return(0,a.getPublicElement)(this._$viewContentWrapper)},show:function(){return this.toggle(!0)},hide:function(){return this.toggle(!1)},toggle:function(t){var e=void 0===t?!this.option("opened"):t;return this._whenAnimationCompleted=new y.Deferred,this.option("opened",e),this._whenAnimationCompleted.promise()}});(0,s.default)("dxDrawer",w),t.exports=w},function(t,e,n){"use strict";var i=n(5),o=function(t){return t.replace(/\//g,"//")},r=function(){var t="";return(0,i.each)(arguments,(function(e,n){n&&(t&&(t+="/"),t+=n)})),t};t.exports.getFileExtension=function(t){var e=t.lastIndexOf(".");return-1!==e?t.substr(e):""},t.exports.getName=function(t){var e=t.lastIndexOf("/");return-1!==e?t.substr(e+"/".length):t},t.exports.getParentPath=function(t){var e=t.lastIndexOf("/");return-1!==e?t.substr(0,e):""},t.exports.getPathParts=function(t,e){if(!t||"/"===t)return[];for(var n=[],i="",a=0;a").addClass("dx-filemanager-dialog-popup").appendTo(this.$element());e.popupCssClass&&n.addClass(e.popupCssClass),this._popup=this._createComponent(n,s.default,{showTitle:!0,title:e.title,visible:!1,closeOnOutsideClick:!0,contentTemplate:this._createContentTemplate.bind(this),toolbarItems:[{widget:"dxButton",toolbar:"bottom",location:"after",options:{text:e.buttonText,onClick:this._applyDialogChanges.bind(this)}},{widget:"dxButton",toolbar:"bottom",location:"after",options:{text:r.default.format("dxFileManager-dialogButtonCancel"),onClick:this._closeDialog.bind(this)}}],onInitialized:function(e){e.component.registerKeyHandler("enter",t._applyDialogChanges.bind(t))},onHidden:this._onPopupHidden.bind(this),onShown:this._onPopupShown.bind(this)})}},{key:"show",value:function(){this._dialogResult=null,this._popup.show()}},{key:"_getDialogOptions",value:function(){return{title:"Title",buttonText:"ButtonText",contentCssClass:"",popupCssClass:""}}},{key:"_createContentTemplate",value:function(t){this._$contentElement=(0,i.default)("
").appendTo(t).addClass("dx-filemanager-dialog");var e=this._getDialogOptions().contentCssClass;e&&this._$contentElement.addClass(e)}},{key:"_getDialogResult",value:function(){return null}},{key:"_applyDialogChanges",value:function(){var t=this._getDialogResult();t&&(this._dialogResult=t,this._popup.hide())}},{key:"_closeDialog",value:function(){this._popup.hide()}},{key:"_onPopupHidden",value:function(){this._onClosedAction({dialogResult:this._dialogResult})}},{key:"_onPopupShown",value:function(){}},{key:"_createOnClosedAction",value:function(){this._onClosedAction=this._createActionByOption("onClosed")}},{key:"_setTitle",value:function(t){this._popup.option("title",t)}},{key:"_setButtonText",value:function(t){this._popup.option("toolbarItems[0].options.text",t)}},{key:"_getDefaultOptions",value:function(){return(0,o.extend)(h(g(u.prototype),"_getDefaultOptions",this).call(this),{onClosed:null})}},{key:"_optionChanged",value:function(t){switch(t.name){case"onClosed":this._createOnPathChangedAction();break;default:h(g(u.prototype),"_optionChanged",this).call(this,t)}}}])&&d(e.prototype,n),a&&d(e,a),u}(a.default);t.exports=_},function(t,e,n){"use strict";var i=n(11).eventData,o=n(15),r=n(25).name,a=n(28).down,s=n(28).move,l=n(6);function u(t){this._initHandlers(t)}u.prototype={constructor:u,_initHandlers:function(t){var e=o.getDocument();function n(e){!function(t,e){var n=e.getData(t);n>=0&&e.click({node:e.getNode(n),coords:e.getCoords(t),event:t})}(e,t)}t.getCoords=function(e){var n=i(e),o=t.widget._renderer.getRootOffset();return[n.x-o.left,n.y-o.top]},t.root.on(r,n),t.root.on(a,c),l.on(e,a,c),l.on(e,s,d),this._disposeHandlers=function(){t.root.off(r,n),t.root.off(a,c),l.off(e,a,c),l.off(e,s,d)};var u=!1;function c(e){u?u=!1:(void 0!==t.getData(e)&&(u=!0),d(e))}function d(e){!function(t,e){var n=e.getData(t);n>=0?e.getNode(n).setHover():e.widget.clearHover()}(e,t),t.widget._getOption("tooltip").enabled&&function(t,e){var n,o=e.getData(t,!0);o>=0?(n=i(t),e.getNode(o).showTooltip([n.x,n.y])):e.widget.hideTooltip()}(e,t)}},dispose:function(){this._disposeHandlers()}},t.exports.Tracker=u},function(t,e,n){"use strict";var i=T(n(3)),o=T(n(18)),r=T(n(57)),a=n(2),s=T(a),l=T(n(6)),u=T(n(8)),c=T(n(31)),d=n(4),h=n(362),f=n(7),p=n(17),m=n(10),g=n(0),_=n(16),v=n(5),y=T(n(12)),b=n(11),w=n(25),x=T(n(376)),C=n(100),S=T(n(110)),k=n(73),I=n(306);function T(t){return t&&t.__esModule?t:{default:t}}function E(t){return(E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var O=S.default.inherit({_supportedKeys:function(){var t=this,e=this.callBase(),n=function(e){return t._list._keyboardHandler(e)};return(0,g.extend)({},e,{backspace:function(t){if(this._isCaretAtTheStart()){t.preventDefault(),t.stopPropagation(),this._isTagRemoved=!0;var e=this._$focusedTag||this._tagElements().last();this._$focusedTag&&this._moveTagFocus("prev",!0),0!==e.length&&(this._preserveFocusedTag=!0,this._removeTagElement(e),delete this._preserveFocusedTag)}},upArrow:function(i,o){return i.altKey||!t._list?e.upArrow.call(t,i):n(o)},downArrow:function(i,o){return i.altKey||!t._list?e.downArrow.call(t,i):n(o)},del:function(t){if(this._$focusedTag&&this._isCaretAtTheStart()){t.preventDefault(),t.stopPropagation(),this._isTagRemoved=!0;var e=this._$focusedTag;this._moveTagFocus("next",!0),this._preserveFocusedTag=!0,this._removeTagElement(e),delete this._preserveFocusedTag}},enter:function(t,e){var i=this._list&&null!==this._list.option("focusedElement");if(this.option("acceptCustomValue")&&!i)return t.preventDefault(),void(""!==this._searchValue()&&this._customItemAddedHandler(t));this.option("opened")&&(n(e),t.preventDefault())},space:function(t,e){var i=this.option("opened"),o=this._shouldRenderSearchEvent();i&&!o&&(n(e),t.preventDefault())},leftArrow:function(t){if(this._isCaretAtTheStart()){var e=this.option("rtlEnabled");if(!this._isEditable()||!e||this._$focusedTag){t.preventDefault();var n=e?"next":"prev";this._moveTagFocus(n),!this.option("multiline")&&this._scrollContainer(n)}}},rightArrow:function(t){if(this._isCaretAtTheStart()){var e=this.option("rtlEnabled");if(!this._isEditable()||e||this._$focusedTag){t.preventDefault();var n=e?"prev":"next";this._moveTagFocus(n),!this.option("multiline")&&this._scrollContainer(n)}}}})},_allowSelectItemByTab:function(){return!1},_isCaretAtTheStart:function(){var t=(0,x.default)(this._input());return 0===t.start&&0===t.end},_moveTagFocus:function(t,e){if(!this._$focusedTag){var n=this._tagElements();return this._$focusedTag="next"===t?n.first():n.last(),void this._toggleFocusClass(!0,this._$focusedTag)}var i=this._$focusedTag[t](".".concat("dx-tag"));i.length>0?this._replaceFocusedTag(i):(e||"next"===t&&this._isEditable())&&this._clearTagFocus()},_replaceFocusedTag:function(t){this._toggleFocusClass(!1,this._$focusedTag),this._$focusedTag=t,this._toggleFocusClass(!0,this._$focusedTag)},_clearTagFocus:function(){this._$focusedTag&&(this._toggleFocusClass(!1,this._$focusedTag),delete this._$focusedTag)},_focusClassTarget:function(t){return t&&t.length&&t[0]!==this._focusTarget()[0]?t:this.callBase()},_scrollContainer:function(t){if(!this.option("multiline")&&(0,m.hasWindow)()&&this._$tagsContainer){var e=this._getScrollPosition(t);this._$tagsContainer.scrollLeft(e)}},_getScrollPosition:function(t){return"start"===t||"end"===t?this._getBorderPosition(t):this._$focusedTag?this._getFocusedTagPosition(t):this._getBorderPosition("end")},_getBorderPosition:function(t){var e=this.option("rtlEnabled"),n="end"===t^e,i=e&&!c.default.webkit,o=!e||c.default.webkit||c.default.msie?1:-1;return n^!i?0:o*(this._$tagsContainer.get(0).scrollWidth-this._$tagsContainer.outerWidth())},_getFocusedTagPosition:function(t){var e=this.option("rtlEnabled"),n="next"===t^e,i=this._$focusedTag.position().left,o=this._$tagsContainer.scrollLeft();(n&&(i+=this._$focusedTag.outerWidth(!0)-this._$tagsContainer.outerWidth()),n^i<0)&&(o+=i*(e&&c.default.msie?-1:1));return o},_setNextValue:d.noop,_getDefaultOptions:function(){return(0,g.extend)(this.callBase(),{value:[],showDropDownButton:!1,maxFilterLength:1500,tagTemplate:"tag",selectAllText:y.default.format("dxList-selectAll"),hideSelectedItems:!1,selectedItems:[],selectAllMode:"page",onSelectAllValueChanged:null,maxDisplayedTags:void 0,showMultiTagOnly:!0,onMultiTagPreparing:null,multiline:!0,useSubmitBehavior:!0})},_init:function(){this.callBase(),this._selectedItems=[],this._initSelectAllValueChangedAction()},_initActions:function(){this.callBase(),this._initMultiTagPreparingAction()},_initMultiTagPreparingAction:function(){this._multiTagPreparingAction=this._createActionByOption("onMultiTagPreparing",{beforeExecute:function(t){this._multiTagPreparingHandler(t.args[0])}.bind(this),excludeValidators:["disabled","readOnly"]})},_multiTagPreparingHandler:function(t){var e=this._getValue().length;this.option("showMultiTagOnly")?t.text=y.default.getFormatter("dxTagBox-selected")(e):t.text=y.default.getFormatter("dxTagBox-moreSelected")(e-this.option("maxDisplayedTags")+1)},_initDynamicTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({tag:new k.BindableTemplate((function(t,e){var n=(0,i.default)("
").addClass("dx-tag-content");(0,i.default)("").text(e.text||e).appendTo(n),(0,i.default)("
").addClass("dx-tag-remove-button").appendTo(n),t.append(n)}),["text"],this.option("integrationOptions.watchMethod"),{text:this._displayGetter})})},_toggleSubmitElement:function(t){t?(this._renderSubmitElement(),this._setSubmitValue()):(this._$submitElement&&this._$submitElement.remove(),delete this._$submitElement)},_renderSubmitElement:function(){this.option("useSubmitBehavior")&&(this._$submitElement=(0,i.default)("
")},_getCellText:function(t,e){var n=t.isWhiteSpace?" ":t.text||" ";return!e||-1===n.indexOf("<")&&-1===n.indexOf(">")||(n=(0,i.default)("
").text(n).html()),n},_getRowClassNames:function(){},_applyCustomStyles:function(t){t.cell.width&&t.cssArray.push("min-width:"+t.cell.width+"px"),t.cell.sorted&&t.classArray.push("dx-pivotgrid-sorted")},_getMainElementMarkup:function(){return"
"},_getCloseMainElementMarkup:function(){return""},_renderTableContent:function(t,e){var n,i,o,r,a,s,u=e.length,c=this.option("rtlEnabled"),d=[],h=this.option("encodeHtml");for(t.data("area",this._getAreaName()),t.data("data",e),t.css("width",""),d.push(this._getMainElementMarkup()),o=0;o"),(0,l.isDefined)(i.expanded)&&f.push("
"),a=this._getCellText(i,h)}else a="";f.push(""+a+""),i.sorted&&f.push(""),f.push("")}s.length&&(d.push("class='"),d.push(s.join(" ")),d.push("'")),d.push(">"),d.push(f.join("")),d.push("")}d.push(this._getCloseMainElementMarkup()),t.append(d.join("")),this._triggerOnCellPrepared(t,e)},_triggerOnCellPrepared:function(t,e){var n,i,o,s,l,u,c,d=t.find("tr"),h=this._getAreaName(),f=this.option("onCellPrepared"),p=this.component._eventsStrategy.hasEvent("cellPrepared"),m=this.component._defaultActionArgs();if(f||p)for(u=0;u0?n:i}return 0},_setRowHeight:function(t,e){var n=this._getRowElement(t);n&&(n.style.height=e+"px")},ctor:function(t){this.component=t},option:function(){return this.component.option.apply(this.component,arguments)},getRowsLength:function(){return this._tableElement&&this._tableElement.length>0?this._tableElement[0].rows.length:0},getRowsHeight:function(){var t,e=[],n=this.getRowsLength();for(t=0;t';this._colgroupElement.html(o),this._tableWidth=n-this._groupWidth>.01?Math.ceil(n):n,i.style.width=this._tableWidth+"px",i.style.tableLayout="fixed"},resetColumnsWidth:function(){this._colgroupElement.find("col").width("auto"),this._tableElement.css({width:"",tableLayout:""})},groupWidth:function(t){return void 0===t?this._groupElement.width():t>=0?(this._groupWidth=t,this._groupElement[0].style.width=t+"px"):this._groupElement[0].style.width=t},groupHeight:function(t){if(void 0===t)return this._groupElement.height();this._groupHeight=null,t>=0?(this._groupHeight=t,this._groupElement[0].style.height=t+"px"):this._groupElement[0].style.height=t},groupElement:function(){return this._groupElement},tableElement:function(){return this._tableElement},element:function(){return this._rootElement},headElement:function(){return this._tableElement.find("thead")},_setTableCss:function(t){this.option("rtlEnabled")&&(t.right=t.left,delete t.left),this.tableElement().css(t)},setVirtualContentParams:function(t){this._virtualContent.css({width:t.width,height:t.height}),this.groupElement().addClass("dx-virtual-mode")},disableVirtualMode:function(){this.groupElement().removeClass("dx-virtual-mode")},_renderVirtualContent:function(){this._virtualContent||"virtual"!==this.option("scrolling.mode")||(this._virtualContent=(0,i.default)("
").addClass("dx-virtual-content").insertBefore(this._tableElement))},reset:function(){var t=this._tableElement[0];if(this._fakeTable&&this._fakeTable.detach(),this._fakeTable=null,this.disableVirtualMode(),this.groupWidth("100%"),this.groupHeight("auto"),this.resetColumnsWidth(),t){for(var e=0;e").appendTo(this._tableElement),this._renderTableContent(this._tableElement,e),this._renderVirtualContent()},_getScrollable:function(){return this.groupElement().data("dxScrollable")},on:function(t,e){var n=this,i=n._getScrollable();return i&&i.on(t,(function(t){n.option("rtlEnabled")&&(0,l.isDefined)(t.scrollOffset.left)&&(t.scrollOffset.left=i.$content().width()-i._container().width()-t.scrollOffset.left),e(t)})),this},off:function(t){var e=this._getScrollable();return e&&e.off(t),this},scrollTo:function(t){var e=this._getScrollable(),n=t;e&&(this.option("rtlEnabled")&&("column"===this._getAreaName()?n=e.$content().width()-e._container().width()-t:"data"===this._getAreaName()&&(n={x:e.$content().width()-e._container().width()-t.x,y:t.y})),e.scrollTo(n),this._virtualContent&&(this._createFakeTable(),this._moveFakeTable(t)))},updateScrollable:function(){var t=this._getScrollable();if(t)return t.update()},getColumnsCount:function(){var t,e=0,n=this._getRowElement(0);if(n)for(var i=0,o=(t=n.cells).length;i").addClass("dx-pivotgrid-fields-container").addClass("dx-widget").append((0,i.default)(e));o.append(n)})),o.children()}return n},onDragging:function(t){var e=t.sourceElement.data("field"),n=t.targetGroup;t.cancel=!1,!0===e.isMeasure?"column"!==n&&"row"!==n&&"filter"!==n||(t.cancel=!0):!1===e.isMeasure&&"data"===n&&(t.cancel=!0)},useIndicator:!0,onChanged:function(e){var n=t._dataSource,i=e.sourceElement.data("field");e.removeSourceElement=!!e.sourceGroup,t._adjustSortableOnChangedArgs(e),i&&t._applyChanges([k(n,i)],{area:e.targetGroup,areaIndex:e.targetIndex})}},t._getSortableOptions()))},_processDemandState:function(t){var e="instantly"===this.option("applyChangesMode"),n=this._dataSource;if(e)t(n,e);else{var i=n.state(),o=this.option("state");o&&n.state(o,!0),t(n,e),n.state(i,!0)}},_applyChanges:function(t,e){var n=this;n._processDemandState((function(i,o){t.forEach((function(t){var n=t.index;i.field(n,e)})),o?i.load():n._changedHandler()}))},_adjustSortableOnChangedArgs:function(t){t.removeSourceElement=!1,t.removeTargetElement=!0,t.removeSourceClass=!1},_getSortableOptions:function(){return{direction:"auto"}},subscribeToEvents:function(t){var e=this,n=function(t){var n=(0,i.default)(t.currentTarget).data("field"),o=(0,c.extend)(!0,{},k(e._dataSource,n)),a=(0,i.default)(t.target).hasClass("dx-header-filter"),s=e._dataSource,l=o.groupName?"tree":"list",h=s.paginate()&&"list"===l;a?e._headerFilterView.showHeaderFilterMenu((0,i.default)(t.currentTarget),(0,c.extend)(o,{type:l,encodeHtml:e.option("encodeHtml"),dataSource:{useDefaultSearch:!h,load:function(t){var n=t.userData;if(n.store)return n.store.load(t);var i=new w.Deferred;return s.getFieldValues(o.index,e.option("headerFilter.showRelevantValues"),h?t:void 0).done((function(o){var a=e.option("headerFilter.texts.emptyValue");o.forEach((function(t){t.text||(t.text=a)})),h?i.resolve(o):(n.store=new r.default(o),n.store.load(t).done(i.resolve).fail(i.reject))})).fail(i.reject),i},postProcess:function(t){return function(t,e){var n=[],i=!!e.groupName,o="exclude"===e.filterType;e.filterValues&&(0,d.each)(e.filterValues,(function(t,e){n.push(Array.isArray(e)?e.join("/"):e&&e.valueOf())})),(0,y.foreachTree)(t,(function(t){var e=t[0],r=(0,y.createPath)(t),a=i?(0,d.map)(t,(function(t){return t.text})).reverse().join("/"):e.text;e.value=i?r.slice(0):e.key||e.value;var s=i?r.join("/"):e.value&&e.value.valueOf();e.children&&(e.items=e.children,e.children=null),(0,m.updateHeaderFilterItemSelectionState)(e,e.key&&(0,u.inArray)(a,n)>-1||(0,u.inArray)(s,n)>-1,o)}))}(t,o),t}},apply:function(){e._applyChanges([o],{filterValues:this.filterValues,filterType:this.filterType})}})):n.allowSorting&&"data"!==n.area&&e._applyChanges([n],{sortOrder:"desc"===n.sortOrder?"asc":"desc"})};t?o.default.on(t,a.default.name,".dx-area-field.dx-area-box",n):o.default.on(e.$element(),a.default.name,".dx-area-field.dx-area-box",n)},_initTemplates:s.noop,addWidgetPrefix:function(t){return"dx-pivotgrid-"+t}});(0,f.default)("dxPivotGridFieldChooserBase",T),t.exports=T},function(t,e,n){"use strict";var i=c(n(3)),o=c(n(509)),r=c(n(8)),a=c(n(26)),s=n(0),l=n(24),u=c(n(10));function c(t){return t&&t.__esModule?t:{default:t}}var d=a.default.dateToMilliseconds,h=o.default.inherit({_getToday:function(){var t=this.option("indicatorTime")||new Date;return this.invoke("convertDateByTimezone",t)||t},_needRenderDateTimeIndicator:function(){var t=this._getToday(),e=a.default.trimTime(this.getEndViewDate());return a.default.dateInRange(t,this._firstViewDate,new Date(e.getTime()+d("day")))},needRenderDateTimeIndication:function(){return!!u.default.hasWindow()&&this._getToday()>=a.default.trimTime(new Date(this.getStartViewDate()))},_renderDateTimeIndication:function(){if(this.needRenderDateTimeIndication()&&(this.option("shadeUntilCurrentTime")&&this._shader.render(),this.option("showCurrentTimeIndicator")&&this._needRenderDateTimeIndicator())){var t=this._getGroupCount()||1,e=this._dateTableScrollable.$content(),n=this.getIndicationHeight(),i=this._getRtlOffset(this.getCellWidth());n>0&&this._renderIndicator(n,i,e,t)}},_renderIndicator:function(t,e,n,i){for(var o=this.isGroupedByDate(),r=o?1:i,a=0;a").addClass("dx-scheduler-date-time-indicator");return t.append(e),e},_getRtlOffset:function(t){return this.option("rtlEnabled")?(0,l.getBoundingRect)(this._dateTableScrollable.$content().get(0)).width-this.getTimePanelWidth()-t:0},_setIndicationUpdateInterval:function(){this.option("showCurrentTimeIndicator")&&0!==this.option("indicatorUpdateInterval")&&(this._clearIndicatorUpdateInterval(),this._indicatorInterval=setInterval(function(){this._refreshDateTimeIndication()}.bind(this),this.option("indicatorUpdateInterval")))},_clearIndicatorUpdateInterval:function(){this._indicatorInterval&&(clearInterval(this._indicatorInterval),delete this._indicatorInterval)},_isVerticalShader:function(){return!0},getIndicationWidth:function(t){var e=this.getCellWidth()*this._getCellCount(),n=this._getIndicatorDuration();n>this._getCellCount()&&(n=this._getCellCount());var i=n*this.getRoundedCellWidth(t,t*this._getCellCount(),n);return e")}d&&m&&(this.insertAllDayRow(d,n,c),c++)}return l},makeGroupedTable:function(t,e,n,i,o,r,a){return t===this.VERTICAL?this._makeVerticalGroupedRows(e,n,o,r):this._makeHorizontalGroupedRows(e,n,i,o,a)},makeGroupedTableFromJSON:function(t,e,n){var i,r=[],a=0,s=(n=n||{}).cellTag||"td",l=n.childrenField||"children",u=n.titleField||"title",c=n.groupTableClass,d=n.groupRowClass,h=n.groupCellClass,f=n.groupCellCustomContent;function p(t,e,n,i){var r={element:o.default.createElement(s),childCount:e};h&&(r.element.className=h);var a=o.default.createTextNode(t);return"function"===typeof f?f(r.element,a,n,i):r.element.appendChild(a),r}return i=o.default.createElement("table"),c&&(i.className=c),function t(e){for(var n=0;n=0;r--){var a=t[r+1],s=t[r].childCount;a&&a.childCount&&(s*=a.childCount),n.push(s)}n.reverse(),t.forEach((function(t,i){n[i]&&t.element.setAttribute("rowSpan",n[i]),e.appendChild(t.element)})),i.appendChild(e)})),i},_makeFlexGroupedRowCells:function(t,e,n,o){for(var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,l=[],u=t.items,c=u.length,d=0;d"),p={};if(o&&o.render){var m={model:u[h],container:(0,s.getPublicElement)(f),index:d*c+h};t.data&&(m.model.data=t.data[h]),p.template=o.render.bind(o,m)}else f.text(u[h].text).attr("title",u[h].text).addClass("dx-scheduler-group-header-content"),f=(0,i.default)("
").append(f);var g=a.default.isFunction(n.groupHeaderClass)?n.groupHeaderClass(h):n.groupHeaderClass;p.element=f.addClass(g),l.push(p)}return l},_makeVerticalGroupedRows:function(t,e,n){for(var o=[],r=1,a=[],s=function(t){t.template&&o.push(t.template)},l=0;l0&&(r=t[l-1].items.length*r);var u=this._makeFlexGroupedRowCells(t[l],r,e,n);u.forEach(s),a.push(u)}for(var c=[],d=a.length,h=0;h").addClass(e.groupHeaderRowClass));for(var f=d-1;f>=0;f--)for(var p=a[f].length,m=0;m").addClass("dx-scheduler-group-flex-container").append(c),cellTemplates:o}},_makeHorizontalGroupedRows:function(t,e,n,o,r){for(var a=1,s=t.length,l=[],u=[],c=r?n:1,d=function(t){return t.template&&u.push(t.template),t.element},h=0;h0&&(a=t[h-1].items.length*a);var f=this._makeGroupedRowCells(t[h],a,e,o,c);l.push((0,i.default)("
").addClass(e.groupRowClass).append(f.map(d)))}for(var p=l[s-1].find("th").length,m=0;m1&&1===c||r&&s>1)&&g.attr("colSpan",_)}return{elements:l,cellTemplates:u}},_makeGroupedRowCells:function(t,e,n,o,r){e*=r=r||1;for(var l=[],u=t.items,c=u.length,d=0;d"),p={};if(o&&o.render){var m={model:u[h],container:(0,s.getPublicElement)(f),index:d*c+h};t.data&&(m.model.data=t.data[h]),p.template=o.render.bind(o,m)}else f.text(u[h].text),f=(0,i.default)("
").append(f);f.addClass(n.groupHeaderContentClass);var g=void 0;g=a.default.isFunction(n.groupHeaderClass)?n.groupHeaderClass(h):n.groupHeaderClass,p.element=(0,i.default)("
").addClass("dx-scheduler-header-row").append(n);t.before(c)}},_needRenderWeekHeader:function(){return!1},_incrementDate:function(t){t.setDate(t.getDate()+1)},_getWeekDuration:function(){return 1},_renderView:function(){this._setFirstViewDate();var t=this._renderGroupHeader();this._renderDateHeader(),this._renderAllDayPanel(),this._renderTimePanel(),this._renderDateTable(),this._shader=new d(this),this._updateGroupTableHeight(),this._$sidebarTable.appendTo(this._sidebarScrollable.$content()),this._applyCellTemplates(t)},_setHorizontalGroupHeaderCellsHeight:o,getIndicationCellCount:function(){var t=this._getToday(),e=this._getIndicationFirstViewDate(),n=this._getHiddenInterval(),i=t.getTime()-e.getTime();return(i-(Math.ceil(i/h("day"))-1)*n)/this.getCellDuration()},getIndicationWidth:function(){if(this.isGroupedByDate()){var t=this.getIndicationCellCount(),e=Math.floor(t),n=t-e;return this.getCellWidth()*(e*this._getGroupCount()+n)}return this.getIndicationCellCount()*this.getCellWidth()},_renderIndicator:function(t,e,n,i){var o,r=this.getIndicationWidth();if("vertical"===this.option("groupOrientation"))(o=this._createIndicator(n)).height(a(n.get(0)).height),o.css("left",e?e-r:r);else for(var s=0;s=n&&t.getHours()=n&&t.getHours()>=i?p=f-(g-i*h("hour")):d||(_=c),_+=p),_},_getWeekendsCount:function(){return 0},getAllDayContainer:function(){return null},getTimePanelWidth:function(){return 0},getPositionShift:function(t){var e=this.callBase(t),n=this.getCellWidth()*t;return this.option("rtlEnabled")&&(n*=-1),{top:0,left:n+=e.left,cellPosition:n}},getVisibleBounds:function(){var t=this.option("rtlEnabled"),e={},n=this.getScrollable().$element(),i=this.getCellWidth(),o=(t?this.getScrollableOuterWidth()-this.getScrollableScrollLeft():this.getScrollableScrollLeft())/i,r=n.width()/i,a=t?o-r:o+r,s=this._getDateByIndex(o),l=this._getDateByIndex(a);return t&&(s=this._getDateByIndex(a),l=this._getDateByIndex(o)),e.left={hours:s.getHours(),minutes:s.getMinutes()>=30?30:0,date:u.trimTime(s)},e.right={hours:l.getHours(),minutes:l.getMinutes()>=30?30:0,date:u.trimTime(l)},e},needUpdateScrollPosition:function(t,e,n,i){var o=!1;return o=this._dateWithinBounds(n,i),(tn.right.hours)&&(o=!0),t===n.left.hours&&en.right.minutes&&(o=!0),o},getIntervalDuration:function(t){return this.getCellDuration()},_dateWithinBounds:function(t,e){var n=u.trimTime(new Date(e)),i=!1;return(nt.right.date)&&(i=!0),i},_supportCompactDropDownAppointments:function(){return!1},getCellMinWidth:function(){return 0},getWorkSpaceLeftOffset:function(){return 0},scrollToTime:function(t,e,n){var i=this._getScrollCoordinates(t,e,n),o=this.getScrollable(),r=this.option("rtlEnabled")?a(this.getScrollableContainer().get(0)).width:0;this.option("templatesRenderAsynchronously")?setTimeout((function(){o.scrollBy({left:i.left-o.scrollLeft()-r,top:0})})):o.scrollBy({left:i.left-o.scrollLeft()-r,top:0})},_getRowCountWithAllDayRows:function(){return this._getRowCount()}});s("dxSchedulerTimeline",f),t.exports=f},function(t,e,n){"use strict";var i=h(n(515)),o=h(n(1078)),r=n(0),a=h(n(23)),s=h(n(26)),l=n(2),u=h(l),c=h(n(36)),d=h(n(172));function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){for(var n=0;nthis.getDefaultCellWidth()/2}},{key:"isAllDay",value:function(){return!1}},{key:"cropAppointmentWidth",value:function(t,e){return this.instance.fire("isGroupedByDate")&&(t=e),t}},{key:"_getSortedPositions",value:function(t){for(var e=this,n=[],i=function(t){return Math.round(100*t)/100},o=function(t,e,n,o,r,a,s,l){return{i:t,j:e,top:i(n),left:i(o),bottom:i(r),right:i(a),cellPosition:s,allDay:l}},r=0,a=t.length;r1?n:0}},{key:"_isItemsCross",value:function(t,e){var n=!!t.allDay===!!e.allDay,i=t.allDay&&e.allDay;if(n){var o=this._getOrientation(i);return this._checkItemsCrossing(t,e,o)}return!1}},{key:"_checkItemsCrossing",value:function(t,e,n){var i=Math.floor(t[n[0]]),o=Math.floor(t[n[1]]),r=Math.ceil(e[n[0]]),a=Math.ceil(e[n[1]]);return Math.abs(t[n[2]]-e[n[2]])<=1&&(i<=r&&o>r||i=a||i===r&&o===a)}},{key:"_getOrientation",value:function(t){return t?["left","right","top"]:["top","bottom","left"]}},{key:"_getResultPositions",value:function(t){var e,n,i,o,r=this,a=[],s=0,l=0,u={},c=function t(e,n){return e.some((function(t){return t===n}))?t(e,++n):n},d=function(t,e){var n=e||0;return{index:n,i:t.i,j:t.j,left:t.left,right:t.right,top:t.top,bottom:t.bottom,allDay:t.allDay,sortedIndex:r._skipSortedIndex(n)?null:s++}},h=function(t){u.items=[d(t)],u.left=t.left,u.right=t.right,u.top=t.top,u.bottom=t.bottom,u.allDay=t.allDay},f=function(t){t.forEach((function(t){a.push({index:t.index,count:l+1,i:t.i,j:t.j,sortedIndex:t.sortedIndex})}))};for(e=0;ethis._getMaxAppointmentCountPerCell()-1}},{key:"_findIndexByKey",value:function(t,e,n,i,o){for(var r=0,a=0,s=t.length;an-1){t.isCompact=!0,i=this._getCompactAppointmentParts(t.width);for(var o=1;oi||!i)&&(i=o),isNaN(i.getTime()))throw a.default.Error("E1032",r);return i}},{key:"endDate",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.instance._getEndDate(t,i),r=this.startDate(t,!0),a=this.startDate(t,!1,e);if(a.getTime()>o.getTime()||n){var l=e?e.initialStartDate||e.startDate:r,u=e?e.startDate:r,c=a.getTime()>o.getTime()?this.instance.fire("getField","endDate",t).getTime()-this.instance.fire("getField","startDate",t).getTime():o.getTime()-r.getTime();if(c=this._adjustDurationByDaylightDiff(c,r,o),o=new Date(a.getTime()>=l.getTime()?l.getTime():a.getTime()),n&&(o=new Date(o.getTime()+c)),!s.default.sameDate(r,o)&&u.getTime()f&&(o=f)}var p=new Date(new Date(o).setHours(this.instance.option("endDayHour"),0,0));return o.getTime()>p.getTime()&&(o=p),o}},{key:"_adjustDurationByDaylightDiff",value:function(t,e,n){var i=d.default.getDaylightOffset(e,n);return this._needAdjustDuration(i)?this._calculateDurationByDaylightDiff(t,i):t}},{key:"_needAdjustDuration",value:function(t){return 0!==t}},{key:"_calculateDurationByDaylightDiff",value:function(t,e){return t+e*p("minute")}},{key:"_getAppointmentDurationInMs",value:function(t,e,n){return this.instance.fire("getAppointmentDurationInMs",{startDate:t,endDate:e,allDay:n})}},{key:"_markAppointmentAsVirtual",value:function(t,e){var n=this._getMaxAppointmentCountPerCellByType(e);t.count-n>0&&(t.virtual={top:t.top,left:t.left,index:"tail"===t.appointmentReduced?t.groupIndex+"-"+t.rowIndex+"-"+t.cellIndex:t.groupIndex+"-"+t.rowIndex+"-"+t.cellIndex+"-tail",isAllDay:e})}},{key:"_getMaxAppointmentCountPerCellByType",value:function(t){var e=this._getMaxAppointmentCountPerCell();return u.default.isObject(e)?t?this._getMaxAppointmentCountPerCell().allDay:this._getMaxAppointmentCountPerCell().simple:e}},{key:"getDropDownAppointmentWidth",value:function(t,e){return this.getPositioningStrategy().getDropDownAppointmentWidth(t,e)}},{key:"getDropDownAppointmentHeight",value:function(){return this.getPositioningStrategy().getDropDownAppointmentHeight()}},{key:"getDropDownButtonAdaptiveSize",value:function(){return 28}},{key:"getDefaultCellWidth",value:function(){return this._defaultWidth}},{key:"getDefaultCellHeight",value:function(){return this._defaultHeight}},{key:"getDefaultAllDayCellHeight",value:function(){return this._allDayHeight}},{key:"getCollectorTopOffset",value:function(t){return this.getPositioningStrategy().getCollectorTopOffset(t)}},{key:"getCollectorLeftOffset",value:function(){return this.getPositioningStrategy().getCollectorLeftOffset()}},{key:"getAppointmentDataCalculator",value:function(){}},{key:"_customizeCoordinates",value:function(t,e,n,i,o){var r=t.index,a=e/n,s=t.top+r*a+i,l=t.width,u=t.left;return t.isCompact&&(this._isAdaptive()&&this._correctCollectorCoordinatesInAdaptive(t,o),this._markAppointmentAsVirtual(t,o)),{height:a,width:l,top:s,left:u,empty:this._isAppointmentEmpty(e,l)}}},{key:"_isAppointmentEmpty",value:function(t,e){return t>>32-e}function u(t,e,n,i,o,r,a){return l(t+(e&n|~e&i)+o+r|0,a)+e|0}function c(t,e,n,i,o,r,a){return l(t+(e&i|n&~i)+o+r|0,a)+e|0}function d(t,e,n,i,o,r,a){return l(t+(e^n^i)+o+r|0,a)+e|0}function h(t,e,n,i,o,r,a){return l(t+(n^(e|~i))+o+r|0,a)+e|0}i(s,o),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,i=this._b,o=this._c,r=this._d;n=u(n,i,o,r,t[0],3614090360,7),r=u(r,n,i,o,t[1],3905402710,12),o=u(o,r,n,i,t[2],606105819,17),i=u(i,o,r,n,t[3],3250441966,22),n=u(n,i,o,r,t[4],4118548399,7),r=u(r,n,i,o,t[5],1200080426,12),o=u(o,r,n,i,t[6],2821735955,17),i=u(i,o,r,n,t[7],4249261313,22),n=u(n,i,o,r,t[8],1770035416,7),r=u(r,n,i,o,t[9],2336552879,12),o=u(o,r,n,i,t[10],4294925233,17),i=u(i,o,r,n,t[11],2304563134,22),n=u(n,i,o,r,t[12],1804603682,7),r=u(r,n,i,o,t[13],4254626195,12),o=u(o,r,n,i,t[14],2792965006,17),n=c(n,i=u(i,o,r,n,t[15],1236535329,22),o,r,t[1],4129170786,5),r=c(r,n,i,o,t[6],3225465664,9),o=c(o,r,n,i,t[11],643717713,14),i=c(i,o,r,n,t[0],3921069994,20),n=c(n,i,o,r,t[5],3593408605,5),r=c(r,n,i,o,t[10],38016083,9),o=c(o,r,n,i,t[15],3634488961,14),i=c(i,o,r,n,t[4],3889429448,20),n=c(n,i,o,r,t[9],568446438,5),r=c(r,n,i,o,t[14],3275163606,9),o=c(o,r,n,i,t[3],4107603335,14),i=c(i,o,r,n,t[8],1163531501,20),n=c(n,i,o,r,t[13],2850285829,5),r=c(r,n,i,o,t[2],4243563512,9),o=c(o,r,n,i,t[7],1735328473,14),n=d(n,i=c(i,o,r,n,t[12],2368359562,20),o,r,t[5],4294588738,4),r=d(r,n,i,o,t[8],2272392833,11),o=d(o,r,n,i,t[11],1839030562,16),i=d(i,o,r,n,t[14],4259657740,23),n=d(n,i,o,r,t[1],2763975236,4),r=d(r,n,i,o,t[4],1272893353,11),o=d(o,r,n,i,t[7],4139469664,16),i=d(i,o,r,n,t[10],3200236656,23),n=d(n,i,o,r,t[13],681279174,4),r=d(r,n,i,o,t[0],3936430074,11),o=d(o,r,n,i,t[3],3572445317,16),i=d(i,o,r,n,t[6],76029189,23),n=d(n,i,o,r,t[9],3654602809,4),r=d(r,n,i,o,t[12],3873151461,11),o=d(o,r,n,i,t[15],530742520,16),n=h(n,i=d(i,o,r,n,t[2],3299628645,23),o,r,t[0],4096336452,6),r=h(r,n,i,o,t[7],1126891415,10),o=h(o,r,n,i,t[14],2878612391,15),i=h(i,o,r,n,t[5],4237533241,21),n=h(n,i,o,r,t[12],1700485571,6),r=h(r,n,i,o,t[3],2399980690,10),o=h(o,r,n,i,t[10],4293915773,15),i=h(i,o,r,n,t[1],2240044497,21),n=h(n,i,o,r,t[8],1873313359,6),r=h(r,n,i,o,t[15],4264355552,10),o=h(o,r,n,i,t[6],2734768916,15),i=h(i,o,r,n,t[13],1309151649,21),n=h(n,i,o,r,t[4],4149444226,6),r=h(r,n,i,o,t[11],3174756917,10),o=h(o,r,n,i,t[2],718787259,15),i=h(i,o,r,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+i|0,this._c=this._c+o|0,this._d=this._d+r|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(_){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}}}).call(this,n(56))},function(t,e,n){"use strict";var i=n(175).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}t.exports=function t(e,n,r){if("function"===typeof n)return t(e,null,n);n||(n={}),r=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,i=new Array(n),o=0;o>>32-e}function m(t,e,n,i,o,r,a,s){return p(t+(e^n^i)+r+a|0,s)+o|0}function g(t,e,n,i,o,r,a,s){return p(t+(e&n|~e&i)+r+a|0,s)+o|0}function _(t,e,n,i,o,r,a,s){return p(t+((e|~n)^i)+r+a|0,s)+o|0}function v(t,e,n,i,o,r,a,s){return p(t+(e&i|n&~i)+r+a|0,s)+o|0}function y(t,e,n,i,o,r,a,s){return p(t+(e^(n|~i))+r+a|0,s)+o|0}o(f,r),f.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,i=0|this._b,o=0|this._c,r=0|this._d,f=0|this._e,b=0|this._a,w=0|this._b,x=0|this._c,C=0|this._d,S=0|this._e,k=0;k<80;k+=1){var I,T;k<16?(I=m(n,i,o,r,f,t[s[k]],d[0],u[k]),T=y(b,w,x,C,S,t[l[k]],h[0],c[k])):k<32?(I=g(n,i,o,r,f,t[s[k]],d[1],u[k]),T=v(b,w,x,C,S,t[l[k]],h[1],c[k])):k<48?(I=_(n,i,o,r,f,t[s[k]],d[2],u[k]),T=_(b,w,x,C,S,t[l[k]],h[2],c[k])):k<64?(I=v(n,i,o,r,f,t[s[k]],d[3],u[k]),T=g(b,w,x,C,S,t[l[k]],h[3],c[k])):(I=y(n,i,o,r,f,t[s[k]],d[4],u[k]),T=m(b,w,x,C,S,t[l[k]],h[4],c[k])),n=f,f=r,r=p(o,10),o=i,i=I,b=S,S=C,C=p(x,10),x=w,w=T}var E=this._b+o+C|0;this._b=this._c+r+S|0,this._c=this._d+f+b|0,this._d=this._e+n+w|0,this._e=this._a+i+x|0,this._a=E},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=f},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(1147),e.sha1=n(1148),e.sha224=n(1149),e.sha256=n(534),e.sha384=n(1150),e.sha512=n(535)},function(t,e,n){(e=t.exports=n(536)).Stream=e,e.Readable=e,e.Writable=n(320),e.Duplex=n(150),e.Transform=n(539),e.PassThrough=n(1155)},function(t,e,n){"use strict";(function(e,i,o){var r=n(242);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var i=t.entry;t.entry=null;for(;i;){var o=i.callback;e.pendingcb--,o(n),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var s,l=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:r.nextTick;y.WritableState=v;var u=Object.create(n(205));u.inherits=n(22);var c={deprecate:n(315)},d=n(537),h=n(30).Buffer,f=o.Uint8Array||function(){};var p,m=n(538);function g(){}function v(t,e){s=s||n(150),t=t||{};var i=e instanceof s;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,u=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:i&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(o(i),t._writableState.errorEmitted=!0,t.emit("error",i),k(t,e))}(t,n,i,e,o);else{var a=C(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||x(t,n),i?l(w,t,n,a,o):w(t,n,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(t){if(s=s||n(150),!p.call(y,this)&&!(this instanceof s))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),d.call(this)}function b(t,e,n,i,o,r,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(o,e.onwrite):t._write(o,r,e.onwrite),e.sync=!1}function w(t,e,n,i){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),k(t,e)}function x(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,o=new Array(i),r=e.corkedRequestsFree;r.entry=n;for(var s=0,l=!0;n;)o[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;o.allBuffers=l,b(t,e,!0,e.length,o,"",r.finish),e.pendingcb++,e.lastBufferedRequest=null,r.next?(e.corkedRequestsFree=r.next,r.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,d=n.callback;if(b(t,e,!1,e.objectMode?1:u.length,u,c,d),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function C(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var n=C(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,r.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}u.inherits(y,d),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=t,h.isBuffer(i)||i instanceof f);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"===typeof e&&(n=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!==typeof n&&(n=g),o.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),r.nextTick(e,n)}(this,n):(s||function(t,e,n,i){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),r.nextTick(i,a),o=!1),o}(this,o,t,n))&&(o.pendingcb++,a=function(t,e,n,i,o,r){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=h.from(e,n));return e}(e,i,o);i!==a&&(n=!0,o="buffer",i=a)}var s=e.objectMode?1:i.length;e.length+=s;var l=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var i=this._writableState;"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,n){e.ending=!0,k(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(50),n(389).setImmediate,n(56))},function(t,e,n){"use strict";var i=n(84);function o(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=o,o.prototype._init=function(){},o.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},o.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),i=0;i0;i--)e+=this._buffer(t,e),n+=this._flushBuffer(o,n);return e+=this._buffer(t,e),o},o.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},o.prototype._pad=function(t,e){if(0===e)return!1;for(;e=0||!n.umod(t.prime1)||!n.umod(t.prime2);)n=new i(o(e));return n}t.exports=r,r.getr=a}).call(this,n(52).Buffer)},function(t,e,n){"use strict";var i=e;i.version=n(1197).version,i.utils=n(85),i.rand=n(324),i.curve=n(565),i.curves=n(329),i.ec=n(1209),i.eddsa=n(1213)},function(t,e,n){"use strict";var i,o=e,r=n(330),a=n(565),s=n(85).assert;function l(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(o,t,{configurable:!0,enumerable:!0,get:function(){var n=new l(e);return Object.defineProperty(o,t,{configurable:!0,enumerable:!0,value:n}),n}})}o.PresetCurve=l,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=n(1208)}catch(c){i=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},function(t,e,n){var i=e;i.utils=n(105),i.common=n(207),i.sha=n(1202),i.ripemd=n(1206),i.hmac=n(1207),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(t,e,n){"use strict";(function(e){var i,o=n(52),r=o.Buffer,a={};for(i in o)o.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(a[i]=o[i]);var s=a.Buffer={};for(i in r)r.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(s[i]=r[i]);if(a.Buffer.prototype=r.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,n){if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&"undefined"===typeof t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return r(t,e,n)}),s.alloc||(s.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=r(t);return e&&0!==e.length?"string"===typeof n?i.fill(e,n):i.fill(e):i.fill(0),i}),!a.kStringMaxLength)try{a.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(l){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,n(50))},function(t,e,n){"use strict";var i=n(333).Reporter,o=n(208).EncoderBuffer,r=n(208).DecoderBuffer,a=n(84),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(t,e,n){var i={};this._baseState=i,i.name=n,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}t.exports=u;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};c.forEach((function(n){e[n]=t[n]}));var n=new this.constructor(e.parent);return n._baseState=e,n},u.prototype._wrap=function(){var t=this._baseState;l.forEach((function(e){this[e]=function(){var n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},u.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(a(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);var i=t[n];e[i]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){u.prototype[t]=function(){var e=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(n),this}})),u.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},u.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var i,o=n.default,a=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){var l=null;if(null!==n.explicit?l=n.explicit:null!==n.implicit?l=n.implicit:null!==n.tag&&(l=n.tag),null!==l||n.any){if(a=this._peekTag(t,l,n.any),t.isError(a))return a}else{var u=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(m){a=!1}t.restore(u)}}if(n.obj&&a&&(i=t.enterObject()),a){if(null!==n.explicit){var c=this._decodeTag(t,n.explicit);if(t.isError(c))return c;t=c}var d=t.offset;if(null===n.use&&null===n.choice){var h;n.any&&(h=t.save());var f=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(f))return f;n.any?o=t.raw(h):t=f}if(e&&e.track&&null!==n.tag&&e.track(t.path(),d,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var p=new r(o);o=this._getUse(n.contains,t._reporterState.obj)._decode(p,e)}}return n.obj&&a&&(o=t.leaveObject(i)),null===n.key||null===o&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,o),o},u.prototype._decodeGeneric=function(t,e,n){var i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],n):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var n=this._baseState;return n.useDecoder=this._use(t,e),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},u.prototype._decodeChoice=function(t,e){var n=this._baseState,i=null,o=!1;return Object.keys(n.choice).some((function(r){var a=t.save(),s=n.choice[r];try{var l=s._decode(t,e);if(t.isError(l))return!1;i={type:r,value:l},o=!0}catch(u){return t.restore(a),!1}return!0}),this),o?i:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new o(t,this.reporter)},u.prototype._encode=function(t,e,n){var i=this._baseState;if(null===i.default||i.default!==t){var o=this._encodeValue(t,e,n);if(void 0!==o&&!this._skipDefault(o,e,n))return o}},u.prototype._encodeValue=function(t,e,n){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(t,e||new i);var r=null;if(this.reporter=e,o.optional&&void 0===t){if(null===o.default)return;t=o.default}var a=null,s=!1;if(o.any)r=this._createEncoderBuffer(t);else if(o.choice)r=this._encodeChoice(t,e);else if(o.contains)a=this._getUse(o.contains,n)._encode(t,e),s=!0;else if(o.children)a=o.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");var i=e.enterKey(n._baseState.key);if("object"!==typeof t)return e.error("Child expected, but input is not object");var o=n._encode(t[n._baseState.key],e,t);return e.leaveKey(i),o}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return e.error("Too many args for : "+o.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var l=this.clone();l._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(n){var i=this._baseState;return this._getUse(i.args[0],t)._encode(n,e)}),l))}else null!==o.use?r=this._getUse(o.use,n)._encode(t,e):(a=this._encodePrimitive(o.tag,t),s=!0);if(!o.any&&null===o.choice){var u=null!==o.implicit?o.implicit:o.tag,c=null===o.implicit?"universal":"context";null===u?null===o.use&&e.error("Tag could be omitted only for .use()"):null===o.use&&(r=this._encodeComposite(u,s,c,a))}return null!==o.explicit&&(r=this._encodeComposite(o.explicit,!1,"context",r)),r},u.prototype._encodeChoice=function(t,e){var n=this._baseState,i=n.choice[t.type];return i||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,n){"use strict";var i=n(22);function o(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function r(t,e){this.path=t,this.rethrow(e)}e.Reporter=o,o.prototype.isError=function(t){return t instanceof r},o.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},o.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},o.prototype.enterKey=function(t){return this._reporterState.path.push(t)},o.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},o.prototype.leaveKey=function(t,e,n){var i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},o.prototype.leaveObject=function(t){var e=this._reporterState,n=e.obj;return e.obj=t,n},o.prototype.error=function(t){var e,n=this._reporterState,i=t instanceof r;if(e=i?t:new r(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return i||n.errors.push(e),e},o.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},i(r,Error),r.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(t,e,n){"use strict";function i(t){var e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);var i=t[n];e[i]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=i(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=i(e.tag)},function(t,e,n){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function o(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function r(t,e,n){if(r.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"===typeof t?t.exports=r:e.BN=r,r.BN=r,r.wordSize=26;try{a=n(1233).Buffer}catch(S){}function s(t,e,n){for(var i=0,o=Math.min(t.length,n),r=e;r=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function l(t,e,n,i){for(var o=0,r=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return o}r.isBN=function(t){return t instanceof r||null!==t&&"object"===typeof t&&t.constructor.wordSize===r.wordSize&&Array.isArray(t.words)},r.max=function(t,e){return t.cmp(e)>0?t:e},r.min=function(t,e){return t.cmp(e)<0?t:e},r.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&o++,16===e?this._parseHex(t,o):this._parseBase(t,e,o),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},r.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},r.prototype._initArray=function(t,e,n){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var o=0;o=0;o-=3)a=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[r]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.strip()},r.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)o=s(t,n,n+6),this.words[i]|=o<>>26-r&4194303,(r+=24)>=26&&(r-=26,i++);n+6!==e&&(o=s(t,e,n+6),this.words[i]|=o<>>26-r&4194303),this.strip()},r.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=e)i++;i--,o=o/e|0;for(var r=t.length-n,a=r%i,s=Math.min(r,r-a)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var u=["","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"],c=[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],d=[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(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var o=0|t.words[0],r=0|e.words[0],a=o*r,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var u=1;u>>26,d=67108863&l,h=Math.min(u,e.length-1),f=Math.max(0,u-t.length+1);f<=h;f++){var p=u-f|0;c+=(a=(o=0|t.words[p])*(r=0|e.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}r.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var o=0,r=0,a=0;a>>24-o&16777215)||a!==this.length-1?u[6-l.length]+l+n:l+n,(o+=2)>=26&&(o-=26,a--)}for(0!==r&&(n=r.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},r.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},r.prototype.toArrayLike=function(t,e,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===e,u=new t(r),c=this.clone();if(l){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},r.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},r.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},r.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},r.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},r.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},r.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},r.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},r.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(t){return this.clone().inotn(t)},r.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var n=t/26|0,o=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;rt.length?this.clone().iadd(t):t.clone().iadd(this)},r.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=t):(n=t,i=this);for(var r=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==r&&a>26,this.words[a]=67108863&e;if(0===r&&a>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],_=8191&g,v=g>>>13,y=0|a[3],b=8191&y,w=y>>>13,x=0|a[4],C=8191&x,S=x>>>13,k=0|a[5],I=8191&k,T=k>>>13,E=0|a[6],O=8191&E,M=E>>>13,P=0|a[7],D=8191&P,A=P>>>13,R=0|a[8],B=8191&R,N=R>>>13,L=0|a[9],F=8191&L,V=L>>>13,z=0|s[0],j=8191&z,H=z>>>13,W=0|s[1],U=8191&W,G=W>>>13,K=0|s[2],q=8191&K,$=K>>>13,Y=0|s[3],Z=8191&Y,X=Y>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,it=et>>>13,ot=0|s[6],rt=8191&ot,at=ot>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],dt=8191&ct,ht=ct>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(u+(i=Math.imul(d,j))|0)+((8191&(o=(o=Math.imul(d,H))+Math.imul(h,j)|0))<<13)|0;u=((r=Math.imul(h,H))+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,j),o=(o=Math.imul(p,H))+Math.imul(m,j)|0,r=Math.imul(m,H);var _t=(u+(i=i+Math.imul(d,U)|0)|0)+((8191&(o=(o=o+Math.imul(d,G)|0)+Math.imul(h,U)|0))<<13)|0;u=((r=r+Math.imul(h,G)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(_,j),o=(o=Math.imul(_,H))+Math.imul(v,j)|0,r=Math.imul(v,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,G)|0)+Math.imul(m,U)|0,r=r+Math.imul(m,G)|0;var vt=(u+(i=i+Math.imul(d,q)|0)|0)+((8191&(o=(o=o+Math.imul(d,$)|0)+Math.imul(h,q)|0))<<13)|0;u=((r=r+Math.imul(h,$)|0)+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(b,j),o=(o=Math.imul(b,H))+Math.imul(w,j)|0,r=Math.imul(w,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,G)|0)+Math.imul(v,U)|0,r=r+Math.imul(v,G)|0,i=i+Math.imul(p,q)|0,o=(o=o+Math.imul(p,$)|0)+Math.imul(m,q)|0,r=r+Math.imul(m,$)|0;var yt=(u+(i=i+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,X)|0)+Math.imul(h,Z)|0))<<13)|0;u=((r=r+Math.imul(h,X)|0)+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(C,j),o=(o=Math.imul(C,H))+Math.imul(S,j)|0,r=Math.imul(S,H),i=i+Math.imul(b,U)|0,o=(o=o+Math.imul(b,G)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,G)|0,i=i+Math.imul(_,q)|0,o=(o=o+Math.imul(_,$)|0)+Math.imul(v,q)|0,r=r+Math.imul(v,$)|0,i=i+Math.imul(p,Z)|0,o=(o=o+Math.imul(p,X)|0)+Math.imul(m,Z)|0,r=r+Math.imul(m,X)|0;var bt=(u+(i=i+Math.imul(d,Q)|0)|0)+((8191&(o=(o=o+Math.imul(d,tt)|0)+Math.imul(h,Q)|0))<<13)|0;u=((r=r+Math.imul(h,tt)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(I,j),o=(o=Math.imul(I,H))+Math.imul(T,j)|0,r=Math.imul(T,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,G)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,G)|0,i=i+Math.imul(b,q)|0,o=(o=o+Math.imul(b,$)|0)+Math.imul(w,q)|0,r=r+Math.imul(w,$)|0,i=i+Math.imul(_,Z)|0,o=(o=o+Math.imul(_,X)|0)+Math.imul(v,Z)|0,r=r+Math.imul(v,X)|0,i=i+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,r=r+Math.imul(m,tt)|0;var wt=(u+(i=i+Math.imul(d,nt)|0)|0)+((8191&(o=(o=o+Math.imul(d,it)|0)+Math.imul(h,nt)|0))<<13)|0;u=((r=r+Math.imul(h,it)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(O,j),o=(o=Math.imul(O,H))+Math.imul(M,j)|0,r=Math.imul(M,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,G)|0)+Math.imul(T,U)|0,r=r+Math.imul(T,G)|0,i=i+Math.imul(C,q)|0,o=(o=o+Math.imul(C,$)|0)+Math.imul(S,q)|0,r=r+Math.imul(S,$)|0,i=i+Math.imul(b,Z)|0,o=(o=o+Math.imul(b,X)|0)+Math.imul(w,Z)|0,r=r+Math.imul(w,X)|0,i=i+Math.imul(_,Q)|0,o=(o=o+Math.imul(_,tt)|0)+Math.imul(v,Q)|0,r=r+Math.imul(v,tt)|0,i=i+Math.imul(p,nt)|0,o=(o=o+Math.imul(p,it)|0)+Math.imul(m,nt)|0,r=r+Math.imul(m,it)|0;var xt=(u+(i=i+Math.imul(d,rt)|0)|0)+((8191&(o=(o=o+Math.imul(d,at)|0)+Math.imul(h,rt)|0))<<13)|0;u=((r=r+Math.imul(h,at)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(D,j),o=(o=Math.imul(D,H))+Math.imul(A,j)|0,r=Math.imul(A,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,G)|0)+Math.imul(M,U)|0,r=r+Math.imul(M,G)|0,i=i+Math.imul(I,q)|0,o=(o=o+Math.imul(I,$)|0)+Math.imul(T,q)|0,r=r+Math.imul(T,$)|0,i=i+Math.imul(C,Z)|0,o=(o=o+Math.imul(C,X)|0)+Math.imul(S,Z)|0,r=r+Math.imul(S,X)|0,i=i+Math.imul(b,Q)|0,o=(o=o+Math.imul(b,tt)|0)+Math.imul(w,Q)|0,r=r+Math.imul(w,tt)|0,i=i+Math.imul(_,nt)|0,o=(o=o+Math.imul(_,it)|0)+Math.imul(v,nt)|0,r=r+Math.imul(v,it)|0,i=i+Math.imul(p,rt)|0,o=(o=o+Math.imul(p,at)|0)+Math.imul(m,rt)|0,r=r+Math.imul(m,at)|0;var Ct=(u+(i=i+Math.imul(d,lt)|0)|0)+((8191&(o=(o=o+Math.imul(d,ut)|0)+Math.imul(h,lt)|0))<<13)|0;u=((r=r+Math.imul(h,ut)|0)+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,j),o=(o=Math.imul(B,H))+Math.imul(N,j)|0,r=Math.imul(N,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,G)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,G)|0,i=i+Math.imul(O,q)|0,o=(o=o+Math.imul(O,$)|0)+Math.imul(M,q)|0,r=r+Math.imul(M,$)|0,i=i+Math.imul(I,Z)|0,o=(o=o+Math.imul(I,X)|0)+Math.imul(T,Z)|0,r=r+Math.imul(T,X)|0,i=i+Math.imul(C,Q)|0,o=(o=o+Math.imul(C,tt)|0)+Math.imul(S,Q)|0,r=r+Math.imul(S,tt)|0,i=i+Math.imul(b,nt)|0,o=(o=o+Math.imul(b,it)|0)+Math.imul(w,nt)|0,r=r+Math.imul(w,it)|0,i=i+Math.imul(_,rt)|0,o=(o=o+Math.imul(_,at)|0)+Math.imul(v,rt)|0,r=r+Math.imul(v,at)|0,i=i+Math.imul(p,lt)|0,o=(o=o+Math.imul(p,ut)|0)+Math.imul(m,lt)|0,r=r+Math.imul(m,ut)|0;var St=(u+(i=i+Math.imul(d,dt)|0)|0)+((8191&(o=(o=o+Math.imul(d,ht)|0)+Math.imul(h,dt)|0))<<13)|0;u=((r=r+Math.imul(h,ht)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(F,j),o=(o=Math.imul(F,H))+Math.imul(V,j)|0,r=Math.imul(V,H),i=i+Math.imul(B,U)|0,o=(o=o+Math.imul(B,G)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,G)|0,i=i+Math.imul(D,q)|0,o=(o=o+Math.imul(D,$)|0)+Math.imul(A,q)|0,r=r+Math.imul(A,$)|0,i=i+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,X)|0)+Math.imul(M,Z)|0,r=r+Math.imul(M,X)|0,i=i+Math.imul(I,Q)|0,o=(o=o+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,r=r+Math.imul(T,tt)|0,i=i+Math.imul(C,nt)|0,o=(o=o+Math.imul(C,it)|0)+Math.imul(S,nt)|0,r=r+Math.imul(S,it)|0,i=i+Math.imul(b,rt)|0,o=(o=o+Math.imul(b,at)|0)+Math.imul(w,rt)|0,r=r+Math.imul(w,at)|0,i=i+Math.imul(_,lt)|0,o=(o=o+Math.imul(_,ut)|0)+Math.imul(v,lt)|0,r=r+Math.imul(v,ut)|0,i=i+Math.imul(p,dt)|0,o=(o=o+Math.imul(p,ht)|0)+Math.imul(m,dt)|0,r=r+Math.imul(m,ht)|0;var kt=(u+(i=i+Math.imul(d,pt)|0)|0)+((8191&(o=(o=o+Math.imul(d,mt)|0)+Math.imul(h,pt)|0))<<13)|0;u=((r=r+Math.imul(h,mt)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(F,U),o=(o=Math.imul(F,G))+Math.imul(V,U)|0,r=Math.imul(V,G),i=i+Math.imul(B,q)|0,o=(o=o+Math.imul(B,$)|0)+Math.imul(N,q)|0,r=r+Math.imul(N,$)|0,i=i+Math.imul(D,Z)|0,o=(o=o+Math.imul(D,X)|0)+Math.imul(A,Z)|0,r=r+Math.imul(A,X)|0,i=i+Math.imul(O,Q)|0,o=(o=o+Math.imul(O,tt)|0)+Math.imul(M,Q)|0,r=r+Math.imul(M,tt)|0,i=i+Math.imul(I,nt)|0,o=(o=o+Math.imul(I,it)|0)+Math.imul(T,nt)|0,r=r+Math.imul(T,it)|0,i=i+Math.imul(C,rt)|0,o=(o=o+Math.imul(C,at)|0)+Math.imul(S,rt)|0,r=r+Math.imul(S,at)|0,i=i+Math.imul(b,lt)|0,o=(o=o+Math.imul(b,ut)|0)+Math.imul(w,lt)|0,r=r+Math.imul(w,ut)|0,i=i+Math.imul(_,dt)|0,o=(o=o+Math.imul(_,ht)|0)+Math.imul(v,dt)|0,r=r+Math.imul(v,ht)|0;var It=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(o=(o=o+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((r=r+Math.imul(m,mt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(F,q),o=(o=Math.imul(F,$))+Math.imul(V,q)|0,r=Math.imul(V,$),i=i+Math.imul(B,Z)|0,o=(o=o+Math.imul(B,X)|0)+Math.imul(N,Z)|0,r=r+Math.imul(N,X)|0,i=i+Math.imul(D,Q)|0,o=(o=o+Math.imul(D,tt)|0)+Math.imul(A,Q)|0,r=r+Math.imul(A,tt)|0,i=i+Math.imul(O,nt)|0,o=(o=o+Math.imul(O,it)|0)+Math.imul(M,nt)|0,r=r+Math.imul(M,it)|0,i=i+Math.imul(I,rt)|0,o=(o=o+Math.imul(I,at)|0)+Math.imul(T,rt)|0,r=r+Math.imul(T,at)|0,i=i+Math.imul(C,lt)|0,o=(o=o+Math.imul(C,ut)|0)+Math.imul(S,lt)|0,r=r+Math.imul(S,ut)|0,i=i+Math.imul(b,dt)|0,o=(o=o+Math.imul(b,ht)|0)+Math.imul(w,dt)|0,r=r+Math.imul(w,ht)|0;var Tt=(u+(i=i+Math.imul(_,pt)|0)|0)+((8191&(o=(o=o+Math.imul(_,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((r=r+Math.imul(v,mt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(F,Z),o=(o=Math.imul(F,X))+Math.imul(V,Z)|0,r=Math.imul(V,X),i=i+Math.imul(B,Q)|0,o=(o=o+Math.imul(B,tt)|0)+Math.imul(N,Q)|0,r=r+Math.imul(N,tt)|0,i=i+Math.imul(D,nt)|0,o=(o=o+Math.imul(D,it)|0)+Math.imul(A,nt)|0,r=r+Math.imul(A,it)|0,i=i+Math.imul(O,rt)|0,o=(o=o+Math.imul(O,at)|0)+Math.imul(M,rt)|0,r=r+Math.imul(M,at)|0,i=i+Math.imul(I,lt)|0,o=(o=o+Math.imul(I,ut)|0)+Math.imul(T,lt)|0,r=r+Math.imul(T,ut)|0,i=i+Math.imul(C,dt)|0,o=(o=o+Math.imul(C,ht)|0)+Math.imul(S,dt)|0,r=r+Math.imul(S,ht)|0;var Et=(u+(i=i+Math.imul(b,pt)|0)|0)+((8191&(o=(o=o+Math.imul(b,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((r=r+Math.imul(w,mt)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(F,Q),o=(o=Math.imul(F,tt))+Math.imul(V,Q)|0,r=Math.imul(V,tt),i=i+Math.imul(B,nt)|0,o=(o=o+Math.imul(B,it)|0)+Math.imul(N,nt)|0,r=r+Math.imul(N,it)|0,i=i+Math.imul(D,rt)|0,o=(o=o+Math.imul(D,at)|0)+Math.imul(A,rt)|0,r=r+Math.imul(A,at)|0,i=i+Math.imul(O,lt)|0,o=(o=o+Math.imul(O,ut)|0)+Math.imul(M,lt)|0,r=r+Math.imul(M,ut)|0,i=i+Math.imul(I,dt)|0,o=(o=o+Math.imul(I,ht)|0)+Math.imul(T,dt)|0,r=r+Math.imul(T,ht)|0;var Ot=(u+(i=i+Math.imul(C,pt)|0)|0)+((8191&(o=(o=o+Math.imul(C,mt)|0)+Math.imul(S,pt)|0))<<13)|0;u=((r=r+Math.imul(S,mt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(F,nt),o=(o=Math.imul(F,it))+Math.imul(V,nt)|0,r=Math.imul(V,it),i=i+Math.imul(B,rt)|0,o=(o=o+Math.imul(B,at)|0)+Math.imul(N,rt)|0,r=r+Math.imul(N,at)|0,i=i+Math.imul(D,lt)|0,o=(o=o+Math.imul(D,ut)|0)+Math.imul(A,lt)|0,r=r+Math.imul(A,ut)|0,i=i+Math.imul(O,dt)|0,o=(o=o+Math.imul(O,ht)|0)+Math.imul(M,dt)|0,r=r+Math.imul(M,ht)|0;var Mt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(o=(o=o+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((r=r+Math.imul(T,mt)|0)+(o>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(F,rt),o=(o=Math.imul(F,at))+Math.imul(V,rt)|0,r=Math.imul(V,at),i=i+Math.imul(B,lt)|0,o=(o=o+Math.imul(B,ut)|0)+Math.imul(N,lt)|0,r=r+Math.imul(N,ut)|0,i=i+Math.imul(D,dt)|0,o=(o=o+Math.imul(D,ht)|0)+Math.imul(A,dt)|0,r=r+Math.imul(A,ht)|0;var Pt=(u+(i=i+Math.imul(O,pt)|0)|0)+((8191&(o=(o=o+Math.imul(O,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((r=r+Math.imul(M,mt)|0)+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(F,lt),o=(o=Math.imul(F,ut))+Math.imul(V,lt)|0,r=Math.imul(V,ut),i=i+Math.imul(B,dt)|0,o=(o=o+Math.imul(B,ht)|0)+Math.imul(N,dt)|0,r=r+Math.imul(N,ht)|0;var Dt=(u+(i=i+Math.imul(D,pt)|0)|0)+((8191&(o=(o=o+Math.imul(D,mt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((r=r+Math.imul(A,mt)|0)+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,i=Math.imul(F,dt),o=(o=Math.imul(F,ht))+Math.imul(V,dt)|0,r=Math.imul(V,ht);var At=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(o=(o=o+Math.imul(B,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((r=r+Math.imul(N,mt)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863;var Rt=(u+(i=Math.imul(F,pt))|0)+((8191&(o=(o=Math.imul(F,mt))+Math.imul(V,pt)|0))<<13)|0;return u=((r=Math.imul(V,mt))+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l[0]=gt,l[1]=_t,l[2]=vt,l[3]=yt,l[4]=bt,l[5]=wt,l[6]=xt,l[7]=Ct,l[8]=St,l[9]=kt,l[10]=It,l[11]=Tt,l[12]=Et,l[13]=Ot,l[14]=Mt,l[15]=Pt,l[16]=Dt,l[17]=At,l[18]=Rt,0!==u&&(l[19]=u,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(f=h),r.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?f(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,a&=67108863}n.words[r]=s,i=a,a=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=r.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,n,i,o,r){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&r,r>>>=13;for(a=2*e;a>=26,e+=o/67108864|0,e+=r>>>26,this.words[n]=67108863&r}return 0!==e&&(this.words[n]=e,this.length++),this},r.prototype.muln=function(t){return this.clone().imuln(t)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>o}return e}(t);if(0===e.length)return new r(1);for(var n=this,i=0;i=0);var e,n=t%26,o=(t-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==o){for(e=this.length-1;e>=0;e--)this.words[e+o]=this.words[e];for(e=0;e=0),o=e?(e-e%26)/26:0;var r=t%26,a=Math.min((t-r)/26,this.length),s=67108863^67108863>>>r<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=o);u--){var d=0|this.words[u];this.words[u]=c<<26-r|d>>>r,c=d&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},r.prototype.shln=function(t){return this.clone().ishln(t)},r.prototype.ushln=function(t){return this.clone().iushln(t)},r.prototype.shrn=function(t){return this.clone().ishrn(t)},r.prototype.ushrn=function(t){return this.clone().iushrn(t)},r.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,o=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var o=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},r.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===s)return this.strip();for(i(-1===s),s=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),o=t,a=0|o.words[o.length-1];0!==(n=26-this._countBits(a))&&(o=o.ushln(n),i.iushln(n),a=0|o.words[o.length-1]);var s,l=i.length-o.length;if("mod"!==e){(s=new r(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var h=67108864*(0|i.words[o.length+d])+(0|i.words[o.length+d-1]);for(h=Math.min(h/a|0,67108863),i._ishlnsubmul(o,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(o,1,d),i.isZero()||(i.negative^=1);s&&(s.words[d]=h)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},r.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(o=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:o,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new r(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new r(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new r(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,a,s},r.prototype.div=function(t){return this.divmod(t,"div",!1).div},r.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},r.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},r.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),o=t.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},r.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(e*n+(0|this.words[o]))%t;return n},r.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*e;this.words[n]=o/t|0,e=o%t}return this.strip()},r.prototype.divn=function(t){return this.clone().idivn(t)},r.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new r(1),a=new r(0),s=new r(0),l=new r(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),d=e.clone();!e.isZero();){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.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(c),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s),a.isub(l)):(n.isub(e),s.isub(o),l.isub(a))}return{a:s,b:l,gcd:n.iushln(u)}},r.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,a=new r(1),s=new r(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0===(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,h=1;0===(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(o=0===e.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(t),o},r.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=e.cmp(n);if(o<0){var r=e;e=n,n=r}else if(0===o||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},r.prototype.invm=function(t){return this.egcd(t).a.umod(t)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(t){return this.words[0]&t},r.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,n=(t-e)/26,o=1<>>26,s&=67108863,this.words[a]=s}return 0!==r&&(this.words[a]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var o=0|this.words[0];e=o===t?0:ot.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|t.words[n];if(i!==o){io&&(e=1);break}}return e},r.prototype.gtn=function(t){return 1===this.cmpn(t)},r.prototype.gt=function(t){return 1===this.cmp(t)},r.prototype.gten=function(t){return this.cmpn(t)>=0},r.prototype.gte=function(t){return this.cmp(t)>=0},r.prototype.ltn=function(t){return-1===this.cmpn(t)},r.prototype.lt=function(t){return-1===this.cmp(t)},r.prototype.lten=function(t){return this.cmpn(t)<=0},r.prototype.lte=function(t){return this.cmp(t)<=0},r.prototype.eqn=function(t){return 0===this.cmpn(t)},r.prototype.eq=function(t){return 0===this.cmp(t)},r.red=function(t){return new x(t)},r.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(t){return this.red=t,this},r.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},r.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},r.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},r.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},r.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},r.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},r.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},r.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new r(e,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=r._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(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)}_.prototype._tmp=function(){var t=new r(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},o(v,_),v.prototype.split=function(t,e){for(var n=Math.min(t.length,9),i=0;i>>22,o=r}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=o,e=i}return 0!==e&&(t.words[t.length++]=e),t},r._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return g[t]=e,e},x.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var n=this.m.add(new r(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);i(!o.isZero());var s=new r(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var d=this.pow(c,o),h=this.pow(t,o.addn(1).iushrn(1)),f=this.pow(t,o),p=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var u=e.words[i],c=l-1;c>=0;c--){var d=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===i&&0===c)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}l=26}return o},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},r.mont=function(t){return new C(t)},o(C,x),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new r(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(127)(t))},function(t,e,n){!function(e,i){var o;t.exports=(o=n(35),function(){var t=o,e=t.lib,n=e.WordArray,i=e.Hasher,r=t.algo,a=[],s=r.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,i=n[0],o=n[1],r=n[2],s=n[3],l=n[4],u=0;u<80;u++){if(u<16)a[u]=0|t[e+u];else{var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=(i<<5|i>>>27)+l+a[u];d+=u<20?1518500249+(o&r|~o&s):u<40?1859775393+(o^r^s):u<60?(o&r|o&s|r&s)-1894007588:(o^r^s)-899497514,l=s,s=r,r=o<<30|o>>>2,o=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(i+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),o.SHA1)}()},function(t,e,n){!function(e,i){var o;t.exports=(o=n(35),void function(){var t=o,e=t.lib.Base,n=t.enc.Utf8;t.algo.HMAC=e.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=n.parse(e));var i=t.blockSize,o=4*i;e.sigBytes>o&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),a=this._iKey=e.clone(),s=r.words,l=a.words,u=0;u0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}Object.create;var c=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function d(t,e){var n=function(t){var e=t.name;if(e&&-1!==e.lastIndexOf(".")&&!t.type){var n=e.split(".").pop().toLowerCase(),i=c.get(n);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}(t);if("string"!==typeof n.path){var i=t.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof e?e:"string"===typeof i&&i.length>0?i:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}var h=[".DS_Store","Thumbs.db"];function f(t){return s(this,void 0,void 0,(function(){return l(this,(function(e){return[2,(n=t,n.dataTransfer&&t.dataTransfer?m(t.dataTransfer,t.type):p(t))];var n}))}))}function p(t){return(null!==t.target&&t.target.files?_(t.target.files):[]).map((function(t){return d(t)}))}function m(t,e){return s(this,void 0,void 0,(function(){var n;return l(this,(function(i){switch(i.label){case 0:return t.items?(n=_(t.items).filter((function(t){return"file"===t.kind})),"drop"!==e?[2,n]:[4,Promise.all(n.map(v))]):[3,2];case 1:return[2,g(y(i.sent()))];case 2:return[2,g(_(t.files).map((function(t){return d(t)})))]}}))}))}function g(t){return t.filter((function(t){return-1===h.indexOf(t.name)}))}function _(t){for(var e=[],n=0;nn)return[!1,E(n)];if(t.sizen)return[!1,E(n)]}return[!0,null]}function A(t){return void 0!==t&&null!==t}function R(t){var e=t.files,n=t.accept,i=t.minSize,o=t.maxSize;return!(!t.multiple&&e.length>1)&&e.every((function(t){var e=I(P(t,n),1)[0],r=I(D(t,i,o),1)[0];return e&&r}))}function B(t){return"function"===typeof t.isPropagationStopped?t.isPropagationStopped():"undefined"!==typeof t.cancelBubble&&t.cancelBubble}function N(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,(function(t){return"Files"===t||"application/x-moz-file"===t})):!!t.target&&!!t.target.files}function L(t){t.preventDefault()}function F(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}function V(t){return-1!==t.indexOf("Edge/")}function z(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return F(t)||V(t)}function j(){for(var t=arguments.length,e=new Array(t),n=0;n1?n-1:0),o=1;o=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var $=Object(i.forwardRef)((function(t,e){var n=t.children,r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.accept,n=t.disabled,o=void 0!==n&&n,r=t.getFilesFromEvent,a=void 0===r?f:r,s=t.maxSize,l=void 0===s?1/0:s,u=t.minSize,c=void 0===u?0:u,d=t.multiple,h=void 0===d||d,p=t.maxFiles,m=void 0===p?0:p,g=t.onDragEnter,_=t.onDragLeave,v=t.onDragOver,y=t.onDrop,b=t.onDropAccepted,w=t.onDropRejected,x=t.onFileDialogCancel,C=t.preventDropOnDocument,S=void 0===C||C,k=t.noClick,I=void 0!==k&&k,T=t.noKeyboard,E=void 0!==T&&T,O=t.noDrag,A=void 0!==O&&O,F=t.noDragEventsBubbling,V=void 0!==F&&F,U=Object(i.useRef)(null),$=Object(i.useRef)(null),X=Object(i.useReducer)(Z,Y),J=W(X,2),Q=J[0],tt=J[1],et=Q.isFocused,nt=Q.isFileDialogActive,it=Q.draggedFiles,ot=Object(i.useCallback)((function(){$.current&&(tt({type:"openDialog"}),$.current.value=null,$.current.click())}),[tt]),rt=function(){nt&&setTimeout((function(){$.current&&($.current.files.length||(tt({type:"closeDialog"}),"function"===typeof x&&x()))}),300)};Object(i.useEffect)((function(){return window.addEventListener("focus",rt,!1),function(){window.removeEventListener("focus",rt,!1)}}),[$,nt,x]);var at=Object(i.useCallback)((function(t){U.current&&U.current.isEqualNode(t.target)&&(32!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),ot()))}),[U,$]),st=Object(i.useCallback)((function(){tt({type:"focus"})}),[]),lt=Object(i.useCallback)((function(){tt({type:"blur"})}),[]),ut=Object(i.useCallback)((function(){I||(z()?setTimeout(ot,0):ot())}),[$,I]),ct=Object(i.useRef)([]),dt=function(t){U.current&&U.current.contains(t.target)||(t.preventDefault(),ct.current=[])};Object(i.useEffect)((function(){return S&&(document.addEventListener("dragover",L,!1),document.addEventListener("drop",dt,!1)),function(){S&&(document.removeEventListener("dragover",L),document.removeEventListener("drop",dt))}}),[U,S]);var ht=Object(i.useCallback)((function(t){t.preventDefault(),t.persist(),yt(t),ct.current=[].concat(H(ct.current),[t.target]),N(t)&&Promise.resolve(a(t)).then((function(e){B(t)&&!V||(tt({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),g&&g(t))}))}),[a,g,V]),ft=Object(i.useCallback)((function(t){if(t.preventDefault(),t.persist(),yt(t),t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch(e){}return N(t)&&v&&v(t),!1}),[v,V]),pt=Object(i.useCallback)((function(t){t.preventDefault(),t.persist(),yt(t);var e=ct.current.filter((function(t){return U.current&&U.current.contains(t)})),n=e.indexOf(t.target);-1!==n&&e.splice(n,1),ct.current=e,e.length>0||(tt({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),N(t)&&_&&_(t))}),[U,_,V]),mt=Object(i.useCallback)((function(t){t.preventDefault(),t.persist(),yt(t),ct.current=[],N(t)&&Promise.resolve(a(t)).then((function(n){if(!B(t)||V){var i=[],o=[];n.forEach((function(t){var n=W(P(t,e),2),r=n[0],a=n[1],s=W(D(t,c,l),2),u=s[0],d=s[1];if(r&&u)i.push(t);else{var h=[a,d].filter((function(t){return t}));o.push({file:t,errors:h})}})),(!h&&i.length>1||h&&m>=1&&i.length>m)&&(i.forEach((function(t){o.push({file:t,errors:[M]})})),i.splice(0)),tt({acceptedFiles:i,fileRejections:o,type:"setFiles"}),y&&y(i,o,t),o.length>0&&w&&w(o,t),i.length>0&&b&&b(i,t)}})),tt({type:"reset"})}),[h,e,c,l,a,y,b,w,V]),gt=function(t){return o?null:t},_t=function(t){return E?null:gt(t)},vt=function(t){return A?null:gt(t)},yt=function(t){V&&t.stopPropagation()},bt=Object(i.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.onKeyDown,r=t.onFocus,a=t.onBlur,s=t.onClick,l=t.onDragEnter,u=t.onDragOver,c=t.onDragLeave,d=t.onDrop,h=q(t,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return G(K({onKeyDown:_t(j(i,at)),onFocus:_t(j(r,st)),onBlur:_t(j(a,lt)),onClick:gt(j(s,ut)),onDragEnter:vt(j(l,ht)),onDragOver:vt(j(u,ft)),onDragLeave:vt(j(c,pt)),onDrop:vt(j(d,mt))},n,U),o||E?{}:{tabIndex:0},{},h)}}),[U,at,st,lt,ut,ht,ft,pt,mt,E,A,o]),wt=Object(i.useCallback)((function(t){t.stopPropagation()}),[]),xt=Object(i.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.refKey,i=void 0===n?"ref":n,o=t.onChange,r=t.onClick,a=q(t,["refKey","onChange","onClick"]),s=K({accept:e,multiple:h,type:"file",style:{display:"none"},onChange:gt(j(o,mt)),onClick:gt(j(r,wt)),autoComplete:"off",tabIndex:-1},i,$);return G({},s,{},a)}}),[$,e,h,mt,o]),Ct=it.length,St=Ct>0&&R({files:it,accept:e,minSize:c,maxSize:l,multiple:h}),kt=Ct>0&&!St;return G({},Q,{isDragAccept:St,isDragReject:kt,isFocused:et&&!o,getRootProps:bt,getInputProps:xt,rootRef:U,inputRef:$,open:gt(ot)})}(q(t,["children"])),a=r.open,s=q(r,["open"]);return Object(i.useImperativeHandle)(e,(function(){return{open:a}}),[a]),o.a.createElement(i.Fragment,null,n(G({},s,{open:a})))}));$.displayName="Dropzone",$.propTypes={children:a.a.func,accept:a.a.oneOfType([a.a.string,a.a.arrayOf(a.a.string)]),multiple:a.a.bool,preventDropOnDocument:a.a.bool,noClick:a.a.bool,noKeyboard:a.a.bool,noDrag:a.a.bool,noDragEventsBubbling:a.a.bool,minSize:a.a.number,maxSize:a.a.number,maxFiles:a.a.number,disabled:a.a.bool,getFilesFromEvent:a.a.func,onFileDialogCancel:a.a.func,onDragEnter:a.a.func,onDragLeave:a.a.func,onDragOver:a.a.func,onDrop:a.a.func,onDropAccepted:a.a.func,onDropRejected:a.a.func};e.a=$;var Y={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Z(t,e){switch(e.type){case"focus":return G({},t,{isFocused:!0});case"blur":return G({},t,{isFocused:!1});case"openDialog":return G({},t,{isFileDialogActive:!0});case"closeDialog":return G({},t,{isFileDialogActive:!1});case"setDraggedFiles":var n=e.isDragActive;return G({},t,{draggedFiles:e.draggedFiles,isDragActive:n});case"setFiles":return G({},t,{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return G({},t,{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return t}}},function(t,e,n){"use strict";(function(t,i){var o,r=n(583);o="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:i;var a=Object(r.a)(o);e.a=a}).call(this,n(56),n(614)(t))},function(t,e,n){"use strict";(function(t){var i=n(1),o=n.n(i),r=n(75),a=n(9),s=n.n(a),l="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function u(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,i){t=n,e.forEach((function(e){return e(t,i)}))}}}var c=o.a.createContext||function(t,e){var n,o,a="__create-react-context-"+function(){var t="__global_unique_id__";return l[t]=(l[t]||0)+1}()+"__",c=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=u(e.props.value),e}Object(r.a)(n,t);var i=n.prototype;return i.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},i.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,i=this.props.value,o=t.value;((r=i)===(a=o)?0!==r||1/r===1/a:r!==r&&a!==a)?n=0:(n="function"===typeof e?e(i,o):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var r,a},i.render=function(){return this.props.children},n}(i.Component);c.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!==((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(r.a)(n,e);var i=n.prototype;return i.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},i.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},i.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},i.getValue=function(){return this.context[a]?this.context[a].get():t},i.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(i.Component);return d.contextTypes=((o={})[a]=s.a.object,o),{Provider:c,Consumer:d}};e.a=c}).call(this,n(56))},function(t,e,n){var i=n(1259);t.exports=f,t.exports.parse=r,t.exports.compile=function(t,e){return s(r(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function r(t,e){for(var n,i=[],r=0,a=0,s="",c=e&&e.delimiter||"/";null!=(n=o.exec(t));){var d=n[0],h=n[1],f=n.index;if(s+=t.slice(a,f),a=f+d.length,h)s+=h[1];else{var p=t[a],m=n[2],g=n[3],_=n[4],v=n[5],y=n[6],b=n[7];s&&(i.push(s),s="");var w=null!=m&&null!=p&&p!==m,x="+"===y||"*"===y,C="?"===y||"*"===y,S=n[2]||c,k=_||v;i.push({name:g||r++,prefix:m||"",delimiter:S,optional:C,repeat:x,partial:w,asterisk:!!b,pattern:k?u(k):b?".*":"[^"+l(S)+"]+?"})}}return a=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){s.headers[t]=i.merge(r)})),t.exports=s}).call(this,n(50))},function(t,e,n){"use strict";var i=n(72),o=n(603),r=n(345),a=n(605),s=n(608),l=n(609),u=n(349);t.exports=function(t){return new Promise((function(e,c){var d=t.data,h=t.headers;i.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",m=t.auth.password||"";h.Authorization="Basic "+btoa(p+":"+m)}var g=a(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),r(g,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};o(e,c,i),f=null}},f.onabort=function(){f&&(c(u("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),c(u(e,t,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var _=n(610),v=(t.withCredentials||l(g))&&t.xsrfCookieName?_.read(t.xsrfCookieName):void 0;v&&(h[t.xsrfHeaderName]=v)}if("setRequestHeader"in f&&i.forEach(h,(function(t,e){"undefined"===typeof d&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)})),i.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(y){if("json"!==t.responseType)throw y}"function"===typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),c(t),f=null)})),void 0===d&&(d=null),f.send(d)}))}},function(t,e,n){"use strict";var i=n(604);t.exports=function(t,e,n,o,r){var a=new Error(t);return i(a,e,n,o,r)}},function(t,e,n){"use strict";var i=n(72);t.exports=function(t,e){e=e||{};var n={},o=["url","method","params","data"],r=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(o,(function(t){"undefined"!==typeof e[t]&&(n[t]=e[t])})),i.forEach(r,(function(o){i.isObject(e[o])?n[o]=i.deepMerge(t[o],e[o]):"undefined"!==typeof e[o]?n[o]=e[o]:i.isObject(t[o])?n[o]=i.deepMerge(t[o]):"undefined"!==typeof t[o]&&(n[o]=t[o])})),i.forEach(a,(function(i){"undefined"!==typeof e[i]?n[i]=e[i]:"undefined"!==typeof t[i]&&(n[i]=t[i])}));var s=o.concat(r).concat(a),l=Object.keys(e).filter((function(t){return-1===s.indexOf(t)}));return i.forEach(l,(function(i){"undefined"!==typeof e[i]?n[i]=e[i]:"undefined"!==typeof t[i]&&(n[i]=t[i])})),n}},function(t,e,n){"use strict";function i(t){this.message=t}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,t.exports=i},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(){return null},e}(n(1).PureComponent);e.Template=r;var a=function(t){return t.component||t.render||t.children?null:new Error("The Template component requires 'component' or 'render' property")};r.propTypes={name:o.string.isRequired,component:a,render:a,children:a},e.findProps=function(t){if(t.type===r)return{name:t.props.name,render:t.props.render,component:t.props.component,children:t.props.children,keyFn:t.props.keyFn}}},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=C(n(3)),r=C(n(6)),a=C(n(47)),s=C(n(25)),l=C(n(18)),u=C(n(15)),c=n(0),d=n(4),h=n(17),f=C(n(5)),p=n(2),m=C(n(8)),g=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var e=x();if(e&&e.has(t))return e.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=o?Object.getOwnPropertyDescriptor(t,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=t[r]}n.default=t,e&&e.set(t,n);return n}(n(11)),_=C(n(215)),v=n(7),y=n(73),b=n(70),w=C(n(36));function x(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return x=function(){return t},t}function C(t){return t&&t.__esModule?t:{default:t}}var S=_.default.inherit({_activeStateUnit:".dx-accordion-item",_getDefaultOptions:function(){return(0,c.extend)(this.callBase(),{hoverStateEnabled:!0,height:void 0,itemTitleTemplate:"title",onItemTitleClick:null,selectedIndex:0,collapsible:!1,multiple:!1,animationDuration:300,deferRendering:!0,selectionByClick:!0,activeStateEnabled:!0,_itemAttributes:{role:"tab"},_animationEasing:"ease"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return"desktop"===l.default.real().deviceType&&!l.default.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return w.default.isMaterial()},options:{animationDuration:200,_animationEasing:"cubic-bezier(0.4, 0, 0.2, 1)"}}])},_itemElements:function(){return this._itemContainer().children(this._itemSelector())},_init:function(){this.callBase(),this.option("selectionRequired",!this.option("collapsible")),this.option("selectionMode",this.option("multiple")?"multiple":"single");var t=this.$element();t.addClass("dx-accordion"),this._$container=(0,o.default)("
").addClass("dx-accordion-wrapper"),t.append(this._$container)},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({title:new y.BindableTemplate((function(t,e){if((0,p.isPlainObject)(e)){var n=(0,b.getImageContainer)(e.icon);n&&t.append(n),(0,p.isDefined)(e.title)&&!(0,p.isPlainObject)(e.title)&&t.append(u.default.createTextNode(e.title))}else(0,p.isDefined)(e)&&t.text(String(e));t.wrapInner((0,o.default)("
").addClass("dx-accordion-item-title-caption"))}),["title","icon"],this.option("integrationOptions.watchMethod"))})},_initMarkup:function(){var t=this;this._deferredItems=[],this.callBase(),this.setAria({role:"tablist",multiselectable:this.option("multiple")}),(0,d.deferRender)((function(){var e=t._getSelectedItemIndices();t._renderSelection(e,[])}))},_render:function(){this.callBase(),this._updateItemHeightsWrapper(!0)},_itemDataKey:function(){return"dxAccordionItemData"},_itemClass:function(){return"dx-accordion-item"},_itemContainer:function(){return this._$container},_itemTitles:function(){return this._itemElements().find(".dx-accordion-item-title")},_itemContents:function(){return this._itemElements().find(".dx-accordion-item-body")},_getItemData:function(t){return(0,o.default)(t).parent().data(this._itemDataKey())||this.callBase.apply(this,arguments)},_executeItemRenderAction:function(t){t.type||this.callBase.apply(this,arguments)},_itemSelectHandler:function(t){(0,o.default)(t.target).closest(this._itemContents()).length||this.callBase.apply(this,arguments)},_afterItemElementDeleted:function(t,e){this._deferredItems.splice(e.itemIndex,1),this.callBase.apply(this,arguments)},_renderItemContent:function(t){var e=this.callBase((0,c.extend)({},t,{contentClass:"dx-accordion-item-title",templateProperty:"titleTemplate",defaultTemplateName:this.option("itemTitleTemplate")}));this._attachItemTitleClickAction(e);var n=new v.Deferred;(0,p.isDefined)(this._deferredItems[t.index])?this._deferredItems[t.index]=n:this._deferredItems.push(n),(!this.option("deferRendering")||this._getSelectedItemIndices().indexOf(t.index)>=0)&&n.resolve(),n.done(this.callBase.bind(this,(0,c.extend)({},t,{contentClass:"dx-accordion-item-body",container:(0,h.getPublicElement)((0,o.default)("
").appendTo((0,o.default)(e).parent()))})))},_attachItemTitleClickAction:function(t){var e=g.addNamespace(s.default.name,this.NAME);r.default.off(t,e),r.default.on(t,e,this._itemTitleClickHandler.bind(this))},_itemTitleClickHandler:function(t){this._itemDXEventHandler(t,"onItemTitleClick")},_renderSelection:function(t,e){this._itemElements().addClass("dx-accordion-item-closed"),this.setAria("hidden",!0,this._itemContents()),this._updateItems(t,e)},_updateSelection:function(t,e){this._updateItems(t,e),this._updateItemHeightsWrapper(!1)},_updateItems:function(t,e){var n=this,i=this._itemElements();f.default.each(t,(function(t,e){n._deferredItems[e].resolve();var o=i.eq(e).addClass("dx-accordion-item-opened").removeClass("dx-accordion-item-closed");n.setAria("hidden",!1,o.find(".dx-accordion-item-body"))})),f.default.each(e,(function(t,e){var o=i.eq(e).removeClass("dx-accordion-item-opened");n.setAria("hidden",!0,o.find(".dx-accordion-item-body"))}))},_updateItemHeightsWrapper:function(t){this.option("templatesRenderAsynchronously")?this._animationTimer=setTimeout(function(){this._updateItemHeights(t)}.bind(this)):this._updateItemHeights(t)},_updateItemHeights:function(t){var e=this,n=e._deferredAnimate,i=this._splitFreeSpace(this._calculateFreeSpace());return clearTimeout(this._animationTimer),v.when.apply(o.default,[].slice.call(this._itemElements()).map((function(n){return e._updateItemHeight((0,o.default)(n),i,t)}))).done((function(){n&&n.resolveWith(e)}))},_updateItemHeight:function(t,e,n){var i=t.children(".dx-accordion-item-title");a.default.isAnimating(t)&&a.default.stop(t);var o=t.outerHeight(),r=t.hasClass("dx-accordion-item-opened")?e+i.outerHeight()||t.height("auto").outerHeight():i.outerHeight();return this._animateItem(t,o,r,n,!!e)},_animateItem:function(t,e,n,i,o){var r;return i||e===n?(t.css("height",n),r=(new v.Deferred).resolve()):r=a.default.animate(t,{type:"custom",from:{height:e},to:{height:n},duration:this.option("animationDuration"),easing:this.option("_animationEasing")}),r.done((function(){t.hasClass("dx-accordion-item-opened")&&!o&&t.css("height",""),t.not(".dx-accordion-item-opened").addClass("dx-accordion-item-closed")}))},_splitFreeSpace:function(t){return t?t/this.option("selectedItems").length:t},_calculateFreeSpace:function(){var t=this.option("height");if(void 0!==t&&"auto"!==t){var e=this._itemTitles(),n=0;return f.default.each(e,(function(t,e){n+=(0,o.default)(e).outerHeight()})),this.$element().height()-n}},_visibilityChanged:function(t){t&&this._dimensionChanged()},_dimensionChanged:function(){this._updateItemHeights(!0)},_clean:function(){clearTimeout(this._animationTimer),this.callBase()},_itemOptionChanged:function(t,e,n,i){this.callBase(t,e,n,i),"visible"===e&&this._updateItemHeightsWrapper(!0)},_tryParseItemPropertyName:function(t){var e=t.match(/.*\.(.*)/);if((0,p.isDefined)(e)&&e.length>=1)return e[1]},_optionChanged:function(t){switch(t.name){case"items":this.callBase(t),"title"===this._tryParseItemPropertyName(t.fullName)&&this._renderSelection(this._getSelectedItemIndices(),[]);break;case"animationDuration":case"onItemTitleClick":case"_animationEasing":break;case"collapsible":this.option("selectionRequired",!this.option("collapsible"));break;case"itemTitleTemplate":case"height":case"deferRendering":this._invalidate();break;case"multiple":this.option("selectionMode",t.value?"multiple":"single");break;default:this.callBase(t)}},expandItem:function(t){return this._deferredAnimate=new v.Deferred,this.selectItem(t),this._deferredAnimate.promise()},collapseItem:function(t){return this._deferredAnimate=new v.Deferred,this.unselectItem(t),this._deferredAnimate.promise()},updateDimensions:function(){return this._updateItemHeights(!1)}});(0,m.default)("dxAccordion",S),t.exports=S,t.exports.default=t.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(255),r=(i=o)&&i.__esModule?i:{default:i};e.default=new r.default},function(t,e,n){"use strict";var i=n(16).merge,o=n(15),r=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,a={default:{tagsCount:0,startTags:"",endTags:""},thead:{tagsCount:1,startTags:"
").addClass(g).append(f),l.push(p)}return l}};t.exports=u},function(t,e,n){"use strict";var i=n(3),o=n(4).noop,r=n(0).extend,a=n(24).getBoundingRect,s=n(8),l=n(309),u=n(26),c=n(310),d=n(1068),h=u.dateToMilliseconds,f=l.inherit({_init:function(){this.callBase(),this.$element().addClass("dx-scheduler-timeline"),this._$sidebarTable=i("
").addClass("dx-scheduler-group-table")},_getCellFromNextRow:function(t,e){return e?this._$focusedCell:this.callBase(t,e)},_getDefaultGroupStrategy:function(){return"vertical"},_toggleGroupingDirectionClass:function(){this.$element().toggleClass("dx-scheduler-work-space-horizontal-grouped",this._isHorizontalGroupedWorkSpace())},_getDefaultOptions:function(){return r(this.callBase(),{groupOrientation:"vertical"})},_getRowCount:function(){return 1},_getCellCount:function(){return this._getCellCountInDay()*this.option("intervalCount")},getGroupTableWidth:function(){return this._$sidebarTable?this._$sidebarTable.outerWidth():0},_getTotalRowCount:function(t){return this._isHorizontalGroupedWorkSpace()?this._getRowCount():(t=t||1,this._getRowCount()*t)},_getDateByIndex:function(t){var e=new Date(this._firstViewDate),n=Math.floor(t/this._getCellCountInDay());return e.setTime(this._firstViewDate.getTime()+this._calculateCellIndex(0,t)*this._getInterval()+n*this._getHiddenInterval()),e},_getFormat:function(){return"shorttime"},_needApplyLastGroupCellClass:function(){return!0},_calculateHiddenInterval:function(t,e){return Math.floor(e/this._getCellCountInDay())*this._getHiddenInterval()},_getMillisecondsOffset:function(t,e){return e=this._calculateCellIndex(t,e),this._getInterval()*e+this._calculateHiddenInterval(t,e)},_createWorkSpaceElements:function(){this._createWorkSpaceScrollableElements()},_getWorkSpaceHeight:function(){return this.option("crossScrollingEnabled")?a(this._$dateTable.get(0)).height:a(this.$element().get(0)).height},_dateTableScrollableConfig:function(){var t=this.callBase(),e={direction:"horizontal"};return this.option("crossScrollingEnabled")?t:r(t,e)},_needCreateCrossScrolling:function(){return!0},_headerScrollableConfig:function(){var t=this.callBase();return r(t,{scrollByContent:!0})},_renderTimePanel:o,_renderAllDayPanel:o,_getTableAllDay:function(){return!1},_getDateHeaderTemplate:function(){return this.option("timeCellTemplate")},_toggleAllDayVisibility:o,_changeAllDayVisibility:o,supportAllDayRow:function(){return!1},_getGroupHeaderContainer:function(){return this._isHorizontalGroupedWorkSpace()?this._$thead:this._$sidebarTable},_insertAllDayRowsIntoDateTable:function(){return!1},_createAllDayPanelElements:o,_renderDateHeader:function(){var t=this.callBase();if(this._needRenderWeekHeader()){for(var e=new Date(this._firstViewDate),n=[],o=this._getCellCountInDay(),r=this.option("dateCellTemplate"),a=0;a"),l=this._formatWeekdayAndDay(e);if(r){var u={model:{text:l,date:new Date(e)},container:s,index:a};r.render(u)}else s.text(l);s.addClass("dx-scheduler-header-panel-cell").addClass("dx-scheduler-header-panel-week-cell").attr("colSpan",o),n.push(s),this._incrementDate(e)}var c=i("
",endTags:"
"},td:{tagsCount:3,startTags:"",endTags:"
"},col:{tagsCount:2,startTags:"",endTags:"
"},tr:{tagsCount:2,startTags:"",endTags:"
"}};a.tbody=a.colgroup=a.caption=a.tfoot=a.thead,a.th=a.td;e.parseHTML=function(t){if("string"!==typeof t)return null;var e=o.createDocumentFragment().appendChild(o.createElement("div")),n=r.exec(t),s=n&&n[1].toLowerCase(),l=a[s]||a.default;e.innerHTML=l.startTags+t+l.endTags;for(var u=0;u-1&&o.splice(e,1)};a(t.dxpointerdown,(function(t){-1===r(t)&&(n(t),o.push(t))})),a(t.dxpointermove,(function(t){o[r(t)]=t})),a(t.dxpointerup,s),a(t.dxpointercancel,s),this.pointers=function(){return o},this.reset=function(){o=[]}}},function(t,e,n){"use strict";var i,o=n(0).extend,r=n(214),a=n(358),s={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},l=function(t){return t.pointerId=1,{pointers:i.pointers(),pointerId:1}},u=!1,c=function(){u||(i=new a(s,(function(){return!0})),u=!0)},d=r.inherit({ctor:function(){this.callBase.apply(this,arguments),c()},_fireEvent:function(t){return this.callBase(o(l(t.originalEvent),t))}});d.map=s,d.normalize=l,d.activate=c,d.resetObserver=function(){i.reset()},t.exports=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTemplateEngine=function(t,e){l[t]=e},e.setTemplateEngine=function(t){if((0,o.isString)(t)){if(!(s=l[t]))throw a.default.Error("E0020",t)}else s=t},e.getCurrentTemplateEngine=function(){return s};var i,o=n(2),r=n(38),a=(i=r)&&i.__esModule?i:{default:i};var s,l={}},function(t,e,n){"use strict";var i=n(61),o=n(4),r=n(2),a=o.getKeyHash,s=n(21),l=n(7).Deferred;t.exports=s.inherit({ctor:function(t){this.options=t,this._setOption("disabledItemKeys",[]),this._clearItemKeys()},_clearItemKeys:function(){this._setOption("addedItemKeys",[]),this._setOption("removedItemKeys",[]),this._setOption("removedItems",[]),this._setOption("addedItems",[])},validate:o.noop,_setOption:function(t,e){this.options[t]=e},onSelectionChanged:function(){var t=this.options.addedItemKeys,e=this.options.removedItemKeys,n=this.options.addedItems,i=this.options.removedItems,r=this.options.selectedItems,a=this.options.selectedItemKeys,s=this.options.onSelectionChanged||o.noop;this._clearItemKeys(),s({selectedItems:r,selectedItemKeys:a,addedItemKeys:t,removedItemKeys:e,addedItems:n,removedItems:i})},equalKeys:function(t,e){return this.options.equalByReference&&r.isObject(t)&&r.isObject(e)?t===e:o.equalByValue(t,e)},getSelectableItems:function(t){return t.filter((function(t){return!t.disabled}))},_clearSelection:function(t,e,n,i){return t=t||[],t=Array.isArray(t)?t:[t],this.validate(),this.selectedItemKeys(t,e,n,i)},_loadFilteredData:function(t,e,n,o){var a=encodeURI(JSON.stringify(t)).length,s=this.options.maxFilterLengthInRequest&&a>this.options.maxFilterLengthInRequest,u=new l,c={filter:s?void 0:t,select:s?this.options.dataFields():n||this.options.dataFields()};return t&&0===t.length?u.resolve([]):this.options.load(c).done((function(n){var a=r.isPlainObject(n)?n.data:n;e&&!o?a=a.filter(e):s&&(a=i(a).filter(t).toArray()),u.resolve(a)})).fail(u.reject.bind(u)),u},updateSelectedItemKeyHash:function(t){for(var e=0;e=this.options.totalCount()-this.options.disabledItemKeys.length||void 0:this._isAnyItemSelected(t)},_getVisibleSelectAllState:function(){for(var t=this.getSelectableItems(this.options.plainItems()),e=!1,n=!1,i=0;i0&&i.push(e?"and":"or"),a=r.isString(n)?s(n,t):function(t,n){for(var i=[],o=0,r=t.length;o0&&i.push(e?"or":"and"),i.push(u)}return i}(n,t),i.push(a)})),i&&1===i.length&&(i=i[0]),i},this.getCombinedFilter=function(t,n){var i=this.getExpr(t),o=i;return e&&n&&(i?((o=[]).push(i),o.push(n)):o=n),o};function a(o,a,s,l,u){var c,d,h=a(u);if(!s&&(c=i(h),!r.isObject(c)))return function(t){if(!n){n={};for(var e=0;e":"=",n]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findChanges=void 0;var i=n(2),o=function(t,e){var n=e(t);if((0,i.isObject)(n))try{return JSON.stringify(n)}catch(o){return n}return n},r=function(t,e,n,i){return e[n[o(t,i)]]};e.findChanges=function(t,e,n,i){var a={},s={},l=0,u=0,c=[];t.forEach((function(t,e){var i=o(t,n);a[i]=e})),e.forEach((function(t,e){var i=o(t,n);s[i]=e}));for(var d=Math.max(t.length,e.length),h=0;h-1||(u?o[u]=t[n]:s[n]?a[n]=t[n]:r[n]=t[n])})),{options:r,defaults:o,templates:a}},e.getClassName=function(t){return t.className}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(352);!function(t){t[t.Option=0]="Option",t[t.Template=1]="Template",t[t.Unknown=2]="Unknown"}(i||(i={})),e.ElementType=i,e.getElementInfo=function(t,e){var n=t;if(!n||!n.type)return{type:i.Unknown};if(n.type===o.Template)return{type:i.Template,props:n.props};var r=n.type;if(r.OptionName){var a=r.OptionName,s=r.IsCollectionItem,l=e&&e[a];return l&&(s=l.isCollectionItem,l.optionName&&(a=l.optionName)),{type:i.Option,descriptor:{name:a,isCollection:s,templates:r.TemplateProps||[],initialValuesProps:r.DefaultsProps||{},predefinedValuesProps:r.PredefinedProps||{},expectedChildren:r.ExpectedChildren||{}},props:n.props}}return{type:i.Unknown}}},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.componentDidMount=function(){var t=this.props.onMounted;t?t(this._createWidget):this._createWidget()},e}(n(259).ComponentBase);e.ExtensionComponent=o},function(t,e,n){"use strict";var i=n(37).fitIntoRange,o=n(370).toFixed,r={thousandsSeparator:",",decimalSeparator:"."};function a(t){return t.toString().split("").reverse().join("")}function s(t){return t.replace(/'.+'/g,"")}function l(t){if(!t)return 0;var e=s(t);return e.length-e.replace(/[#]/g,"").length}function u(t){if(!t)return 0;var e=s(t);return e.length-e.replace(/[0]/g,"").length}function c(t,e,n){if(!t)return"";for(t.length>n&&(t=t.substr(0,n));t.length>e&&"0"===t.slice(-1);)t=t.substr(0,t.length-1);for(;t.lengthr.length){var l=-1===e(12345).indexOf("12345");do{t="1"+t}while(l&&h(t,n)<1e5)}return t}function p(t,e,n,i){var o=e(h(t,n,i)),r=t.split("."),a=e(h(r[0]+".3"+r[1].slice(1),n,i)).indexOf("3")-1;return o=o.replace(/(\d)\D(\d)/g,"$1,$2"),a>=0&&(o=o.slice(0,a)+"."+o.slice(a+1)),o=o.replace(/1+/,"1").replace(/1/g,"#"),n||(o=o.replace("%","'%'")),o}e.getFormatter=function(t,e){return e=e||r,function(n){if("number"!==typeof n||isNaN(n))return"";var r=n>0||1/n===1/0,s=function(t){var e=t.split(";");return 1===e.length&&e.push("-"+e[0]),e}(t)[r?0:1];(function(t){return-1!==t.indexOf("%")&&!t.match(/'[^']*%[^']*'/g)})(s)&&(n*=100),r||(n=-n);var h,f=function(t){for(var e=!1,n=0;n=0;e=f(e,t,n,!0);var i=p(e=f(e,t,n,!1),t,n,!1),o=p(e,t,n,!0);return o==="-"+i?i:i+";"+o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toFixed=void 0;var i=n(37);function o(t,e){var n=Math.pow(10,e);return function(t){return(0,i.sign)(t)*Math.round(Math.abs(t))}(t*(10*n)/10)/n}e.toFixed=function(t,e){var n=e||0,i=n>0?o.apply(void 0,arguments):t;return i.toFixed(n)}},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(3),r=n(15),a=n(10),s=n(77).add,l=a.getWindow(),u=a.getNavigator(),c=n(6),d=n(47),h=n(33),f=n(187).compare,p=n(106),m=n(0).extend,g=n(16).inArray,_=n(17).getPublicElement,v=p.changeCallback,y=n(372).hideCallback,b=n(90),w=n(37).fitIntoRange,x=n(17),C=n(4).noop,S=n(2),k=n(5).each,I=n(18),T=n(31),E=n(8),O=n(20),M=n(158).keyboard,P=n(91),D=n(101),A=n(11),R=n(28),B=n(220),N=n(98).EmptyTemplate,L=n(7).Deferred,F=n(373),V=n(194),z=["onShowing","onShown","onHiding","onHidden","onPositioning","onPositioned","onResizeStart","onResize","onResizeEnd"],j=[],H={top:{my:"top center",at:"top center"},bottom:{my:"bottom center",at:"bottom center"},right:{my:"right center",at:"right center"},left:{my:"left center",at:"left center"},center:{my:"center",at:"center"},"right bottom":{my:"right bottom",at:"right bottom"},"right top":{my:"right top",at:"right top"},"left bottom":{my:"left bottom",at:"left bottom"},"left top":{my:"left top",at:"left top"}},W=I.real(),U=W.version,G=T.mozilla&&"desktop"===W.deviceType,K="ios"===W.platform,q=T.safari&&"desktop"!==W.deviceType,$="android"===W.platform&&0===f(U,[4,0],2)&&-1===u.userAgent.indexOf("Chrome"),Y=function(t){return t&&o(t.target||t)};s((function(){c.subscribeGlobal(r.getDocument(),R.down,(function(t){for(var e=j.length-1;e>=0;e--)if(!j[e]._proxiedDocumentDownHandler(t))return}))}));var Z=O.inherit({_supportedKeys:function(){var t=function(t,e,n){if(this.option("dragEnabled")){n.preventDefault(),n.stopPropagation();var i=this._allowedOffsets(),o={top:w(t,-i.top,i.bottom),left:w(e,-i.left,i.right)};this._changePosition(o)}};return m(this.callBase(),{escape:function(){this.hide()},upArrow:t.bind(this,-5,0),downArrow:t.bind(this,5,0),leftArrow:t.bind(this,0,-5),rightArrow:t.bind(this,0,5)})},_getDefaultOptions:function(){return m(this.callBase(),{activeStateEnabled:!1,visible:!1,deferRendering:!0,shading:!0,shadingColor:"",position:{my:"center",at:"center"},width:function(){return.8*o(l).width()},minWidth:null,maxWidth:null,height:function(){return.8*o(l).height()},minHeight:null,maxHeight:null,animation:{show:{type:"pop",duration:300,from:{scale:.55}},hide:{type:"pop",duration:300,to:{opacity:0,scale:.55},from:{opacity:1,scale:1}}},closeOnOutsideClick:!1,onShowing:null,onShown:null,onHiding:null,onHidden:null,contentTemplate:"content",dragEnabled:!1,resizeEnabled:!1,onResizeStart:null,onResize:null,onResizeEnd:null,innerOverlay:!1,target:void 0,container:void 0,hideTopOverlayHandler:function(){this.hide()}.bind(this),closeOnTargetScroll:!1,onPositioned:null,boundaryOffset:{h:0,v:0},propagateOutsideClick:!1,ignoreChildEvents:!0,_checkParentVisibility:!0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){var t=I.real(),e=t.platform,n=t.version;return"android"===e&&f(n,[4,2])<0},options:{animation:{show:{type:"fade",duration:400},hide:{type:"fade",duration:400,to:{opacity:0},from:{opacity:1}}}}},{device:function(){return!a.hasWindow()},options:{width:null,height:null,animation:null,_checkParentVisibility:!1}}])},_setOptionsByReference:function(){this.callBase(),m(this._optionsByReference,{animation:!0})},_wrapper:function(){return this._$wrapper},_container:function(){return this._$content},_eventBindingTarget:function(){return this._$content},_init:function(){this.callBase(),this._initActions(),this._initCloseOnOutsideClickHandler(),this._initTabTerminatorHandler(),this._$wrapper=o("
").addClass("dx-overlay-wrapper"),this._$content=o("
").addClass("dx-overlay-content"),this._initInnerOverlayClass();var t=this.$element();this._$wrapper.addClass(t.attr("class")),t.addClass("dx-overlay"),this._$wrapper.attr("data-bind","dxControlsDescendantBindings: true"),c.on(this._$wrapper,"MSPointerDown",C),c.on(this._$wrapper,"focusin",(function(t){t.stopPropagation()})),this._toggleViewPortSubscription(!0),this._initHideTopOverlayHandler(this.option("hideTopOverlayHandler"))},_initOptions:function(t){this._initTarget(t.target);var e=void 0===t.container?this.option("container"):t.container;this._initContainer(e),this.callBase(t)},_initInnerOverlayClass:function(){this._$content.toggleClass("dx-inner-overlay",this.option("innerOverlay"))},_initTarget:function(t){if(S.isDefined(t)){var e=this.option();k(["position.of","animation.show.from.position.of","animation.show.to.position.of","animation.hide.from.position.of","animation.hide.to.position.of"],(function(n,i){for(var o=i.split("."),r=e;r;){if(1===o.length){S.isPlainObject(r)&&(r[o.shift()]=t);break}r=r[o.shift()]}}))}},_initContainer:function(t){t=void 0===t?p.value():t;var e=this.$element(),n=e.closest(t);n.length||(n=o(t).first()),this._$container=n.length?n:e.parent()},_initHideTopOverlayHandler:function(t){this._hideTopOverlayHandler=t},_initActions:function(){this._actions={},k(z,function(t,e){this._actions[e]=this._createActionByOption(e,{excludeValidators:["disabled","readOnly"]})||C}.bind(this))},_initCloseOnOutsideClickHandler:function(){var t=this;this._proxiedDocumentDownHandler=function(){return t._documentDownHandler.apply(t,arguments)}},_documentDownHandler:function(t){this._showAnimationProcessing&&this._stopAnimation();var e=this.option("closeOnOutsideClick");S.isFunction(e)&&(e=e(t));var n=this._$content,i=o(l.document).is(t.target)||x.contains(l.document,t.target),r=o(t.target).closest(".dx-inner-overlay").length;return i&&!r&&!(n.is(t.target)||x.contains(n.get(0),t.target))&&e&&this._outsideClickHandler(t),this.option("propagateOutsideClick")},_outsideClickHandler:function(t){this.option("shading")&&t.preventDefault(),this.hide()},_getAnonymousTemplateName:function(){return"content"},_initTemplates:function(){this._templateManager.addDefaultTemplates({content:new N}),this.callBase()},_isTopOverlay:function(){for(var t=this._overlayStack(),e=t.length-1;e>=0;e--){var n=t[e]._findTabbableBounds();if(n.first||n.last)return t[e]===this}return!1},_overlayStack:function(){return j},_zIndexInitValue:function(){return Z.baseZIndex()},_toggleViewPortSubscription:function(t){v.remove(this._viewPortChangeHandle),t&&(this._viewPortChangeHandle=this._viewPortChangeHandler.bind(this),v.add(this._viewPortChangeHandle))},_viewPortChangeHandler:function(){this._initContainer(this.option("container")),this._refresh()},_renderVisibilityAnimate:function(t){return this._stopAnimation(),t?this._show():this._hide()},_normalizePosition:function(){var t=this.option("position");this._position="function"===typeof t?t():t},_getAnimationConfig:function(){var t=this.option("animation");return S.isFunction(t)&&(t=t.call(this)),t},_show:function(){var t=this,e=new L;if(this._parentHidden=this._isParentHidden(),e.done((function(){delete t._parentHidden})),this._parentHidden)return this._isHidden=!0,e.resolve();if(this._currentVisible)return(new L).resolve().promise();this._currentVisible=!0,this._isShown=!1,this._normalizePosition();var n=t._getAnimationConfig()||{},i=this._normalizeAnimation(n.show,"to"),o=i&&i.start||C,r=i&&i.complete||C;if(this._isHidingActionCanceled)delete this._isHidingActionCanceled,e.resolve();else{var a=function(){if(this._renderVisibility(!0),this._isShowingActionCanceled)return delete this._isShowingActionCanceled,void e.resolve();this._animate(i,(function(){t.option("focusStateEnabled")&&c.trigger(t._focusTarget(),"focus"),r.apply(this,arguments),t._showAnimationProcessing=!1,t._isShown=!0,t._actions.onShown(),t._toggleSafariScrolling(!1),e.resolve()}),(function(){o.apply(this,arguments),t._showAnimationProcessing=!0}))}.bind(this);this.option("templatesRenderAsynchronously")?(this._stopShowTimer(),this._asyncShowTimeout=setTimeout(a)):a()}return e.promise()},_normalizeAnimation:function(t,e){return t&&(t=m({type:"slide"},t))[e]&&"object"===i(t[e])&&m(t[e],{position:this._position}),t},_hide:function(){if(!this._currentVisible)return(new L).resolve().promise();this._currentVisible=!1;var t=this,e=new L,n=t._getAnimationConfig()||{},i=this._normalizeAnimation(n.hide,"from"),o=i&&i.start||C,r=i&&i.complete||C,a={cancel:!1};return this._isShowingActionCanceled?e.resolve():(this._actions.onHiding(a),t._toggleSafariScrolling(!0),a.cancel?(this._isHidingActionCanceled=!0,this.option("visible",!0),e.resolve()):(this._forceFocusLost(),this._toggleShading(!1),this._toggleSubscriptions(!1),this._stopShowTimer(),this._animate(i,(function(){t._$content.css("pointerEvents",""),t._renderVisibility(!1),r.apply(this,arguments),t._actions.onHidden(),e.resolve()}),(function(){t._$content.css("pointerEvents","none"),o.apply(this,arguments)})))),e.promise()},_forceFocusLost:function(){var t=r.getActiveElement();!!this._$content.find(t).length&&x.resetActiveElement()},_animate:function(t,e,n){t?(n=n||t.start||C,d.animate(this._$content,m({},t,{start:n,complete:e}))):e()},_stopAnimation:function(){d.stop(this._$content,!0)},_renderVisibility:function(t){if(!t||!this._isParentHidden()){if(this._currentVisible=t,this._stopAnimation(),t||x.triggerHidingEvent(this._$content),this._toggleVisibility(t),this._$content.toggleClass("dx-state-invisible",!t),this._updateZIndexStackPosition(t),t){this._renderContent();var e={cancel:!1};if(this._actions.onShowing(e),e.cancel)return this._toggleVisibility(!1),this._$content.toggleClass("dx-state-invisible",!0),this._updateZIndexStackPosition(!1),this._moveFromContainer(),this._isShowingActionCanceled=!0,void this.option("visible",!1);this._moveToContainer(),this._renderGeometry(),x.triggerShownEvent(this._$content),x.triggerResizeEvent(this._$content)}else this._moveFromContainer();this._toggleShading(t),this._toggleSubscriptions(t)}},_updateZIndexStackPosition:function(t){var e=this._overlayStack(),n=g(this,e);t?(-1===n&&(this._zIndex=F.create(this._zIndexInitValue()),e.push(this)),this._$wrapper.css("zIndex",this._zIndex),this._$content.css("zIndex",this._zIndex)):-1!==n&&(e.splice(n,1),F.remove(this._zIndex))},_toggleShading:function(t){this._$wrapper.toggleClass("dx-overlay-modal",this.option("shading")&&!this.option("container")),this._$wrapper.toggleClass("dx-overlay-shader",t&&this.option("shading")),this._$wrapper.css("backgroundColor",this.option("shading")?this.option("shadingColor"):""),this._toggleTabTerminator(t&&this.option("shading"))},_initTabTerminatorHandler:function(){var t=this;this._proxiedTabTerminatorHandler=function(){t._tabKeyHandler.apply(t,arguments)}},_toggleTabTerminator:function(t){var e=A.addNamespace("keydown",this.NAME);t?c.on(r.getDocument(),e,this._proxiedTabTerminatorHandler):c.off(r.getDocument(),e,this._proxiedTabTerminatorHandler)},_findTabbableBounds:function(){for(var t=this._$wrapper.find("*"),e=t.length-1,n={first:null,last:null},i=0;i<=e&&(!n.first&&t.eq(i).is(P.tabbable)&&(n.first=t.eq(i)),!n.last&&t.eq(e-i).is(P.tabbable)&&(n.last=t.eq(e-i)),!n.first||!n.last);i++);return n},_tabKeyHandler:function(t){if("tab"===A.normalizeKeyName(t)&&this._isTopOverlay()){var e=this._findTabbableBounds(),n=e.first,i=e.last,o=!t.shiftKey&&t.target===i.get(0),r=t.shiftKey&&t.target===n.get(0),a=0===e.length,s=!x.contains(this._$wrapper.get(0),t.target);if(o||r||a||s){t.preventDefault();var l=t.shiftKey?i:n;c.trigger(l,"focusin"),c.trigger(l,"focus")}}},_toggleSubscriptions:function(t){a.hasWindow()&&(this._toggleHideTopOverlayCallback(t),this._toggleParentsScrollSubscription(t))},_toggleHideTopOverlayCallback:function(t){this._hideTopOverlayHandler&&(t?y.add(this._hideTopOverlayHandler):y.remove(this._hideTopOverlayHandler))},_toggleParentsScrollSubscription:function(t){if(this._position){var e=this._position.of||o(),n=this.option("closeOnTargetScroll"),i=Y(e).parents(),r=A.addNamespace("scroll",this.NAME);"desktop"===I.real().deviceType&&(i=i.add(l)),this._proxiedTargetParentsScrollHandler=this._proxiedTargetParentsScrollHandler||function(t){this._targetParentsScrollHandler(t)}.bind(this),c.off(o().add(this._$prevTargetParents),r,this._proxiedTargetParentsScrollHandler),t&&n&&(c.on(i,r,this._proxiedTargetParentsScrollHandler),this._$prevTargetParents=i)}},_targetParentsScrollHandler:function(t){var e=!1,n=this.option("closeOnTargetScroll");S.isFunction(n)&&(e=n(t)),e||this._showAnimationProcessing||this.hide()},_render:function(){this.callBase(),this._appendContentToElement(),this._renderVisibilityAnimate(this.option("visible"))},_appendContentToElement:function(){this._$content.parent().is(this.$element())||this._$content.appendTo(this.$element())},_renderContent:function(){var t=!this._currentVisible&&this.option("deferRendering");this.option("visible")&&this._isParentHidden()?this._isHidden=!0:this._contentAlreadyRendered||t||(this._contentAlreadyRendered=!0,this._appendContentToElement(),this.callBase())},_isParentHidden:function(){if(!this.option("_checkParentVisibility"))return!1;if(void 0!==this._parentHidden)return this._parentHidden;var t=this.$element().parent();if(t.is(":visible"))return!1;var e=!1;return t.add(t.parents()).each((function(){if("none"===o(this).css("display"))return e=!0,!1})),e||!r.getBody().contains(t.get(0))},_renderContentImpl:function(){var t=this,e=new L,n=this.option("contentTemplate"),i=this._getTemplate(n),o=this._templateManager.anonymousTemplateName===n;return i&&i.render({container:_(this.$content()),noModel:!0,transclude:o,onRendered:function(){e.resolve()}}),this._renderDrag(),this._renderResize(),this._renderScrollTerminator(),e.done((function(){t.option("visible")&&t._moveToContainer()})),e.promise()},_renderDrag:function(){var t=this._getDragTarget();if(t){var e=A.addNamespace(D.start,this.NAME),n=A.addNamespace(D.move,this.NAME);c.off(t,e),c.off(t,n),this.option("dragEnabled")&&(c.on(t,e,this._dragStartHandler.bind(this)),c.on(t,n,this._dragUpdateHandler.bind(this)))}},_renderResize:function(){this._resizable=this._createComponent(this._$content,B,{handles:this.option("resizeEnabled")?"all":"none",onResizeEnd:this._resizeEndHandler.bind(this),onResize:this._actions.onResize.bind(this),onResizeStart:this._actions.onResizeStart.bind(this),minHeight:100,minWidth:100,area:this._getDragResizeContainer()})},_resizeEndHandler:function(){this._positionChangeHandled=!0;var t=this._resizable.option("width"),e=this._resizable.option("height");t&&this.option("width",t),e&&this.option("height",e),this._actions.onResizeEnd()},_renderScrollTerminator:function(){var t=this._wrapper(),e=A.addNamespace(D.move,this.NAME);c.off(t,e),c.on(t,e,{validate:function(){return!0},getDirection:function(){return"both"},_toggleGestureCover:function(t){t||this._toggleGestureCoverImpl(t)},_clearSelection:C,isNative:!0},(function(t){var e=t.originalEvent.originalEvent;t._cancelPreventDefault=!0,e&&"mousemove"!==e.type&&!1!==t.cancelable&&t.preventDefault()}))},_getDragTarget:function(){return this.$content()},_dragStartHandler:function(t){t.targetElements=[],this._prevOffset={x:0,y:0};var e=this._allowedOffsets();t.maxTopOffset=e.top,t.maxBottomOffset=e.bottom,t.maxLeftOffset=e.left,t.maxRightOffset=e.right},_getDragResizeContainer:function(){return p.originalViewPort().get(0)||this.option("container")?this._$container:o(l)},_deltaSize:function(){var t=this._$content,e=this._getDragResizeContainer(),n=t.outerWidth(),i=t.outerHeight(),a=e.outerWidth(),s=e.outerHeight();if(this._isWindow(e)){var l=r.getDocument();s=Math.max(o(l).outerHeight(),s),a=Math.max(o(l).outerWidth(),a)}return{width:a-n,height:s-i}},_dragUpdateHandler:function(t){var e=t.offset,n=this._prevOffset,i={top:e.y-n.y,left:e.x-n.x};this._changePosition(i),this._prevOffset=e},_changePosition:function(t){var e=h.locate(this._$content);h.move(this._$content,{left:e.left+t.left,top:e.top+t.top}),this._positionChangeHandled=!0},_allowedOffsets:function(){var t=h.locate(this._$content),e=this._deltaSize(),n=e.height>=0&&e.width>=0,i=!this.option("shading")||this.option("container")||this._isWindow(this._getContainer())?{top:0,left:0}:h.locate(this._$wrapper),o=this.option("boundaryOffset");return{top:n?t.top+i.top+o.v:0,bottom:n?-t.top-i.top+e.height-o.v:0,left:n?t.left+i.left+o.h:0,right:n?-t.left-i.left+e.width-o.h:0}},_moveFromContainer:function(){this._$content.appendTo(this.$element()),this._detachWrapperToContainer()},_detachWrapperToContainer:function(){this._$wrapper.detach()},_moveToContainer:function(){this._attachWrapperToContainer(),this._$content.appendTo(this._$wrapper)},_attachWrapperToContainer:function(){var t=this.$element(),e=void 0!==this.option("container")?this._$container:V.getSwatchContainer(t);e&&e[0]===t.parent()[0]&&(e=t),this._$wrapper.appendTo(e)},_fixHeightAfterSafariAddressBarResizing:function(){this._isWindow(this._getContainer())&&q&&this._$wrapper.css("minHeight",l.innerHeight)},_renderGeometry:function(t){this.option("visible")&&a.hasWindow()&&this._renderGeometryImpl(t)},_renderGeometryImpl:function(t){this._stopAnimation(),this._normalizePosition(),this._renderWrapper(),this._fixHeightAfterSafariAddressBarResizing(),this._renderDimensions();var e=this._renderPosition();this._actions.onPositioned({position:e})},_fixWrapperPosition:function(){this._$wrapper.css("position",this._useFixedPosition()?"fixed":"absolute")},_useFixedPosition:function(){var t=this._getContainer();return this._isWindow(t)&&(!K||void 0!==this._bodyScrollTop)},_toggleSafariScrolling:function(t){if(K&&this._useFixedPosition()){var e=r.getBody();t?(o(e).removeClass("dx-prevent-safari-scrolling"),l.scrollTo(0,this._bodyScrollTop),this._bodyScrollTop=void 0):this.option("visible")&&(this._bodyScrollTop=l.pageYOffset,o(e).addClass("dx-prevent-safari-scrolling"))}},_renderWrapper:function(){this._fixWrapperPosition(),this._renderWrapperDimensions(),this._renderWrapperPosition()},_renderWrapperDimensions:function(){var t,e,n=this._getContainer();if(n){var i=this._isWindow(n);t=i?null:n.outerWidth(),e=i?null:n.outerHeight(),this._$wrapper.css({width:t,height:e})}},_isWindow:function(t){return!!t&&S.isWindow(t.get(0))},_renderWrapperPosition:function(){var t=this._getContainer();t&&b.setup(this._$wrapper,{my:"top left",at:"top left",of:t})},_getContainer:function(){var t=this._position,e=this.option("container"),n=null;!e&&t&&(n=!(!t.of||!t.of.preventDefault)?l:t.of||l);return Y(e||n)},_renderDimensions:function(){var t=this._$content.get(0);this._$content.css({minWidth:this._getOptionValue("minWidth",t),maxWidth:this._getOptionValue("maxWidth",t),minHeight:this._getOptionValue("minHeight",t),maxHeight:this._getOptionValue("maxHeight",t),width:this._getOptionValue("width",t),height:this._getOptionValue("height",t)})},_renderPosition:function(){if(!this._positionChangeHandled){this._renderOverlayBoundaryOffset(),h.resetPosition(this._$content);var t=this._transformStringPosition(this._position,H),e=b.setup(this._$content,t);return function(t){if(G&&t.width(),$){var e=t.parents();e.is(".dx-scrollable-native")||(e.css("backfaceVisibility","hidden"),e.css("backfaceVisibility"),e.css("backfaceVisibility","visible"))}}(this._$content),this._actions.onPositioning(),e}var n=this._allowedOffsets();this._changePosition({top:w(0,-n.top,n.bottom),left:w(0,-n.left,n.right)})},_transformStringPosition:function(t,e){return S.isString(t)&&(t=m({},e[t])),t},_renderOverlayBoundaryOffset:function(){var t=this.option("boundaryOffset");this._$content.css("margin",t.v+"px "+t.h+"px")},_focusTarget:function(){return this._$content},_attachKeyboardEvents:function(){var t=this;this._keyboardListenerId=M.on(this._$content,null,(function(e){return t._keyboardHandler(e)}))},_keyboardHandler:function(t){var e=t.originalEvent,n=o(e.target);!n.is(this._$content)&&this.option("ignoreChildEvents")||this.callBase.apply(this,arguments)},_isVisible:function(){return this.option("visible")},_visibilityChanged:function(t){t?this.option("visible")&&this._renderVisibilityAnimate(t):this._renderVisibilityAnimate(t)},_dimensionChanged:function(){this._renderGeometry(!0)},_clean:function(){this._contentAlreadyRendered||this.$content().empty(),this._renderVisibility(!1),this._stopShowTimer(),this._cleanFocusState()},_stopShowTimer:function(){this._asyncShowTimeout&&clearTimeout(this._asyncShowTimeout),this._asyncShowTimeout=null},_dispose:function(){d.stop(this._$content,!1),clearTimeout(this._deferShowTimer),this._toggleViewPortSubscription(!1),this._toggleSubscriptions(!1),this._updateZIndexStackPosition(!1),this._toggleTabTerminator(!1),this._toggleSafariScrolling(!0),this._actions=null,this.callBase(),F.remove(this._zIndex),this._$wrapper.remove(),this._$content.remove()},_toggleDisabledState:function(t){this.callBase.apply(this,arguments),this._$content.toggleClass("dx-state-disabled",Boolean(t))},_toggleRTLDirection:function(t){this._$content.toggleClass("dx-rtl",t)},_optionChanged:function(t){var e=t.value;if(g(t.name,z)>-1)this._initActions();else switch(t.name){case"dragEnabled":this._renderDrag(),this._renderGeometry();break;case"resizeEnabled":this._renderResize(),this._renderGeometry();break;case"shading":case"shadingColor":this._toggleShading(this.option("visible"));break;case"width":case"height":case"minWidth":case"maxWidth":case"minHeight":case"maxHeight":case"boundaryOffset":this._renderGeometry();break;case"position":this._positionChangeHandled=!1,this._renderGeometry();break;case"visible":this._renderVisibilityAnimate(e).done(function(){this._animateDeferred&&this._animateDeferred.resolveWith(this)}.bind(this));break;case"target":this._initTarget(e),this._invalidate();break;case"container":this._initContainer(e),this._invalidate();break;case"innerOverlay":this._initInnerOverlayClass();break;case"deferRendering":case"contentTemplate":this._contentAlreadyRendered=!1,this._clean(),this._invalidate();break;case"hideTopOverlayHandler":this._toggleHideTopOverlayCallback(!1),this._initHideTopOverlayHandler(t.value),this._toggleHideTopOverlayCallback(this.option("visible"));break;case"closeOnTargetScroll":this._toggleParentsScrollSubscription(this.option("visible"));break;case"closeOnOutsideClick":case"animation":case"propagateOutsideClick":break;case"rtlEnabled":this._contentAlreadyRendered=!1,this.callBase(t);break;default:this.callBase(t)}},toggle:function(t){t=void 0===t?!this.option("visible"):t;var e=new L;if(t===this.option("visible"))return e.resolveWith(this,[t]).promise();var n=new L;return this._animateDeferred=n,this.option("visible",t),n.promise().done(function(){delete this._animateDeferred,e.resolveWith(this,[this.option("visible")])}.bind(this)),e.promise()},$content:function(){return this._$content},show:function(){return this.toggle(!0)},hide:function(){return this.toggle(!1)},content:function(){return _(this._$content)},repaint:function(){this._contentAlreadyRendered?(this._renderGeometry(),x.triggerResizeEvent(this._$content)):this.callBase()}});Z.baseZIndex=function(t){return F.base(t)},E("dxOverlay",Z),t.exports=Z},function(t,e,n){"use strict";var i=n(16).inArray,o=function(){var t=[];return{add:function(e){-1===i(e,t)&&t.push(e)},remove:function(e){var n=i(e,t);-1!==n&&t.splice(n,1)},fire:function(){var e=t.pop(),n=!!e;return n&&e(),n},hasCallback:function(){return t.length>0}}}();t.exports=function(){return o.fire()},t.exports.hideCallback=o,t.exports.default=t.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clearStack=e.remove=e.create=e.base=void 0;var i=n(4),o=1500,r=[];e.base=function(t){return o=(0,i.ensureDefined)(t,o)},e.create=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,e=r.length,n=(e?r[e-1]:t)+1;return r.push(n),n},e.remove=function(t){var e=r.indexOf(t);e>=0&&r.splice(e,1)},e.clearStack=function(){r=[]}},function(t,e,n){"use strict";var i=_(n(3)),o=_(n(36)),r=_(n(4)),a=n(2),s=_(n(8)),l=n(16),u=n(0),c=n(5),d=n(24),h=_(n(661)),f=_(n(93)),p=n(73),m=_(n(38)),g=_(n(47));function _(t){return t&&t.__esModule?t:{default:t}}var v=h.default.inherit({compactMode:!1,ctor:function(t,e){this._userOptions=e||{},this.callBase(t,e),"height"in this._userOptions&&m.default.log("W0001",this.NAME,"height","20.1","Functionality associated with this option is not intended for the Toolbar widget.")},_getSynchronizableOptionsForCreateComponent:function(){return this.callBase().filter((function(t){return"disabled"!==t}))},_initTemplates:function(){this.callBase();var t=new p.BindableTemplate(function(t,e,n){(0,a.isPlainObject)(e)?(e.text&&t.text(e.text).wrapInner("
"),e.html&&t.html(e.html),"dxButton"===e.widget&&(this.option("useFlatButtons")&&(e.options=e.options||{},e.options.stylingMode=e.options.stylingMode||"text"),this.option("useDefaultButtons")&&(e.options=e.options||{},e.options.type=e.options.type||"default"))):t.text(String(e)),this._getTemplate("dx-polymorph-widget").render({container:t,model:n,parent:this})}.bind(this),["text","html","widget","options"],this.option("integrationOptions.watchMethod"));this._templateManager.addDefaultTemplates({item:t,menuItem:t})},_getDefaultOptions:function(){return(0,u.extend)(this.callBase(),{renderAs:"topToolbar",grouped:!1,useFlatButtons:!1,useDefaultButtons:!1,multiline:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return o.default.isMaterial()},options:{useFlatButtons:!0}}])},_itemContainer:function(){return this._$toolbarItemsContainer.find([".dx-toolbar-before",".dx-toolbar-center",".dx-toolbar-after"].join(","))},_itemClass:function(){return"dx-toolbar-item"},_itemDataKey:function(){return"dxToolbarItemDataKey"},_buttonClass:function(){return"dx-toolbar-button"},_dimensionChanged:function(){this._arrangeItems(),this._applyCompactMode()},_initMarkup:function(){this._renderToolbar(),this._renderSections(),this.callBase(),this.setAria("role","toolbar")},_waitParentAnimationFinished:function(){var t=this,e=this.$element();return new f.default((function(n){!function o(){clearTimeout(t._waitParentAnimationTimeout),t._waitParentAnimationTimeout=setTimeout((function(){return function(){var t=!0;return e.parents().each((function(e,n){if(g.default.isAnimating((0,i.default)(n)))return t=!1,!1})),t&&n(),t}()||o()}),15)}()}))},_render:function(){this.callBase(),this._renderItemsAsync(),o.default.isMaterial()&&f.default.all([this._waitParentAnimationFinished(),this._checkWebFontForLabelsLoaded()]).then(this._dimensionChanged.bind(this))},_postProcessRenderItems:function(){this._arrangeItems()},_renderToolbar:function(){this.$element().addClass("dx-toolbar").toggleClass("dx-toolbar-bottom","bottomToolbar"===this.option("renderAs")).toggleClass("dx-toolbar-multiline",this.option("multiline")),this._$toolbarItemsContainer=(0,i.default)("
").addClass("dx-toolbar-items-container").appendTo(this.$element())},_renderSections:function(){var t=this._$toolbarItemsContainer,e=this;(0,c.each)(["before","center","after"],(function(){var n="dx-toolbar-"+this,o=t.find("."+n);o.length||(e["_$"+this+"Section"]=o=(0,i.default)("
").addClass(n).appendTo(t))}))},_checkWebFontForLabelsLoaded:function(){var t=this.$element().find(".dx-toolbar-label"),e=[];return t.each((function(t,n){var r=(0,i.default)(n).text(),a=(0,i.default)(n).css("fontWeight");e.push(o.default.waitWebFont(r,a))})),f.default.all(e)},_arrangeItems:function(t){t=t||this.$element().width(),this._$centerSection.css({margin:"0 auto",float:"none"});var e=(0,d.getBoundingRect)(this._$beforeSection.get(0)),n=(0,d.getBoundingRect)(this._$afterSection.get(0));this._alignCenterSection(e,n,t);var o=this._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0),r=o.parent();if(o.length){var a=e.width?e.width:o.position().left,s=r.hasClass("dx-toolbar-before")?0:a,l=r.hasClass("dx-toolbar-after")?0:n.width,u=0;r.children().not(".dx-toolbar-label").each((function(){u+=(0,i.default)(this).outerWidth()}));var c=t-u,h=Math.max(c-s-l,0);if(r.hasClass("dx-toolbar-before"))this._alignSection(this._$beforeSection,h);else{var f=o.outerWidth()-o.width();o.css("maxWidth",h-f)}}},_alignCenterSection:function(t,e,n){this._alignSection(this._$centerSection,n-t.width-e.width);var i=this.option("rtlEnabled"),o=i?e:t,r=i?t:e,a=(0,d.getBoundingRect)(this._$centerSection.get(0));(o.right>a.left||a.right>r.left)&&this._$centerSection.css({marginLeft:o.width,marginRight:r.width,float:o.width>r.width?"none":"right"})},_alignSection:function(t,e){var n=t.find(".dx-toolbar-label").toArray();e-=this._getCurrentLabelsPaddings(n);var i=this._getCurrentLabelsWidth(n),o=Math.abs(i-e);et.width()&&t.addClass("dx-toolbar-compact")},_getCurrentLabelsWidth:function(t){var e=0;return t.forEach((function(t,n){e+=(0,i.default)(t).outerWidth()})),e},_getCurrentLabelsPaddings:function(t){var e=0;return t.forEach((function(t,n){e+=(0,i.default)(t).outerWidth()-(0,i.default)(t).width()})),e},_renderItem:function(t,e,n,i){var o=e.location||"center",r=n||this["_$"+o+"Section"],a=!(!e.text&&!e.html),s=this.callBase(t,e,r,i);return s.toggleClass(this._buttonClass(),!a).toggleClass("dx-toolbar-label",a).addClass(e.cssClass),s},_renderGroupedItems:function(){var t=this;(0,c.each)(this.option("items"),(function(e,n){var o=n.items,r=(0,i.default)("
").addClass("dx-toolbar-group"),a=n.location||"center";o&&o.length&&((0,c.each)(o,(function(e,n){t._renderItem(e,n,r,null)})),t._$toolbarItemsContainer.find(".dx-toolbar-"+a).append(r))}))},_renderItems:function(t){this.option("grouped")&&t.length&&t[0].items?this._renderGroupedItems():this.callBase(t)},_getToolbarItems:function(){return this.option("items")||[]},_renderContentImpl:function(){var t=this._getToolbarItems();this.$element().toggleClass("dx-toolbar-mini",0===t.length),this._renderedItemsCount?this._renderItems(t.slice(this._renderedItemsCount)):this._renderItems(t),this._applyCompactMode()},_renderEmptyMessage:r.default.noop,_clean:function(){this._$toolbarItemsContainer.children().empty(),this.$element().empty()},_visibilityChanged:function(t){t&&this._arrangeItems()},_isVisible:function(){return this.$element().width()>0&&this.$element().height()>0},_getIndexByItem:function(t){return(0,l.inArray)(t,this._getToolbarItems())},_itemOptionChanged:function(t,e,n){this.callBase.apply(this,[t,e,n]),this._arrangeItems()},_optionChanged:function(t){var e=t.name;switch(e){case"width":this.callBase.apply(this,arguments),this._dimensionChanged();break;case"multiline":this.$element().toggleClass("dx-toolbar-multiline",t.value);break;case"renderAs":case"useFlatButtons":case"useDefaultButtons":this._invalidate();break;case"compactMode":this._applyCompactMode();break;case"grouped":break;default:this.callBase.apply(this,arguments)}},_dispose:function(){this.callBase(),clearTimeout(this._waitParentAnimationTimeout)}});(0,s.default)("dxToolbarBase",v),t.exports=v},function(t,e,n){"use strict";var i=n(8),o=n(666);i("dxTextEditor",o),t.exports=o},function(t,e,n){"use strict";var i=l(n(3)),o=n(2),r=l(n(31)),a=l(n(18)),s=l(n(15));function l(t){return t&&t.__esModule?t:{default:t}}var u=a.default.real(),c=u.ios,d=u.mac,h=r.default.msie||c||d;t.exports=function(t,e){if(t=(0,i.default)(t).get(0),!(0,o.isDefined)(e))return function(t){var e;try{e={start:t.selectionStart,end:t.selectionEnd}}catch(n){e={start:0,end:0}}return e}(t);h&&s.default.getActiveElement()!==t||function(t,e){if(s.default.getBody().contains(t))try{t.selectionStart=e.start,t.selectionEnd=e.end}catch(n){}}(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=l(n(6)),o=n(11),r=l(n(31)),a=n(16),s=n(17);function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){for(var n=0;n11)e=t.hasClass("edge-autofilled");else if(r.default.webkit){var n=t.get(0);e=n&&n.matches(":-webkit-autofill")}return e}},{key:"runWithoutEventProcessing",value:function(t){var e=this._keyPressHandled;this._keyPressHandled=!0,t(),this._keyPressHandled=e}},{key:"_backspaceHandler",value:function(){}},{key:"_delHandler",value:function(t){var e=this.editor;this._keyPressHandled=!0,e._maskKeyHandler(t,(function(){return!e._hasSelection()&&e._handleKey(" ")}))}},{key:"clean",value:function(){this._clearDragTimer(),clearTimeout(this._backspaceHandlerTimeout),clearTimeout(this._caretTimeout),clearTimeout(this._inputHandlerTimer)}}])&&u(e.prototype,n),l&&u(e,l),t}();e.default=c},function(t,e,n){"use strict";var i=c(n(3)),o=n(11),r=n(0),a=c(n(676)),s=n(12),l=c(n(677)),u=c(n(265));function c(t){return t&&t.__esModule?t:{default:t}}var d=u.default.inherit({_supportedKeys:function(){var t=this,e=this,n=this.callBase(),i=function(i,o){var r=t._editStrategy,a=t.option("focusedElement"),s=r.getNormalizedIndex(a);if(!(s===t._getLastItemIndex())||!t._isDataSourceLoading())if(i.shiftKey&&e.option("itemDragging.allowReordering")){var l=s+(o?-1:1),u=r.getItemElement(l);t.reorderItem(a,u),t.scrollToItem(a),i.preventDefault()}else{t._editProvider.handleKeyboardEvents(s,o)||(o?n.upArrow(i):n.downArrow(i))}};return(0,r.extend)({},n,{del:function(t){e.option("allowItemDeleting")&&(t.preventDefault(),e.deleteItem(e.option("focusedElement")))},upArrow:function(t){return i(t,!0)},downArrow:function(t){return i(t)},enter:function(t){this._editProvider.handleEnterPressing()||n.enter.apply(this,arguments)},space:function(t){this._editProvider.handleEnterPressing()||n.space.apply(this,arguments)}})},_updateSelection:function(){this._editProvider.afterItemsRendered(),this.callBase()},_getLastItemIndex:function(){return this._itemElements().length-1},_refreshItemElements:function(){this.callBase();var t=this._editProvider.getExcludedItemSelectors();t.length&&(this._itemElementsCache=this._itemElementsCache.not(t))},_setDeprecatedOptions:function(){this.callBase(),(0,r.extend)(this._deprecatedOptions,{allowItemReordering:{since:"19.2",alias:"itemDragging.allowReordering"}})},_getDefaultOptions:function(){return(0,r.extend)(this.callBase(),{showSelectionControls:!1,selectionMode:"none",selectAllMode:"page",onSelectAllValueChanged:null,selectAllText:(0,s.format)("dxList-selectAll"),menuItems:[],menuMode:"context",allowItemDeleting:!1,itemDeleteMode:"static",allowItemReordering:!1,itemDragging:{}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(t){return"ios"===t.platform},options:{menuMode:"slide",itemDeleteMode:"slideItem"}},{device:{platform:"android"},options:{itemDeleteMode:"swipe"}}])},_init:function(){this.callBase(),this._initEditProvider()},_initDataSource:function(){this.callBase(),this._isPageSelectAll()||this._dataSource&&this._dataSource.requireTotalCount(!0)},_isPageSelectAll:function(){return"page"===this.option("selectAllMode")},_initEditProvider:function(){this._editProvider=new l.default(this)},_disposeEditProvider:function(){this._editProvider&&this._editProvider.dispose()},_refreshEditProvider:function(){this._disposeEditProvider(),this._initEditProvider()},_initEditStrategy:function(){this.option("grouped")?this._editStrategy=new a.default(this):this.callBase()},_initMarkup:function(){this._refreshEditProvider(),this.callBase()},_renderItems:function(){this.callBase.apply(this,arguments),this._editProvider.afterItemsRendered()},_selectedItemClass:function(){return"dx-list-item-selected"},_itemResponseWaitClass:function(){return"dx-list-item-response-wait"},_itemClickHandler:function(t){var e=(0,i.default)(t.currentTarget);if(!e.is(".dx-state-disabled, .dx-state-disabled *")){var n=this._editProvider.handleClick(e,t);n||this.callBase.apply(this,arguments)}},_shouldFireContextMenuEvent:function(){return this.callBase.apply(this,arguments)||this._editProvider.contextMenuHandlerExists()},_itemHoldHandler:function(t){var e=(0,i.default)(t.currentTarget);if(!e.is(".dx-state-disabled, .dx-state-disabled *")){var n=(0,o.isTouchEvent)(t)&&this._editProvider.handleContextMenu(e,t);n?t.handledByEditProvider=!0:this.callBase.apply(this,arguments)}},_itemContextMenuHandler:function(t){var e=(0,i.default)(t.currentTarget);if(!e.is(".dx-state-disabled, .dx-state-disabled *")){var n=!t.handledByEditProvider&&this._editProvider.handleContextMenu(e,t);n?t.preventDefault():this.callBase.apply(this,arguments)}},_postprocessRenderItem:function(t){this.callBase.apply(this,arguments),this._editProvider.modifyItemElement(t)},_clean:function(){this._disposeEditProvider(),this.callBase()},focusListItem:function(t){var e=this._editStrategy.getItemElement(t);this.option("focusedElement",e),this.focus(),this.scrollToItem(this.option("focusedElement"))},_optionChanged:function(t){switch(t.name){case"selectAllMode":this._initDataSource(),this._dataSource.pageIndex(0),this._dataSource.load();break;case"grouped":this._clearSelectedItems(),delete this._renderingGroupIndex,this._initEditStrategy(),this.callBase(t);break;case"showSelectionControls":case"menuItems":case"menuMode":case"allowItemDeleting":case"itemDeleteMode":case"allowItemReordering":case"itemDragging":case"selectAllText":this._invalidate();break;case"onSelectAllValueChanged":break;default:this.callBase(t)}},selectAll:function(){return this._selection.selectAll(this._isPageSelectAll())},unselectAll:function(){return this._selection.deselectAll(this._isPageSelectAll())},isSelectAll:function(){return this._selection.getSelectAllState(this._isPageSelectAll())},getFlatIndexByItemElement:function(t){return this._itemElements().index(t)},getItemElementByFlatIndex:function(t){var e=this._itemElements();return t<0||t>=e.length?(0,i.default)():e.eq(t)},getItemByIndex:function(t){return this._editStrategy.getItemDataByIndex(t)}});t.exports=d},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(4).noop,a=n(161),s=a.abstract,l=n(11),u=n(28),c=n(159),d=l.addNamespace(u.down,"dxListEditDecorator"),h=l.addNamespace(c.active,"dxListEditDecorator"),f=a.inherit({_init:function(){this._$topShield=i("
").addClass("dx-list-switchable-delete-top-shield"),this._$bottomShield=i("
").addClass("dx-list-switchable-delete-bottom-shield"),this._$itemContentShield=i("
").addClass("dx-list-switchable-delete-item-content-shield"),o.on(this._$topShield,d,this._cancelDeleteReadyItem.bind(this)),o.on(this._$bottomShield,d,this._cancelDeleteReadyItem.bind(this)),this._list.$element().append(this._$topShield.toggle(!1)).append(this._$bottomShield.toggle(!1))},handleClick:function(){return this._cancelDeleteReadyItem()},_cancelDeleteReadyItem:function(){return!!this._$readyToDeleteItem&&(this._cancelDelete(this._$readyToDeleteItem),!0)},_cancelDelete:function(t){this._toggleDeleteReady(t,!1)},_toggleDeleteReady:function(t,e){void 0===e&&(e=!this._isReadyToDelete(t)),this._toggleShields(t,e),this._toggleScrolling(e),this._cacheReadyToDeleteItem(t,e),this._animateToggleDelete(t,e)},_isReadyToDelete:function(t){return t.hasClass("dx-list-switchable-delete-ready")},_toggleShields:function(t,e){this._list.$element().toggleClass("dx-list-switchable-menu-shield-positioning",e),this._$topShield.toggle(e),this._$bottomShield.toggle(e),e&&this._updateShieldsHeight(t),this._toggleContentShield(t,e)},_updateShieldsHeight:function(t){var e=this._list.$element(),n=e.offset().top,i=e.outerHeight(),o=t.offset().top-n,r=i-t.outerHeight()-o;this._$topShield.height(Math.max(o,0)),this._$bottomShield.height(Math.max(r,0))},_toggleContentShield:function(t,e){e?t.find(".dx-list-item-content").first().append(this._$itemContentShield):this._$itemContentShield.detach()},_toggleScrolling:function(t){var e=this._list.$element().dxScrollView("instance");t?e.on("start",this._cancelScrolling):e.off("start",this._cancelScrolling)},_cancelScrolling:function(t){t.event.cancel=!0},_cacheReadyToDeleteItem:function(t,e){e?this._$readyToDeleteItem=t:delete this._$readyToDeleteItem},_animateToggleDelete:function(t,e){e?(this._enablePositioning(t),this._prepareDeleteReady(t),this._animatePrepareDeleteReady(t),o.off(t,u.up)):(this._forgetDeleteReady(t),this._animateForgetDeleteReady(t).done(this._disablePositioning.bind(this,t)))},_enablePositioning:function(t){t.addClass("dx-list-switchable-menu-item-shield-positioning"),o.on(t,h,r),o.one(t,u.up,this._disablePositioning.bind(this,t))},_disablePositioning:function(t){t.removeClass("dx-list-switchable-menu-item-shield-positioning"),o.off(t,h)},_prepareDeleteReady:function(t){t.addClass("dx-list-switchable-delete-ready")},_forgetDeleteReady:function(t){t.removeClass("dx-list-switchable-delete-ready")},_animatePrepareDeleteReady:s,_animateForgetDeleteReady:s,_getDeleteButtonContainer:function(t){return(t=t||this._$readyToDeleteItem).children(".dx-list-switchable-delete-button-container")},_deleteItem:function(t){t=t||this._$readyToDeleteItem,this._getDeleteButtonContainer(t).detach(),t.is(".dx-state-disabled, .dx-state-disabled *")||this._list.deleteItem(t).always(this._cancelDelete.bind(this,t))},_isRtlEnabled:function(){return this._list.option("rtlEnabled")},dispose:function(){this._$topShield&&this._$topShield.remove(),this._$bottomShield&&this._$bottomShield.remove(),this.callBase.apply(this,arguments)}});t.exports=f},function(t,e,n){"use strict";t.exports={_menuEnabled:function(){return!!this._menuItems().length},_menuItems:function(){return this._list.option("menuItems")},_deleteEnabled:function(){return this._list.option("allowItemDeleting")},_fireMenuAction:function(t,e){this._list._itemEventHandlerByHandler(t,e,{},{excludeValidators:["disabled","readOnly"]})}}},function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=g(n(3)),r=g(n(15)),a=g(n(6)),s=g(n(77)),l=g(n(33)),u=g(n(20)),c=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var e=m();if(e&&e.has(t))return e.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=o?Object.getOwnPropertyDescriptor(t,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=t[r]}n.default=t,e&&e.set(t,n);return n}(n(11)),d=g(n(4)),h=n(2),f=n(0),p=g(n(28));function m(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return m=function(){return t},t}function g(t){return t&&t.__esModule?t:{default:t}}var _="".concat("dx-scrollable-scrollbar","-active"),v="onScroll",y="onHover",b="always",w="never",x=null,C=u.default.inherit({_getDefaultOptions:function(){return(0,f.extend)(this.callBase(),{direction:null,visible:!1,activeStateEnabled:!1,visibilityMode:v,containerSize:0,contentSize:0,expandable:!0,scaleRatio:1})},_init:function(){this.callBase(),this._isHovered=!1},_initMarkup:function(){this._renderThumb(),this.callBase()},_render:function(){this.callBase(),this._renderDirection(),this._update(),this._attachPointerDownHandler(),this.option("hoverStateEnabled",this._isHoverMode()),this.$element().toggleClass("dx-scrollbar-hoverable",this.option("hoverStateEnabled"))},_renderThumb:function(){this._$thumb=(0,o.default)("
").addClass("dx-scrollable-scroll"),(0,o.default)("
").addClass("dx-scrollable-scroll-content").appendTo(this._$thumb),this.$element().addClass("dx-scrollable-scrollbar").append(this._$thumb)},isThumb:function(t){return!!this.$element().find(t).length},_isHoverMode:function(){var t=this.option("visibilityMode");return(t===y||t===b)&&this.option("expandable")},_renderDirection:function(){var t=this.option("direction");this.$element().addClass("dx-scrollbar-"+t),this._dimension="horizontal"===t?"width":"height",this._prop="horizontal"===t?"left":"top"},_attachPointerDownHandler:function(){a.default.on(this._$thumb,c.addNamespace(p.default.down,"dxScrollbar"),this.feedbackOn.bind(this))},feedbackOn:function(){this.$element().addClass(_),x=this},feedbackOff:function(){this.$element().removeClass(_),x=null},cursorEnter:function(){this._isHovered=!0,this._needScrollbar()&&this.option("visible",!0)},cursorLeave:function(){this._isHovered=!1,this.option("visible",!1)},_renderDimensions:function(){this._$thumb.css({width:this.option("width"),height:this.option("height")})},_toggleVisibility:function(t){this.option("visibilityMode")===v&&this._$thumb.css("opacity"),t=this._adjustVisibility(t),this.option().visible=t,this._$thumb.toggleClass("dx-state-invisible",!t)},_adjustVisibility:function(t){if(this._baseContainerToContentRatio&&!this._needScrollbar())return!1;switch(this.option("visibilityMode")){case v:break;case y:t=t||!!this._isHovered;break;case w:t=!1;break;case b:t=!0}return t},moveTo:function(t){if(!this._isHidden()){(0,h.isPlainObject)(t)&&(t=t[this._prop]||0);var e={};e[this._prop]=this._calculateScrollBarPosition(t),l.default.move(this._$thumb,e)}},_calculateScrollBarPosition:function(t){return-t*this._thumbRatio},_update:function(){var t=Math.round(this.option("containerSize")),e=Math.round(this.option("contentSize")),n=Math.round(this.option("baseContainerSize")),i=Math.round(this.option("baseContentSize"));isNaN(n)&&(n=t,i=e),this._baseContainerToContentRatio=i?n/i:n,this._realContainerToContentRatio=e?t/e:t;var o=Math.round(Math.max(Math.round(t*this._realContainerToContentRatio),15));this._thumbRatio=(t-o)/(this.option("scaleRatio")*(e-t)),this.option(this._dimension,o/this.option("scaleRatio")),this.$element().css("display",this._needScrollbar()?"":"none")},_isHidden:function(){return this.option("visibilityMode")===w},_needScrollbar:function(){return!this._isHidden()&&this._baseContainerToContentRatio<1},containerToContentRatio:function(){return this._realContainerToContentRatio},_normalizeSize:function(t){return(0,h.isPlainObject)(t)?t[this._dimension]||0:t},_clean:function(){this.callBase(),this===x&&(x=null),a.default.off(this._$thumb,".dxScrollbar")},_optionChanged:function(t){if(!this._isHidden())switch(t.name){case"containerSize":case"contentSize":this.option()[t.name]=this._normalizeSize(t.value),this._update();break;case"baseContentSize":case"baseContainerSize":this._update();break;case"visibilityMode":case"direction":this._invalidate();break;case"scaleRatio":this._update();break;default:this.callBase.apply(this,arguments)}},update:d.default.deferRenderer((function(){this._adjustVisibility()&&this.option("visible",!0)}))});s.default.add((function(){a.default.subscribeGlobal(r.default.getDocument(),c.addNamespace(p.default.up,"dxScrollbar"),(function(){x&&x.feedbackOff()}))})),t.exports=C},function(t,e,n){"use strict";var i=b(n(3)),o=b(n(15)),r=b(n(6)),a=n(46),s=n(0),l=n(10),u=n(5),c=n(2),d=n(24),h=b(n(33)),f=b(n(21)),p=b(n(383)),m=b(n(18)),g=n(11),_=n(4),v=b(n(381)),y=n(7);function b(t){return t&&t.__esModule?t:{default:t}}var w,x,C="android"===m.default.real.platform,S="horizontal",k=C?.95:.92,I=Math.round(1e3/60),T=(C?300:400)/I,E=(1-Math.pow(k,T))/(1-k),O="pageUp",M="pageDown",P="end",D="home",A="leftArrow",R="upArrow",B="rightArrow",N="downArrow",L="tab",F=p.default.inherit({ctor:function(t){this.callBase(),this.scroller=t},VELOCITY_LIMIT:1,_isFinished:function(){return Math.abs(this.scroller._velocity)<=this.VELOCITY_LIMIT},_step:function(){this.scroller._scrollStep(this.scroller._velocity),this.scroller._velocity*=this._acceleration()},_acceleration:function(){return this.scroller._inBounds()?k:.5},_complete:function(){this.scroller._scrollComplete()},_stop:function(){this.scroller._stopComplete()}}),V=F.inherit({VELOCITY_LIMIT:.2,_isFinished:function(){return this.scroller._crossBoundOnNextStep()||this.callBase()},_acceleration:function(){return k},_complete:function(){this.scroller._move(this.scroller._bounceLocation),this.callBase()}}),z=f.default.inherit({ctor:function(t){this._initOptions(t),this._initAnimators(),this._initScrollbar()},_initOptions:function(t){var e=this;this._location=0,this._topReached=!1,this._bottomReached=!1,this._axis=t.direction===S?"x":"y",this._prop=t.direction===S?"left":"top",this._dimension=t.direction===S?"width":"height",this._scrollProp=t.direction===S?"scrollLeft":"scrollTop",(0,u.each)(t,(function(t,n){e["_"+t]=n}))},_initAnimators:function(){this._inertiaAnimator=new F(this),this._bounceAnimator=new V(this)},_initScrollbar:function(){this._scrollbar=new v.default((0,i.default)("
").appendTo(this._$container),{direction:this._direction,visible:this._scrollByThumb,visibilityMode:this._visibilityModeNormalize(this._scrollbarVisible),expandable:this._scrollByThumb}),this._$scrollbar=this._scrollbar.$element()},_visibilityModeNormalize:function(t){return!0===t?"onScroll":!1===t?"never":t},_scrollStep:function(t){var e=this._location;this._location+=t,this._suppressBounce(),this._move(),Math.abs(e-this._location)<1||r.default.triggerHandler(this._$container,{type:"scroll"})},_suppressBounce:function(){this._bounceEnabled||this._inBounds(this._location)||(this._velocity=0,this._location=this._boundLocation())},_boundLocation:function(t){return t=void 0!==t?t:this._location,Math.max(Math.min(t,this._maxOffset),this._minOffset)},_move:function(t){this._location=void 0!==t?t*this._getScaleRatio():this._location,this._moveContent(),this._moveScrollbar()},_moveContent:function(){var t=this._location;this._$container[this._scrollProp](-t/this._getScaleRatio()),this._moveContentByTranslator(t)},_getScaleRatio:function(){if((0,l.hasWindow)()&&!this._scaleRatio){var t=this._$element.get(0),e=this._getRealDimension(t,this._dimension),n=this._getBaseDimension(t,this._dimension);this._scaleRatio=Math.round(e/n*100)/100}return this._scaleRatio||1},_getRealDimension:function(t,e){return Math.round((0,d.getBoundingRect)(t)[e])},_getBaseDimension:function(t,e){return t["offset"+(0,a.titleize)(e)]},_moveContentByTranslator:function(t){var e,n=-this._maxScrollPropValue;if(e=t>0?t:t<=n?t-n:t%1,this._translateOffset!==e){var i={};i[this._prop]=e,this._translateOffset=e,0!==e?h.default.move(this._$content,i):h.default.resetPosition(this._$content)}},_moveScrollbar:function(){this._scrollbar.moveTo(this._location)},_scrollComplete:function(){this._inBounds()&&(this._hideScrollbar(),this._completeDeferred&&this._completeDeferred.resolve()),this._scrollToBounds()},_scrollToBounds:function(){this._inBounds()||(this._bounceAction(),this._setupBounce(),this._bounceAnimator.start())},_setupBounce:function(){var t=(this._bounceLocation=this._boundLocation())-this._location;this._velocity=t/E},_inBounds:function(t){return t=void 0!==t?t:this._location,this._boundLocation(t)===t},_crossBoundOnNextStep:function(){var t=this._location,e=t+this._velocity;return t=this._minOffset||t>this._maxOffset&&e<=this._maxOffset},_initHandler:function(t){return this._stopDeferred=new y.Deferred,this._stopScrolling(),this._prepareThumbScrolling(t),this._stopDeferred.promise()},_stopScrolling:(0,_.deferRenderer)((function(){this._hideScrollbar(),this._inertiaAnimator.stop(),this._bounceAnimator.stop()})),_prepareThumbScrolling:function(t){if(!(0,g.isDxMouseWheelEvent)(t.originalEvent)){var e=(0,i.default)(t.originalEvent.target),n=this._isScrollbar(e);n&&this._moveToMouseLocation(t),this._thumbScrolling=n||this._isThumb(e),this._crossThumbScrolling=!this._thumbScrolling&&this._isAnyThumbScrolling(e),this._thumbScrolling&&this._scrollbar.feedbackOn()}},_isThumbScrollingHandler:function(t){return this._isThumb(t)},_moveToMouseLocation:function(t){var e=t["page"+this._axis.toUpperCase()]-this._$element.offset()[this._prop],n=this._location+e/this._containerToContentRatio()-this._$container.height()/2;this._scrollStep(-Math.round(n))},_stopComplete:function(){this._stopDeferred&&this._stopDeferred.resolve()},_startHandler:function(){this._showScrollbar()},_moveHandler:function(t){this._crossThumbScrolling||(this._thumbScrolling&&(t[this._axis]=-Math.round(t[this._axis]/this._containerToContentRatio())),this._scrollBy(t))},_scrollBy:function(t){t=t[this._axis],this._inBounds()||(t*=.5),this._scrollStep(t)},_scrollByHandler:function(t){this._scrollBy(t),this._scrollComplete()},_containerToContentRatio:function(){return this._scrollbar.containerToContentRatio()},_endHandler:function(t){return this._completeDeferred=new y.Deferred,this._velocity=t[this._axis],this._inertiaHandler(),this._resetThumbScrolling(),this._completeDeferred.promise()},_inertiaHandler:function(){this._suppressInertia(),this._inertiaAnimator.start()},_suppressInertia:function(){this._inertiaEnabled&&!this._thumbScrolling||(this._velocity=0)},_resetThumbScrolling:function(){this._thumbScrolling=!1,this._crossThumbScrolling=!1},_stopHandler:function(){this._thumbScrolling&&this._scrollComplete(),this._resetThumbScrolling(),this._scrollToBounds()},_disposeHandler:function(){this._stopScrolling(),this._$scrollbar.remove()},_updateHandler:function(){this._update(),this._moveToBounds()},_update:function(){var t=this;return this._stopScrolling(),(0,_.deferUpdate)((function(){t._resetScaleRatio(),t._updateLocation(),t._updateBounds(),t._updateScrollbar(),(0,_.deferRender)((function(){t._moveScrollbar(),t._scrollbar.update()}))}))},_resetScaleRatio:function(){this._scaleRatio=null},_updateLocation:function(){this._location=(h.default.locate(this._$content)[this._prop]-this._$container[this._scrollProp]())*this._getScaleRatio()},_updateBounds:function(){this._maxOffset=Math.round(this._getMaxOffset()),this._minOffset=Math.round(this._getMinOffset())},_getMaxOffset:function(){return 0},_getMinOffset:function(){return this._maxScrollPropValue=Math.max(this._contentSize()-this._containerSize(),0),-this._maxScrollPropValue},_updateScrollbar:(0,_.deferUpdater)((function(){var t=this,e=this._containerSize(),n=this._contentSize(),i=this._getBaseDimension(this._$container.get(0),this._dimension),o=this._getBaseDimension(this._$content.get(0),this._dimension);(0,_.deferRender)((function(){t._scrollbar.option({containerSize:e,contentSize:n,baseContainerSize:i,baseContentSize:o,scaleRatio:t._getScaleRatio()})}))})),_moveToBounds:(0,_.deferRenderer)((0,_.deferUpdater)((0,_.deferRenderer)((function(){var t=this._boundLocation(),e=t!==this._location;this._location=t,this._move(),e&&this._scrollAction()})))),_createActionsHandler:function(t){this._scrollAction=t.scroll,this._bounceAction=t.bounce},_showScrollbar:function(){this._scrollbar.option("visible",!0)},_hideScrollbar:function(){this._scrollbar.option("visible",!1)},_containerSize:function(){return this._getRealDimension(this._$container.get(0),this._dimension)},_contentSize:function(){var t="hidden"===this._$content.css("overflow"+this._axis.toUpperCase()),e=this._getRealDimension(this._$content.get(0),this._dimension);if(!t){var n=this._$content[0]["scroll"+(0,a.titleize)(this._dimension)]*this._getScaleRatio();e=Math.max(n,e)}return e},_validateEvent:function(t){var e=(0,i.default)(t.originalEvent.target);return this._isThumb(e)||this._isScrollbar(e)||this._isContent(e)},_isThumb:function(t){return this._scrollByThumb&&this._scrollbar.isThumb(t)},_isScrollbar:function(t){return this._scrollByThumb&&t&&t.is(this._$scrollbar)},_isContent:function(t){return this._scrollByContent&&!!t.closest(this._$element).length},_reachedMin:function(){return this._location<=this._minOffset},_reachedMax:function(){return this._location>=this._maxOffset},_cursorEnterHandler:function(){this._resetScaleRatio(),this._updateScrollbar(),this._scrollbar.cursorEnter()},_cursorLeaveHandler:function(){this._scrollbar.cursorLeave()},dispose:_.noop}),j=f.default.inherit({ctor:function(t){this._init(t)},_init:function(t){this._component=t,this._$element=t.$element(),this._$container=t._$container,this._$wrapper=t._$wrapper,this._$content=t._$content,this.option=t.option.bind(t),this._createActionByOption=t._createActionByOption.bind(t),this._isLocked=t._isLocked.bind(t),this._isDirection=t._isDirection.bind(t),this._allowedDirection=t._allowedDirection.bind(t)},render:function(){this._$element.addClass("dx-scrollable-simulated"),this._createScrollers(),this.option("useKeyboard")&&this._$container.prop("tabIndex",0),this._attachKeyboardHandler(),this._attachCursorHandlers()},_createScrollers:function(){this._scrollers={},this._isDirection(S)&&this._createScroller(S),this._isDirection("vertical")&&this._createScroller("vertical"),this._$element.toggleClass("dx-scrollable-scrollbars-alwaysvisible","always"===this.option("showScrollbar")),this._$element.toggleClass("dx-scrollable-scrollbars-hidden",!this.option("showScrollbar"))},_createScroller:function(t){this._scrollers[t]=new z(this._scrollerOptions(t))},_scrollerOptions:function(t){return{direction:t,$content:this._$content,$container:this._$container,$wrapper:this._$wrapper,$element:this._$element,scrollByContent:this.option("scrollByContent"),scrollByThumb:this.option("scrollByThumb"),scrollbarVisible:this.option("showScrollbar"),bounceEnabled:this.option("bounceEnabled"),inertiaEnabled:this.option("inertiaEnabled"),isAnyThumbScrolling:this._isAnyThumbScrolling.bind(this)}},_applyScaleRatio:function(t){for(var e in this._scrollers){var n=this._getPropByDirection(e);if((0,c.isDefined)(t[n])){var i=this._scrollers[e];t[n]*=i._getScaleRatio()}}return t},_isAnyThumbScrolling:function(t){var e=!1;return this._eventHandler("isThumbScrolling",t).done((function(t,n){e=t||n})),e},handleInit:function(t){this._suppressDirections(t),this._eventForUserAction=t,this._eventHandler("init",t).done(this._stopAction)},_suppressDirections:function(t){(0,g.isDxMouseWheelEvent)(t.originalEvent)?this._prepareDirections(!0):(this._prepareDirections(),this._eachScroller((function(e,n){var i=e._validateEvent(t);this._validDirections[n]=i})))},_prepareDirections:function(t){t=t||!1,this._validDirections={},this._validDirections[S]=t,this._validDirections.vertical=t},_eachScroller:function(t){t=t.bind(this),(0,u.each)(this._scrollers,(function(e,n){t(n,e)}))},handleStart:function(t){this._eventForUserAction=t,this._eventHandler("start").done(this._startAction)},_saveActive:function(){x=this},_resetActive:function(){x===this&&(x=null)},handleMove:function(t){if(this._isLocked())return t.cancel=!0,void this._resetActive();this._saveActive(),t.preventDefault&&t.preventDefault(),this._adjustDistance(t,t.delta),this._eventForUserAction=t,this._eventHandler("move",t.delta)},_adjustDistance:function(t,e){e.x*=this._validDirections[S],e.y*=this._validDirections.vertical;var n=this._tryGetDevicePixelRatio();n&&(0,g.isDxMouseWheelEvent)(t.originalEvent)&&(e.x=Math.round(e.x/n*100)/100,e.y=Math.round(e.y/n*100)/100)},_tryGetDevicePixelRatio:function(){if((0,l.hasWindow)())return(0,l.getWindow)().devicePixelRatio},handleEnd:function(t){return this._resetActive(),this._refreshCursorState(t.originalEvent&&t.originalEvent.target),this._adjustDistance(t,t.velocity),this._eventForUserAction=t,this._eventHandler("end",t.velocity).done(this._endAction)},handleCancel:function(t){return this._resetActive(),this._eventForUserAction=t,this._eventHandler("end",{x:0,y:0})},handleStop:function(){this._resetActive(),this._eventHandler("stop")},handleScroll:function(){this._scrollAction()},_attachKeyboardHandler:function(){r.default.off(this._$element,".".concat("dxSimulatedScrollableKeyboard")),!this.option("disabled")&&this.option("useKeyboard")&&r.default.on(this._$element,(0,g.addNamespace)("keydown","dxSimulatedScrollableKeyboard"),this._keyDownHandler.bind(this))},_keyDownHandler:function(t){var e=this;if(clearTimeout(this._updateHandlerTimeout),this._updateHandlerTimeout=setTimeout((function(){(0,g.normalizeKeyName)(t)===L&&e._eachScroller((function(t){t._updateHandler()}))})),this._$container.is(o.default.getActiveElement())){var n=!0;switch((0,g.normalizeKeyName)(t)){case N:this._scrollByLine({y:1});break;case R:this._scrollByLine({y:-1});break;case B:this._scrollByLine({x:1});break;case A:this._scrollByLine({x:-1});break;case M:this._scrollByPage(1);break;case O:this._scrollByPage(-1);break;case D:this._scrollToHome();break;case P:this._scrollToEnd();break;default:n=!1}n&&(t.stopPropagation(),t.preventDefault())}},_scrollByLine:function(t){var e=this._tryGetDevicePixelRatio(),n=40;e&&(n=Math.abs(n/e*100)/100),this.scrollBy({top:(t.y||0)*-n,left:(t.x||0)*-n})},_scrollByPage:function(t){var e=this._wheelProp(),n=this._dimensionByProp(e),i={};i[e]=t*-this._$container[n](),this.scrollBy(i)},_dimensionByProp:function(t){return"left"===t?"width":"height"},_getPropByDirection:function(t){return t===S?"left":"top"},_scrollToHome:function(){var t={};t[this._wheelProp()]=0,this._component.scrollTo(t)},_scrollToEnd:function(){var t=this._wheelProp(),e=this._dimensionByProp(t),n={};n[t]=this._$content[e]()-this._$container[e](),this._component.scrollTo(n)},createActions:function(){this._startAction=this._createActionHandler("onStart"),this._stopAction=this._createActionHandler("onStop"),this._endAction=this._createActionHandler("onEnd"),this._updateAction=this._createActionHandler("onUpdated"),this._createScrollerActions()},_createScrollerActions:function(){this._scrollAction=this._createActionHandler("onScroll"),this._bounceAction=this._createActionHandler("onBounce"),this._eventHandler("createActions",{scroll:this._scrollAction,bounce:this._bounceAction})},_createActionHandler:function(t){var e=arguments,n=this,i=this._createActionByOption(t);return function(){i((0,s.extend)(n._createActionArgs(),e))}},_createActionArgs:function(){var t=this._scrollers[S],e=this._scrollers.vertical,n=this.location();return this._scrollOffset={top:e&&-n.top,left:t&&-n.left},{event:this._eventForUserAction,scrollOffset:this._scrollOffset,reachedLeft:t&&t._reachedMax(),reachedRight:t&&t._reachedMin(),reachedTop:e&&e._reachedMax(),reachedBottom:e&&e._reachedMin()}},_eventHandler:function(t){var e=[].slice.call(arguments).slice(1),n=(0,u.map)(this._scrollers,(function(n){return n["_"+t+"Handler"].apply(n,e)}));return y.when.apply(i.default,n).promise()},location:function(){var t=h.default.locate(this._$content);return t.top-=this._$container.scrollTop(),t.left-=this._$container.scrollLeft(),t},disabledChanged:function(){this._attachCursorHandlers()},_attachCursorHandlers:function(){r.default.off(this._$element,".".concat("dxSimulatedScrollableCursor")),!this.option("disabled")&&this._isHoverMode()&&(r.default.on(this._$element,(0,g.addNamespace)("mouseenter","dxSimulatedScrollableCursor"),this._cursorEnterHandler.bind(this)),r.default.on(this._$element,(0,g.addNamespace)("mouseleave","dxSimulatedScrollableCursor"),this._cursorLeaveHandler.bind(this)))},_isHoverMode:function(){return"onHover"===this.option("showScrollbar")},_cursorEnterHandler:function(t){(t=t||{}).originalEvent=t.originalEvent||{},x||t.originalEvent._hoverHandled||(w&&w._cursorLeaveHandler(),w=this,this._eventHandler("cursorEnter"),t.originalEvent._hoverHandled=!0)},_cursorLeaveHandler:function(t){w===this&&x!==w&&(this._eventHandler("cursorLeave"),w=null,this._refreshCursorState(t&&t.relatedTarget))},_refreshCursorState:function(t){if(this._isHoverMode()||t&&!x){var e=(0,i.default)(t).closest(".".concat("dx-scrollable-simulated",":not(.dx-state-disabled)")),n=e.length&&e.data("dxScrollableStrategy");w&&w!==n&&w._cursorLeaveHandler(),n&&n._cursorEnterHandler()}},update:function(){var t=this,e=this._eventHandler("update").done(this._updateAction);return(0,y.when)(e,(0,_.deferUpdate)((function(){var e=t._allowedDirections();return(0,_.deferRender)((function(){var n=e.vertical?"pan-x":"";n=e.horizontal?"pan-y":n,n=e.vertical&&e.horizontal?"none":n,t._$container.css("touchAction",n)})),(0,y.when)().promise()})))},_allowedDirections:function(){var t=this.option("bounceEnabled"),e=this._scrollers.vertical,n=this._scrollers[S];return{vertical:e&&(e._minOffset<0||t),horizontal:n&&(n._minOffset<0||t)}},updateBounds:function(){this._scrollers[S]&&this._scrollers[S]._updateBounds()},scrollBy:function(t){var e=this._scrollers.vertical,n=this._scrollers[S];e&&(t.top=e._boundLocation(t.top+e._location)-e._location),n&&(t.left=n._boundLocation(t.left+n._location)-n._location),this._prepareDirections(!0),this._startAction(),this._eventHandler("scrollBy",{x:t.left,y:t.top}),this._endAction()},validate:function(t){return!this.option("disabled")&&(!!this.option("bounceEnabled")||((0,g.isDxMouseWheelEvent)(t)?this._validateWheel(t):this._validateMove(t)))},_validateWheel:function(t){var e=this,n=this._scrollers[this._wheelDirection(t)],i=n._reachedMin(),o=n._reachedMax(),r=!i||!o,a=!i&&!o,s=i&&t.delta>0,l=o&&t.delta<0,u=r&&(a||s||l);return(u=u||void 0!==this._validateWheelTimer)&&(clearTimeout(this._validateWheelTimer),this._validateWheelTimer=setTimeout((function(){e._validateWheelTimer=void 0}),500)),u},_validateMove:function(t){return!(!this.option("scrollByContent")&&!(0,i.default)(t.target).closest(".".concat("dx-scrollable-scrollbar")).length)&&this._allowedDirection()},getDirection:function(t){return(0,g.isDxMouseWheelEvent)(t)?this._wheelDirection(t):this._allowedDirection()},_wheelProp:function(){return this._wheelDirection()===S?"left":"top"},_wheelDirection:function(t){switch(this.option("direction")){case S:return S;case"vertical":return"vertical";default:return t&&t.shiftKey?S:"vertical"}},verticalOffset:function(){return 0},dispose:function(){this._resetActive(),w===this&&(w=null),this._eventHandler("dispose"),this._detachEventHandlers(),this._$element.removeClass("dx-scrollable-simulated"),this._eventForUserAction=null,clearTimeout(this._validateWheelTimer),clearTimeout(this._updateHandlerTimeout)},_detachEventHandlers:function(){r.default.off(this._$element,".".concat("dxSimulatedScrollableCursor")),r.default.off(this._$container,".".concat("dxSimulatedScrollableKeyboard"))}});e.SimulatedStrategy=j,e.Scroller=z},function(t,e,n){"use strict";var i=n(4).noop,o=n(21),r=o.abstract,a=n(184),s=o.inherit({ctor:function(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=this._stepCore.bind(this)},start:function(){this._stopped=!1,this._finished=!1,this._stepCore()},stop:function(){this._stopped=!0,a.cancelAnimationFrame(this._stepAnimationFrame)},_stepCore:function(){if(this._isStopped())this._stop();else{if(this._isFinished())return this._finished=!0,void this._complete();this._step(),this._stepAnimationFrame=a.requestAnimationFrame(this._proxiedStepCore)}},_step:r,_isFinished:i,_stop:i,_complete:i,_isStopped:function(){return this._stopped},inProgress:function(){return!(this._stopped||this._finished)}});t.exports=s},function(t,e,n){"use strict";var i=Number;function o(){this.setDomain(arguments[0],arguments[1]).setCodomain(arguments[2],arguments[3])}o.prototype={constructor:o,setDomain:function(t,e){return this._domain1=i(t),this._domain2=i(e),this._domainDelta=this._domain2-this._domain1,this},setCodomain:function(t,e){return this._codomain1=i(t),this._codomain2=i(e),this._codomainDelta=this._codomain2-this._codomain1,this},getDomain:function(){return[this._domain1,this._domain2]},getCodomain:function(){return[this._codomain1,this._codomain2]},getDomainStart:function(){return this._domain1},getDomainEnd:function(){return this._domain2},getCodomainStart:function(){return this._codomain1},getCodomainEnd:function(){return this._codomain2},getDomainRange:function(){return this._domainDelta},getCodomainRange:function(){return this._codomainDelta},translate:function(t){var e=(i(t)-this._domain1)/this._domainDelta;return 0<=e&&e<=1?this._codomain1+e*this._codomainDelta:NaN},adjust:function(t){var e=(i(t)-this._domain1)/this._domainDelta,n=NaN;return e<0?n=this._domain1:e>1?n=this._domain2:0<=e&&e<=1&&(n=i(t)),n}},e.Translator1D=o},function(t,e,n){"use strict";function i(t,e){for(;t.length0?"-":"+",a=Math.abs(o),s=a%60,l=i(Math.floor(a/60).toString(),2),u=i(s.toString(),2);return r+l+(e>=3?":":"")+(e>1||s?u:"")},X:function(t,e,n){return n||!t.getTimezoneOffset()?"Z":r.x(t,e,n)},Z:function(t,e,n){return r.X(t,e>=5?3:2,n)}};t.exports.getFormatter=function(t,e){return function(n){var i,o,a,s,l=0,u=!1,c="";if(!n)return null;if(!t)return n;var d="Z"===t[t.length-1]||"'Z'"===t.slice(-3);for(i=0;i>2,s=(3&e)<<4|n>>4,l=1>6:64,u=2>4,n=(15&a)<<4|(s=r.indexOf(t.charAt(u++)))>>2,i=(3&s)<<6|(l=r.indexOf(t.charAt(u++))),h[c++]=e,64!==s&&(h[c++]=n),64!==l&&(h[c++]=i);return h}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var i=t("./external"),o=t("./stream/DataWorker"),r=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");function s(t,e,n,i,o){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=o}r=t("./stream/DataLengthProbe"),s.prototype={getContentWorker:function(){var t=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new r("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,n){return t.pipe(new a).pipe(new r("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new r("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var i=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var i=t("./utils"),o=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,n,i){var r=o,a=0+n;t^=-1;for(var s=0;s>>8^r[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,n,i){var r=o,a=0+n;t^=-1;for(var s=0;s>>8^r[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,o=t("pako"),r=t("./utils"),a=t("./stream/GenericWorker"),s=i?"uint8array":"array";function l(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",r.inherits(l,a),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(r.transformTo(s,t.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new l("Deflate",t)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function i(t,e){var n,i="";for(n=0;n>>=8;return i}function o(t,e,n,o,a,c){var d,h,f=t.file,p=t.compression,m=c!==s.utf8encode,g=r.transformTo("string",c(f.name)),_=r.transformTo("string",s.utf8encode(f.name)),v=f.comment,y=r.transformTo("string",c(v)),b=r.transformTo("string",s.utf8encode(v)),w=_.length!==f.name.length,x=b.length!==v.length,C="",S="",k="",I=f.dir,T=f.date,E={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(E.crc32=t.crc32,E.compressedSize=t.compressedSize,E.uncompressedSize=t.uncompressedSize);var O=0;e&&(O|=8),m||!w&&!x||(O|=2048);var M=0,P=0;I&&(M|=16),"UNIX"===a?(P=798,M|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(f.unixPermissions,I)):(P=20,M|=function(t){return 63&(t||0)}(f.dosPermissions)),d=T.getUTCHours(),d<<=6,d|=T.getUTCMinutes(),d<<=5,d|=T.getUTCSeconds()/2,h=T.getUTCFullYear()-1980,h<<=4,h|=T.getUTCMonth()+1,h<<=5,h|=T.getUTCDate(),w&&(S=i(1,1)+i(l(g),4)+_,C+="up"+i(S.length,2)+S),x&&(k=i(1,1)+i(l(y),4)+b,C+="uc"+i(k.length,2)+k);var D="";return D+="\n\0",D+=i(O,2),D+=p.magic,D+=i(d,2),D+=i(h,2),D+=i(E.crc32,4),D+=i(E.compressedSize,4),D+=i(E.uncompressedSize,4),D+=i(g.length,2),D+=i(C.length,2),{fileRecord:u.LOCAL_FILE_HEADER+D+g+C,dirRecord:u.CENTRAL_FILE_HEADER+i(P,2)+D+i(y.length,2)+"\0\0\0\0"+i(M,4)+i(o,4)+g+C+y}}var r=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),l=t("../crc32"),u=t("../signature");function c(t,e,n,i){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(c,a),c.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=o(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=o(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return u.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=o},{"../utils":32}],19:[function(t,e,n){"use strict";var i=t("./Uint8ArrayReader");function o(t){i.call(this,t)}t("../utils").inherits(o,i),o.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var i=t("./DataReader");function o(t){i.call(this,t)}t("../utils").inherits(o,i),o.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},o.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},o.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},o.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var i=t("./ArrayReader");function o(t){i.call(this,t)}t("../utils").inherits(o,i),o.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var i=t("../utils"),o=t("../support"),r=t("./ArrayReader"),a=t("./StringReader"),s=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||o.uint8array?"nodebuffer"===e?new s(t):o.uint8array?new l(i.transformTo("uint8array",t)):new r(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var i=t("./GenericWorker"),o=t("../utils");function r(t){i.call(this,"ConvertWorker to "+t),this.destType=t}o.inherits(r,i),r.prototype.processChunk=function(t){this.push({data:o.transformTo(this.destType,t.data),meta:t.meta})},e.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var i=t("./GenericWorker"),o=t("../crc32");function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(r,i),r.prototype.processChunk=function(t){this.streamInfo.crc32=o(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var i=t("../utils"),o=t("./GenericWorker");function r(t){o.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(r,o),r.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}o.prototype.processChunk.call(this,t)},e.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var i=t("../utils"),o=t("./GenericWorker");function r(t){o.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}i.inherits(r,o),r.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=i},{}],29:[function(t,n,i){"use strict";var o=t("../utils"),r=t("./ConvertWorker"),a=t("./GenericWorker"),s=t("../base64"),l=t("../support"),u=t("../external"),c=null;if(l.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function d(t,e,n){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=n,o.checkSupport(i),this._worker=t.pipe(new r(i)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}d.prototype={accumulate:function(t){return function(t,n){return new u.Promise((function(i,r){var a=[],l=t._internalType,u=t._outputType,c=t._mimeType;t.on("data",(function(t,e){a.push(t),n&&n(e)})).on("error",(function(t){a=[],r(t)})).on("end",(function(){try{var t=function(t,e,n){switch(t){case"blob":return o.newBlob(o.transformTo("arraybuffer",e),n);case"base64":return s.encode(e);default:return o.transformTo(t,e)}}(u,function(t,n){var i,o=0,r=null,a=0;for(i=0;i>>6:(n<65536?e[a++]=224|n>>>12:(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63),e[a++]=128|n>>>6&63),e[a++]=128|63&n);return e}(t)},n.utf8decode=function(t){return o.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,o,r,a=t.length,l=new Array(2*a);for(e=n=0;e>10&1023,l[n++]=56320|1023&o)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(t=i.transformTo(o.uint8array?"uint8array":"array",t))},i.inherits(u,a),u.prototype.processChunk=function(t){var e=i.transformTo(o.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}(e),l=e;a!==e.length&&(o.uint8array?(l=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(l=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:n.utf8decode(l),meta:t.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=u,i.inherits(c,a),c.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var i=t("./support"),o=t("./base64"),r=t("./nodejsUtils"),a=t("set-immediate-shim"),s=t("./external");function l(t){return t}function u(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,o=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[a++]=224|n>>>12:(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63),e[a++]=128|n>>>6&63),e[a++]=128|63&n);return e},n.buf2binstring=function(t){return l(t,t.length)},n.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,o=e.length;n>10&1023,u[i++]=56320|1023&o)}return l(u,i)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+a[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){for(var o=65535&t|0,r=t>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,o){var r=i,a=o+n;t^=-1;for(var s=o;s>>8^r[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,n){"use strict";var i,o=t("../utils/common"),r=t("./trees"),a=t("./adler32"),s=t("./crc32"),l=t("./messages"),u=-2,c=258,d=262,h=113;function f(t,e){return t.msg=l[e],e}function p(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(o.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function _(t,e){r._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function v(t,e){t.pending_buf[t.pending++]=e}function y(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function b(t,e){var n,i,o=t.max_chain_length,r=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-d?t.strstart-(t.w_size-d):0,u=t.window,h=t.w_mask,f=t.prev,p=t.strstart+c,m=u[r+a-1],g=u[r+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(n=e)+a]===g&&u[n+a-1]===m&&u[n]===u[r]&&u[++n]===u[r+1]){r+=2,n++;do{}while(u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&rl&&0!=--o);return a<=t.lookahead?a:t.lookahead}function w(t){var e,n,i,r,l,u,c,h,f,p,m=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-d)){for(o.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=n=t.hash_size;i=t.head[--e],t.head[e]=m<=i?i-m:0,--n;);for(e=n=m;i=t.prev[--e],t.prev[e]=m<=i?i-m:0,--n;);r+=m}if(0===t.strm.avail_in)break;if(u=t.strm,c=t.window,h=t.strstart+t.lookahead,p=void 0,(f=r)<(p=u.avail_in)&&(p=f),n=0===p?0:(u.avail_in-=p,o.arraySet(c,u.input,u.next_in,p,h),1===u.state.wrap?u.adler=a(u.adler,c,p,h):2===u.state.wrap&&(u.adler=s(u.adler,c,p,h)),u.next_in+=p,u.total_in+=p,p),t.lookahead+=n,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=r._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(o=t.strstart+t.lookahead-3,i=r._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=o&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(w(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,_(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-d&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(_(t,!1),t.strm.avail_out),1)})),new S(4,4,8,4,x),new S(4,5,16,8,x),new S(4,6,32,32,x),new S(4,4,16,16,C),new S(8,16,32,32,C),new S(8,16,128,128,C),new S(8,32,128,256,C),new S(32,128,258,1024,C),new S(32,258,258,4096,C)],n.deflateInit=function(t,e){return E(t,e,8,15,8,0)},n.deflateInit2=E,n.deflateReset=T,n.deflateResetKeep=I,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=e,0):u},n.deflate=function(t,e){var n,o,a,l;if(!t||!t.state||5>8&255),v(o,o.gzhead.time>>16&255),v(o,o.gzhead.time>>24&255),v(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),v(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(v(o,255&o.gzhead.extra.length),v(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=s(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(v(o,0),v(o,0),v(o,0),v(o,0),v(o,0),v(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),v(o,3),o.status=h);else{var d=8+(o.w_bits-8<<4)<<8;d|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=h,y(o,d),0!==o.strstart&&(y(o,t.adler>>>16),y(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(t.adler=s(t.adler,o.pending_buf,o.pending-a,a)),g(t),a=o.pending,o.pending!==o.pending_buf_size));)v(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(t.adler=s(t.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(t.adler=s(t.adler,o.pending_buf,o.pending-a,a)),g(t),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(t.adler=s(t.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(t.adler=s(t.adler,o.pending_buf,o.pending-a,a)),g(t),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(t.adler=s(t.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&g(t),o.pending+2<=o.pending_buf_size&&(v(o,255&t.adler),v(o,t.adler>>8&255),t.adler=0,o.status=h)):o.status=h),0!==o.pending){if(g(t),0===t.avail_out)return o.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(n)&&4!==e)return f(t,-5);if(666===o.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==o.lookahead||0!==e&&666!==o.status){var b=2===o.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(w(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(o,e):3===o.strategy?function(t,e){for(var n,i,o,a,s=t.window;;){if(t.lookahead<=c){if(w(t),t.lookahead<=c&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=r._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(o,e):i[o.level].func(o,e);if(3!==b&&4!==b||(o.status=666),1===b||3===b)return 0===t.avail_out&&(o.last_flush=-1),0;if(2===b&&(1===e?r._tr_align(o):5!==e&&(r._tr_stored_block(o,0,0,!1),3===e&&(m(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),g(t),0===t.avail_out))return o.last_flush=-1,0}return 4!==e?0:o.wrap<=0?1:(2===o.wrap?(v(o,255&t.adler),v(o,t.adler>>8&255),v(o,t.adler>>16&255),v(o,t.adler>>24&255),v(o,255&t.total_in),v(o,t.total_in>>8&255),v(o,t.total_in>>16&255),v(o,t.total_in>>24&255)):(y(o,t.adler>>>16),y(o,65535&t.adler)),g(t),0=n.w_size&&(0===s&&(m(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new o.Buf8(n.w_size),o.arraySet(h,e,f-n.w_size,n.w_size,0),e=h,f=n.w_size),l=t.avail_in,c=t.next_in,d=t.input,t.avail_in=f,t.next_in=0,t.input=e,w(n);n.lookahead>=3;){for(i=n.strstart,r=n.lookahead-2;n.ins_h=(n.ins_h<>>=b=y>>>24,p-=b,0===(b=y>>>16&255))I[r++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=m[(65535&y)+(f&(1<>>=b,p-=b),p<15&&(f+=k[i++]<>>=b=y>>>24,p-=b,!(16&(b=y>>>16&255))){if(0==(64&b)){y=g[(65535&y)+(f&(1<>>=b,p-=b,(b=r-a)>3,f&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):l}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):l}function f(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=a.wsize?(i.arraySet(a.window,e,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(o<(r=a.wsize-a.wnext)&&(r=o),i.arraySet(a.window,e,n-o,r,a.wnext),(o-=r)?(i.arraySet(a.window,e,n-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=r(n.check,N,2,0),_=g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",n.mode=30;break}if(_-=4,P=8+(15&(g>>>=4)),0===n.wbits)n.wbits=P;else if(P>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=r(n.check,N,2,0)),_=g=0,n.mode=3;case 3:for(;_<32;){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}n.head&&(n.head.time=g),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,N[2]=g>>>16&255,N[3]=g>>>24&255,n.check=r(n.check,N,4,0)),_=g=0,n.mode=4;case 4:for(;_<16;){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}n.head&&(n.head.xflags=255&g,n.head.os=g>>8),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=r(n.check,N,2,0)),_=g=0,n.mode=5;case 5:if(1024&n.flags){for(;_<16;){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}n.length=g,n.head&&(n.head.extra_len=g),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=r(n.check,N,2,0)),_=g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(p<(x=n.length)&&(x=p),x&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,h,x,P)),512&n.flags&&(n.check=r(n.check,c,x,h)),p-=x,h+=x,n.length-=x),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break t;for(x=0;P=c[h+x++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&x>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;_<32;){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}t.adler=n.check=u(g),_=g=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=f,t.avail_out=m,t.next_in=h,t.avail_in=p,n.hold=g,n.bits=_,2;t.adler=n.check=1,n.mode=12;case 12:if(5===e||6===e)break t;case 13:if(n.last){g>>>=7&_,_-=7&_,n.mode=27;break}for(;_<3;){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}switch(n.last=1&g,_-=1,3&(g>>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6!==e)break;g>>>=2,_-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}g>>>=2,_-=2;break;case 14:for(g>>>=7&_,_-=7&_;_<32;){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}if((65535&g)!=(g>>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,_=g=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(x=n.length){if(p>>=5,_-=5,n.ndist=1+(31&g),g>>>=5,_-=5,n.ncode=4+(15&g),g>>>=4,_-=4,286>>=3,_-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},D=s(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,D){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,T=65535&B,!((k=B>>>24)<=_);){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}if(T<16)g>>>=k,_-=k,n.lens[n.have++]=T;else{if(16===T){for(R=k+2;_>>=k,_-=k,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}P=n.lens[n.have-1],x=3+(3&g),g>>>=2,_-=2}else if(17===T){for(R=k+3;_>>=k)),g>>>=3,_-=3}else{for(R=k+7;_>>=k)),g>>>=7,_-=7}if(n.have+x>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=P}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,A={bits:n.lenbits},D=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,D){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},D=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,D){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=p&&258<=m){t.next_out=f,t.avail_out=m,t.next_in=h,t.avail_in=p,n.hold=g,n.bits=_,a(t,w),f=t.next_out,d=t.output,m=t.avail_out,h=t.next_in,c=t.input,p=t.avail_in,g=n.hold,_=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[g&(1<>>16&255,T=65535&B,!((k=B>>>24)<=_);){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}if(I&&0==(240&I)){for(E=k,O=I,M=T;I=(B=n.lencode[M+((g&(1<>E)])>>>16&255,T=65535&B,!(E+(k=B>>>24)<=_);){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}g>>>=E,_-=E,n.back+=E}if(g>>>=k,_-=k,n.back+=k,n.length=T,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(R=n.extra;_>>=n.extra,_-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[g&(1<>>16&255,T=65535&B,!((k=B>>>24)<=_);){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}if(0==(240&I)){for(E=k,O=I,M=T;I=(B=n.distcode[M+((g&(1<>E)])>>>16&255,T=65535&B,!(E+(k=B>>>24)<=_);){if(0===p)break t;p--,g+=c[h++]<<_,_+=8}g>>>=E,_-=E,n.back+=E}if(g>>>=k,_-=k,n.back+=k,64&I){t.msg="invalid distance code",n.mode=30;break}n.offset=T,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(R=n.extra;_>>=n.extra,_-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===m)break t;if(x=w-m,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}C=x>n.wnext?(x-=n.wnext,n.wsize-x):n.wnext-x,x>n.length&&(x=n.length),S=n.window}else S=d,C=f-n.offset,x=n.length;for(mv?(b=L[F+d[S]],A[R+d[S]]):(b=96,0),f=1<>O)+(p-=f)]=y<<24|b<<16|w|0,0!==p;);for(f=1<>=1;if(0!==f?(D&=f-1,D+=f):D=0,S++,0==--B[C]){if(C===I)break;C=e[n+d[S]]}if(T>>7)]}function k(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function I(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function O(t,e,n){var i,o,r=new Array(16),a=0;for(i=1;i<=l;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=e;o++){var s=t[2*o+1];0!==s&&(t[2*o]=E(r[s]++,s))}}function M(t){var e;for(e=0;e>1;1<=n;n--)A(t,r,n);for(o=u;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,r[2*o]=r[2*n]+r[2*i],t.depth[o]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,r[2*n+1]=r[2*i+1]=o,t.heap[1]=o++,A(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,o,r,a,s,u=e.dyn_tree,c=e.max_code,d=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(r=0;r<=l;r++)t.bl_count[r]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)m<(r=u[2*u[2*(i=t.heap[n])+1]+1]+1)&&(r=m,g++),u[2*i+1]=r,c>=7;i>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(a=t.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==e?V(t,e,n,i):4===t.strategy||a===o?(I(t,2+(i?1:0),3),R(t,f,p)):(I(t,4+(i?1:0),3),function(t,e,n,i){var o;for(I(t,e-257,5),I(t,n-1,5),I(t,i-4,4),o=0;o>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(g[n]+r+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){I(t,2,3),T(t,256,f),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof i?i:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}).call(this,n(52).Buffer,n(56),n(389).setImmediate)},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){var i="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,o=Function.prototype.apply;function r(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(714),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(56))},function(t,e,n){"use strict";var i=u(n(55)),o=u(n(74)),r=u(n(43)),a=n(2),s=n(276),l=n(391);function u(t){return t&&t.__esModule?t:{default:t}}n(261);var c={thousands:"#,##0{0},"K"",millions:"#,##0{0},,"M"",billions:"#,##0{0},,,"B"",trillions:"#,##0{0},,,,"T"",percent:"0{0}%",decimal:"#{0}",fixedpoint:"#,##0{0}",exponential:"0{0}E+00",currency:" "},d=/a+/g,h=/E/g,f=/dE+/g,p=/L/g,m=/h/g,g=/\//g,_=/\[/g,v=/]/g,y=/./g,b=t.exports={_applyPrecision:function(t,e){var n,i;if(e>0){for(n="decimal"!==t?".":"",i=0;i=1632&&e<1642)return!0;return!1},_convertDateFormatToOpenXml:function(t){return t.replace(g,"\\/").split("'").map((function(t,e){return e%2===0?t.replace(d,"AM/PM").replace(f,"d").replace(h,"d").replace(p,"M").replace(m,"H").replace(_,"\\[").replace(v,"\\]"):t?t.replace(y,"\\$&"):"'"})).join("")},_convertDateFormat:function(t){var e=(r.default.format(new Date(2009,8,8,6,5,4),t)||"").toString(),n=(0,s.getFormat)((function(e){return r.default.format(e,t)}));return n&&(n=this._convertDateFormatToOpenXml(n),n=this._getLanguageInfo(e)+n),n},_getLanguageInfo:function(t){var e=(0,l.getLanguageId)(),n=e?e.toString(16):"",i="";if(this._hasArabicDigits(t)){for(;n.length<3;)n="0"+n;i="[$-2010"+n+"]"}else n&&(i="[$-"+n+"]");return i},_convertNumberFormat:function(t,e,n){var r,a;return(a="currency"===t?o.default.getOpenXmlCurrencyFormat(n):c[t.toLowerCase()])&&(r=i.default.format(a,this._applyPrecision(t,e))),r},convertFormat:function(t,e,n,i){if((0,a.isDefined)(t)){if("date"===n)return b._convertDateFormat(t);if((0,a.isString)(t)&&c[t.toLowerCase()])return b._convertNumberFormat(t,e,i)}}}},function(t,e,n){"use strict";var i=n(193).locale,o={ar:1,bg:2,ca:3,"zh-Hans":4,cs:5,da:6,de:7,el:8,en:9,es:10,fi:11,fr:12,he:13,hu:14,is:15,it:16,ja:17,ko:18,nl:19,no:20,pl:21,pt:22,rm:23,ro:24,ru:25,hr:26,sk:27,sq:28,sv:29,th:30,tr:31,ur:32,id:33,uk:34,be:35,sl:36,et:37,lv:38,lt:39,tg:40,fa:41,vi:42,hy:43,az:44,eu:45,hsb:46,mk:47,tn:50,xh:52,zu:53,af:54,ka:55,fo:56,hi:57,mt:58,se:59,ga:60,ms:62,kk:63,ky:64,sw:65,tk:66,uz:67,tt:68,bn:69,pa:70,gu:71,or:72,ta:73,te:74,kn:75,ml:76,as:77,mr:78,sa:79,mn:80,bo:81,cy:82,km:83,lo:84,gl:86,kok:87,syr:90,si:91,iu:93,am:94,tzm:95,ne:97,fy:98,ps:99,fil:100,dv:101,ha:104,yo:106,quz:107,nso:108,ba:109,lb:110,kl:111,ig:112,ii:120,arn:122,moh:124,br:126,ug:128,mi:129,oc:130,co:131,gsw:132,sah:133,qut:134,rw:135,wo:136,prs:140,gd:145,"ar-SA":1025,"bg-BG":1026,"ca-ES":1027,"zh-TW":1028,"cs-CZ":1029,"da-DK":1030,"de-DE":1031,"el-GR":1032,"en-US":1033,"fi-FI":1035,"fr-FR":1036,"he-IL":1037,"hu-HU":1038,"is-IS":1039,"it-IT":1040,"ja-JP":1041,"ko-KR":1042,"nl-NL":1043,"nb-NO":1044,"pl-PL":1045,"pt-BR":1046,"rm-CH":1047,"ro-RO":1048,"ru-RU":1049,"hr-HR":1050,"sk-SK":1051,"sq-AL":1052,"sv-SE":1053,"th-TH":1054,"tr-TR":1055,"ur-PK":1056,"id-ID":1057,"uk-UA":1058,"be-BY":1059,"sl-SI":1060,"et-EE":1061,"lv-LV":1062,"lt-LT":1063,"tg-Cyrl-TJ":1064,"fa-IR":1065,"vi-VN":1066,"hy-AM":1067,"az-Latn-AZ":1068,"eu-ES":1069,"hsb-DE":1070,"mk-MK":1071,"tn-ZA":1074,"xh-ZA":1076,"zu-ZA":1077,"af-ZA":1078,"ka-GE":1079,"fo-FO":1080,"hi-IN":1081,"mt-MT":1082,"se-NO":1083,"ms-MY":1086,"kk-KZ":1087,"ky-KG":1088,"sw-KE":1089,"tk-TM":1090,"uz-Latn-UZ":1091,"tt-RU":1092,"bn-IN":1093,"pa-IN":1094,"gu-IN":1095,"or-IN":1096,"ta-IN":1097,"te-IN":1098,"kn-IN":1099,"ml-IN":1100,"as-IN":1101,"mr-IN":1102,"sa-IN":1103,"mn-MN":1104,"bo-CN":1105,"cy-GB":1106,"km-KH":1107,"lo-LA":1108,"gl-ES":1110,"kok-IN":1111,"syr-SY":1114,"si-LK":1115,"iu-Cans-CA":1117,"am-ET":1118,"ne-NP":1121,"fy-NL":1122,"ps-AF":1123,"fil-PH":1124,"dv-MV":1125,"ha-Latn-NG":1128,"yo-NG":1130,"quz-BO":1131,"nso-ZA":1132,"ba-RU":1133,"lb-LU":1134,"kl-GL":1135,"ig-NG":1136,"ii-CN":1144,"arn-CL":1146,"moh-CA":1148,"br-FR":1150,"ug-CN":1152,"mi-NZ":1153,"oc-FR":1154,"co-FR":1155,"gsw-FR":1156,"sah-RU":1157,"qut-GT":1158,"rw-RW":1159,"wo-SN":1160,"prs-AF":1164,"gd-GB":1169,"ar-IQ":2049,"zh-CN":2052,"de-CH":2055,"en-GB":2057,"es-MX":2058,"fr-BE":2060,"it-CH":2064,"nl-BE":2067,"nn-NO":2068,"pt-PT":2070,"sr-Latn-CS":2074,"sv-FI":2077,"az-Cyrl-AZ":2092,"dsb-DE":2094,"se-SE":2107,"ga-IE":2108,"ms-BN":2110,"uz-Cyrl-UZ":2115,"bn-BD":2117,"mn-Mong-CN":2128,"iu-Latn-CA":2141,"tzm-Latn-DZ":2143,"quz-EC":2155,"ar-EG":3073,"zh-HK":3076,"de-AT":3079,"en-AU":3081,"es-ES":3082,"fr-CA":3084,"sr-Cyrl-CS":3098,"se-FI":3131,"quz-PE":3179,"ar-LY":4097,"zh-SG":4100,"de-LU":4103,"en-CA":4105,"es-GT":4106,"fr-CH":4108,"hr-BA":4122,"smj-NO":4155,"ar-DZ":5121,"zh-MO":5124,"de-LI":5127,"en-NZ":5129,"es-CR":5130,"fr-LU":5132,"bs-Latn-BA":5146,"smj-SE":5179,"ar-MA":6145,"en-IE":6153,"es-PA":6154,"fr-MC":6156,"sr-Latn-BA":6170,"sma-NO":6203,"ar-TN":7169,"en-ZA":7177,"es-DO":7178,"sr-Cyrl-BA":7194,"sma-SE":7227,"ar-OM":8193,"en-JM":8201,"es-VE":8202,"bs-Cyrl-BA":8218,"sms-FI":8251,"ar-YE":9217,"en-029":9225,"es-CO":9226,"sr-Latn-RS":9242,"smn-FI":9275,"ar-SY":10241,"en-BZ":10249,"es-PE":10250,"sr-Cyrl-RS":10266,"ar-JO":11265,"en-TT":11273,"es-AR":11274,"sr-Latn-ME":11290,"ar-LB":12289,"en-ZW":12297,"es-EC":12298,"sr-Cyrl-ME":12314,"ar-KW":13313,"en-PH":13321,"es-CL":13322,"ar-AE":14337,"es-UY":14346,"ar-BH":15361,"es-PY":15370,"ar-QA":16385,"en-IN":16393,"es-BO":16394,"en-MY":17417,"es-SV":17418,"en-SG":18441,"es-HN":18442,"es-NI":19466,"es-PR":20490,"es-US":21514,"bs-Cyrl":25626,"bs-Latn":26650,"sr-Cyrl":27674,"sr-Latn":28698,smn:28731,"az-Cyrl":29740,sms:29755,zh:30724,nn:30740,bs:30746,"az-Latn":30764,sma:30779,"uz-Cyrl":30787,"mn-Cyrl":30800,"iu-Cans":30813,"zh-Hant":31748,nb:31764,sr:31770,"tg-Cyrl":31784,dsb:31790,smj:31803,"uz-Latn":31811,"mn-Mong":31824,"iu-Latn":31837,"tzm-Latn":31839,"ha-Latn":31848};e.getLanguageId=function(){return o[i()]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=a(n(120)),r=a(n(718));function a(t){return t&&t.__esModule?t:{default:t}}var s={tryCreateTag:function(t){var e=null;return(0,i.isDefined)(t)&&(e={patternFill:r.default.tryCreateTag(t.patternFill)},s.isEmpty(e)&&(e=null)),e},tryCreateFillFromSimpleFormat:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.backgroundColor,n=t.fillPatternType,o=t.fillPatternColor;return!(0,i.isDefined)(e)||(0,i.isDefined)(n)&&(0,i.isDefined)(o)?(0,i.isDefined)(n)&&(0,i.isDefined)(o)?{patternFill:{patternType:n,foregroundColor:{rgb:o},backgroundColor:{rgb:e}}}:void 0:{patternFill:{patternType:"solid",foregroundColor:{rgb:e}}}},copySimpleFormat:function(t,e){void 0!==t.backgroundColor&&(e.backgroundColor=t.backgroundColor),void 0!==t.fillPatternType&&(e.fillPatternType=t.fillPatternType),void 0!==t.fillPatternColor&&(e.fillPatternColor=t.fillPatternColor)},copy:function(t){var e=null;return(0,i.isDefined)(t)&&(e={},void 0!==t.patternFill&&(e.patternFill=r.default.copy(t.patternFill))),e},areEqual:function(t,e){return s.isEmpty(t)&&s.isEmpty(e)||(0,i.isDefined)(t)&&(0,i.isDefined)(e)&&r.default.areEqual(t.patternFill,e.patternFill)},isEmpty:function(t){return!(0,i.isDefined)(t)||r.default.isEmpty(t.patternFill)},toXml:function(t){return o.default.toXml("fill",{},r.default.toXml(t.patternFill))}};e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(2),r=n(120),a=(i=r)&&i.__esModule?i:{default:i};var s={_tryConvertColor:function(t){if("string"!==typeof t)return t;var e;if(t.length>0&&"#"===t[0]){var n=t.substr(1,t.length);e=6===n.length?"FF"+n:8===n.length?n[6]+n[7]+n.substr(0,6):n}else e=t;return e},tryCreateTag:function(t){var e=null;return(0,o.isDefined)(t)&&(e="string"===typeof t?{rgb:this._tryConvertColor(t)}:{rgb:this._tryConvertColor(t.rgb),theme:t.theme},s.isEmpty(e)&&(e=null)),e},copy:function(t){var e=null;return(0,o.isDefined)(t)&&("string"===typeof t?e=t:(e={},void 0!==t.rgb&&(e.rgb=t.rgb),void 0!==t.theme&&(e.theme=t.theme))),e},isEmpty:function(t){return!(0,o.isDefined)(t)||!(0,o.isDefined)(t.rgb)&&!(0,o.isDefined)(t.theme)},areEqual:function(t,e){return s.isEmpty(t)&&s.isEmpty(e)||(0,o.isDefined)(t)&&(0,o.isDefined)(e)&&t.rgb===e.rgb&&t.theme===e.theme},toXml:function(t,e){return a.default.toXml(t,{rgb:e.rgb,theme:e.theme})}};e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=a(n(120)),r=a(n(393));function a(t){return t&&t.__esModule?t:{default:t}}var s={tryCreateTag:function(t){var e=null;return(0,i.isDefined)(t)&&(e={size:t.size,name:t.name,family:t.family,scheme:t.scheme,bold:t.bold,italic:t.italic,underline:t.underline,color:r.default.tryCreateTag(t.color)},s.isEmpty(e)&&(e=null)),e},copy:function(t){var e=null;return(0,i.isDefined)(t)&&(e={},void 0!==t.size&&(e.size=t.size),void 0!==t.name&&(e.name=t.name),void 0!==t.family&&(e.family=t.family),void 0!==t.scheme&&(e.scheme=t.scheme),void 0!==t.bold&&(e.bold=t.bold),void 0!==t.italic&&(e.italic=t.italic),void 0!==t.underline&&(e.underline=t.underline),void 0!==t.color&&(e.color=r.default.copy(t.color))),e},areEqual:function(t,e){return s.isEmpty(t)&&s.isEmpty(e)||(0,i.isDefined)(t)&&(0,i.isDefined)(e)&&t.size===e.size&&t.name===e.name&&t.family===e.family&&t.scheme===e.scheme&&(t.bold===e.bold||!t.bold===!e.bold)&&(t.italic===e.italic||!t.italic===!e.italic)&&t.underline===e.underline&&r.default.areEqual(t.color,e.color)},isEmpty:function(t){return!(0,i.isDefined)(t)||!(0,i.isDefined)(t.size)&&!(0,i.isDefined)(t.name)&&!(0,i.isDefined)(t.family)&&!(0,i.isDefined)(t.scheme)&&(!(0,i.isDefined)(t.bold)||!t.bold)&&(!(0,i.isDefined)(t.italic)||!t.italic)&&!(0,i.isDefined)(t.underline)&&r.default.isEmpty(t.color)},toXml:function(t){var e=[(0,i.isDefined)(t.bold)&&t.bold?o.default.toXml("b",{}):"",(0,i.isDefined)(t.size)?o.default.toXml("sz",{val:t.size}):"",(0,i.isDefined)(t.color)?r.default.toXml("color",t.color):"",(0,i.isDefined)(t.name)?o.default.toXml("name",{val:t.name}):"",(0,i.isDefined)(t.family)?o.default.toXml("family",{val:t.family}):"",(0,i.isDefined)(t.scheme)?o.default.toXml("scheme",{val:t.scheme}):"",(0,i.isDefined)(t.italic)&&t.italic?o.default.toXml("i",{}):"",(0,i.isDefined)(t.underline)?o.default.toXml("u",{val:t.underline}):""].join("");return o.default.toXml("font",{},e)}};e.default=s},function(t,e,n){"use strict";var i=p(n(3)),o=p(n(117)),r=n(2),a=p(n(275)),s=n(5),l=n(0),u=p(n(15)),c=p(n(17)),d=p(n(10)),h=n(46),f=n(7);function p(t){return t&&t.__esModule?t:{default:t}}var m,g=d.default.getWindow(),_=Math,v=_.PI,y=_.min,b=_.abs,w=_.sqrt,x=_.pow,C=_.atan2,S=_.cos,k=_.sin,I=Number;function T(t,e,n){var o=(0,i.default)("")[0];return o.width=t+2*n,o.height=e+2*n,o.hidden=!0,o}function E(t,e,n,i,o,r,a,s){var l=(t+n)/2,u=(e+i)/2,c=C(e-i,t-n),d=r?1:-1;c+=v/180*90*(a?1:-1);var h=w(x(n-t,2)+x(i-e,2))/2,f=w(b(x(o,2)-x(h,2))),p=l+d*(f*S(c)),m=u+d*(f*k(c)),g=C(e-m,t-p),_=C(i-m,n-p);s.arc(p,m,o,g,_,!a)}function O(t,e){var n,i=m(t.attributes||{}),o=(0,l.extend)({},i,{text:t.textContent.replace(/\s+/g," "),textAlign:"middle"===i["text-anchor"]?"center":i["text-anchor"]}),a=i.transform;return a&&((n=a.match(/translate\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*)*/))&&(n=n[0].match(/-*\d+([.]\d+)*/g),o.translateX=I(n[0]),o.translateY=n[1]?I(n[1]):0),(n=a.match(/rotate\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*,*\s*-*\d+([.]\d+)*)*/))&&(n=n[0].match(/-*\d+([.]\d+)*/g),o.rotationAngle=I(n[0]),o.rotationX=n[1]&&I(n[1]),o.rotationY=n[2]&&I(n[2])),(n=a.match(/scale\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*)*/))&&(n=n[0].match(/-*\d+([.]\d+)*/g),o.scaleX=I(n[0]),n.length>1?o.scaleY=I(n[1]):o.scaleY=o.scaleX)),function(t,e,n){var i,o=t.style||{};for(i in o)""!==o[i]&&(e[(0,h.camelize)(i)]=o[i]);n&&u.default.isElementNode(t)&&(o=g.getComputedStyle(t),["fill","stroke","stroke-width","font-family","font-size","font-style","font-weight"].forEach((function(t){t in o&&""!==o[t]&&(e[(0,h.camelize)(t)]=o[t])})),["opacity","fill-opacity","stroke-opacity"].forEach((function(t){t in o&&""!==o[t]&&"1"!==o[t]&&(e[t]=I(o[t]))})));e.textDecoration=e.textDecoration||e.textDecorationLine,e.globalAlpha=(0,r.isDefined)(e.opacity)?e.opacity:e.globalAlpha}(t,o,e),o}function M(t){var e=t&&t.match(/url\(.*#(.*?)["']?\)/i);return e&&e[1]}function P(t,e){var n=[];e.fontSize=e.fontSize||"10px",e.fontFamily,e.fill=e.fill||"#000",e.fontStyle&&n.push(e.fontStyle),e.fontWeight&&n.push(e.fontWeight),n.push(e.fontSize),n.push(e.fontFamily),t.font=n.join(" "),t.textAlign=e.textAlign,t.fillStyle=e.fill,t.globalAlpha=e.globalAlpha}function D(t,e,n){P(t,e),B(t,e,n),e.text&&t.fillText(e.text,e.x||0,e.y||0),z(t,e,!0),function(t,e,n){if(!e.textDecoration||"none"===e.textDecoration)return;var i=e.x,o=t.measureText(e.text).width,r=parseInt(e.fontSize,10),a=.05*r<1?1:.05*r,s=e.y;switch(e.textDecoration){case"line-through":s-=r/3+a/2;break;case"overline":s-=r-a;break;case"underline":s+=a}t.rect(i,s,o,a),j(t,e,n),z(t,e)}(t,e,n)}function A(t){for(var e=t.childNodes,n=0;n2&&void 0!==arguments[2]?arguments[2]:new f.Deferred;if(0===e.length)return i.resolve();var o=n(e[0]);function a(){t(Array.prototype.slice.call(e,1),n,i)}return(0,r.isPromise)(o)?o.then(a):a(),i}(t,(function(t){switch(t.tagName&&t.tagName.toLowerCase()){case"g":case"svg":var o=(0,l.extend)({},n,O(t,i.rootAppended));e.save(),N(e,o),L(e,o,i);var a=function(){e.restore()},u=V(t.childNodes,e,o,i);return(0,r.isPromise)(u)?u.then(a):a(),u;case"defs":return V(t.childNodes,e,{},i);case"clippath":i.clipPaths[t.attributes.id.textContent]=t.childNodes[0];break;case"pattern":i.patterns[t.attributes.id.textContent]=t;break;case"filter":i.filters[t.id]=F(t);break;case"lineargradient":i.gradients[t.attributes.id.textContent]=function(t){var e=[];return(0,s.each)(t.childNodes,(function(t,n){var i=n.attributes;e.push({offset:i.offset.value,stopColor:i["stop-color"].value})})),e}(t);break;default:return R(t,e,n,i)}}))}function z(t,e,n){var i=e.stroke;i&&"none"!==i&&0!==e["stroke-width"]&&(!function(t,e){var n=e["stroke-dasharray"]&&e["stroke-dasharray"].match(/(\d+)/g);n&&n.length&&(n=(0,s.map)(n,(function(t){return I(t)})),t.setLineDash(n))}(t,e),t.lineJoin=e["stroke-linejoin"],t.lineWidth=e["stroke-width"],t.globalAlpha=e.strokeOpacity,t.strokeStyle=i,n?t.strokeText(e.text,e.x,e.y):t.stroke(),t.globalAlpha=1)}function j(t,e,n){var i=e.fill;if(i&&"none"!==i){if(-1===i.search(/url/))t.fillStyle=i;else{var o=n.patterns[M(i)];if(!o)return;t.fillStyle=function(t,e,n){var i=O(e,n.rootAppended),o=T(i.width,i.height,0),r=o.getContext("2d");return V(e.childNodes,r,i,n),t.createPattern(o,"repeat")}(t,o,n)}t.globalAlpha=e.fillOpacity,t.fill(),t.globalAlpha=1}}function H(t,e,n,i,o){t.fillStyle=i||"#ffffff",t.fillRect(-o,-o,e+2*o,n+2*o)}function W(){var t=u.default.createElement("div");return t.style.left="-9999px",t.style.position="absolute",t}function U(t,e,n){return V(t.childNodes,e.getContext("2d"),{},{clipPaths:{},patterns:{},filters:{},gradients:{},rootAppended:n})}m=function(t){var e,n={};return(0,s.each)(t,(function(t,i){e=i.textContent,isFinite(e)&&(e=I(e)),n[i.name.toLowerCase()]=e})),n},e.imageCreator={getImageData:function(t,e){var n="image/"+e.format,i=e.width,o=e.height,s=e.backgroundColor;return(0,r.isFunction)(e.__parseAttributesFn)&&(m=e.__parseAttributesFn),function(t,e,n,i,o){var r,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:U,l=T(e,n,o),d=l.getContext("2d"),h=a.default.getSvgElement(t),p=u.default.isElementNode(t);return d.translate(o,o),u.default.getBody().appendChild(l),p||((r=W()).appendChild(h),u.default.getBody().appendChild(r)),h.attributes.direction&&(l.dir=h.attributes.direction.textContent),H(d,e,n,i,o),(0,f.fromPromise)(s(h,l,p&&c.default.contains(u.default.getBody(),t))).then((function(){return l})).always((function(){r&&u.default.getBody().removeChild(r),u.default.getBody().removeChild(l)}))}(t,i,o,s,e.margin,e.svgToCanvas).then((function(t){return function(t,e){var n=t.toDataURL(e,1);return g.atob(n.substring(("data:"+e+";base64,").length))}(t,n)}))},getData:function(t,n){var i=this;return e.imageCreator.getImageData(t,n).then((function(t){var e="image/"+n.format;return(0,r.isFunction)(g.Blob)&&!n.forceProxy?i._getBlob(t,e):i._getBase64(t)}))},_getBlob:function(t,e){var n,i=new Uint8Array(t.length);for(n=0;n=l&&i<=s&&os&&o>c||i>=l&&i<=s&&o>c?90:ic||i=u&&o<=c?180:0}function w(t,e,n,i,o,r,a){var s,l=t.width,v=t.height,y=r.arrowWidth,b=r.cornerRadius,w=void 0===b?0:b,x=y/2,C=l/2,S=v/2,k=Math.ceil(e+C),I=Math.floor(e-C),T=Math.floor(n-S),E=Math.ceil(n+S),O=[I,T],M=[k,T],P=[k,E],D=[I,E],A=i<=I?I:k<=i?k:i,R=o<=T?T:E<=o?E:o,B=c(R+x,E),N=u(R-x,T),L=u(A-x,I);if(w=Math.min(l/2,v/2,w),O[1]+=w,M[0]-=w,P[1]-=w,D[0]+=w,!a||I<=i&&i<=k&&T<=o&&o<=E)s=m(O,g(w,1,-1),"L",M,g(w,1,1),"L",P,g(w,-1,1),"L",D,g(w,-1,-1));else if(i>k&&op/2&&(W=m("L",[L,T,i,o,k,B])),s=m(O,g(w,1,-1),W,"L",P,g(w,-1,1),"L",D,g(w,-1,-1))}else if(i>k&&o>=T&&o<=E){var U;if(N>=M[1]+w&&B<=P[1])U=m(g(w,1,1),"L",[k,N,i,o,k,B],"L",P,g(w,-1,1));else if(N=M[1]+w&&B<=P[1]){var G=(M[1]+w-N)/w,K=M[0]+h(G)*w,q=M[1]+(1-d(G))*w;U=m(g(w,h(G),1-d(G)),"L",[K,q,i,o,k,B],"L",P,g(w,-1,1))}else if(N=P[1]){var tt=f((M[1]+w-N)/w),et=M[0]+w*h(tt),nt=M[1]+w*(1-d(tt)),it=f((B-P[1])/w),ot=P[0]+w*(h(it)-1),rt=P[1]+w*d(it);U=m(g(w,h(tt),1-d(tt)),"L",[et,nt,i,o,ot,rt],_(w,P[0]-w,P[1]+w))}else if(N>M[1]+w&&N<=P[1]&&B>P[1]){var at=f((B-P[1])/w),st=P[0]+w*(h(at)-1),lt=P[1]+w*d(at);U=m(g(w,1,1),"L",[k,N,i,o,st,lt],_(w,P[0]-w,P[1]+w))}else if(N>M[1]+w&&B>P[1]){var ut=f((B-P[1])/w),ct=P[0]+w*(h(ut)-1),dt=P[1]+w*d(ut),ht=f((N-P[1])/w),ft=P[0]+w*(h(ht)-1),pt=P[1]+w*d(ht);U=m(g(w,1,1),"L",P,g(w,h(ht)-1,d(ht)),"L",[ft,pt,i,o,ct,dt],_(w,P[0]-w,P[1]+w))}s=m(O,g(w,1,-1),"L",M,U,"L",D,g(w,-1,-1))}return m("M",s,"Z")}e.Plaque=function(){function t(e,n,i,o){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(t,e){return e.getBBox()},l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(t,e,n,i){return e.move(n,i)};r(this,t),this.widget=n,this.options=e,this.root=i,this.contentTemplate=o,this.bonded=a,this.measureContent=s,this.moveContentGroup=l}var e,n,s;return e=t,(n=[{key:"draw",value:function(t){var e=this,n=t.x,r=t.y,a=t.canvas,s=void 0===a?{}:a,d=t.offsetX,h=t.offsetY,f=t.offset,p=void 0===f?0:f,m=this.options,g=m.x,_=m.y,v=s.left,y=s.width-s.right,b=s.width-s.right-s.left,w=s.top,x=s.height-s.bottom,C=s.height-s.bottom-s.top;if(((0,o.isDefined)(n)&&(0,o.isDefined)(r)||(0,o.isDefined)(g)&&(0,o.isDefined)(_))&&(!(0,o.isDefined)(n)||!(n0?m.width:null,I=m.height>0?m.height:null,T=function(){var t,i=e._contentBBox=e.measureContent(e.widget,e._contentGroup),a=e._size={width:u(k,i.width)+2*m.paddingLeftRight,height:u(I,i.height)+2*m.paddingTopBottom,offset:p},s=S.offsetX,f=S.offsetY,T=2*S.blur+1,E=u(T-s,0),O=u(T+s,0),M=u(T-f,0),P=u(T+f,0);if(e.margins={lm:E,rm:O,tm:M,bm:P},(0,o.isDefined)(g)?(g+=d||0,(0,o.isDefined)(n)||(n=g)):g=(0,o.isDefined)(d)?n+d:b=0?e+o:e-o-_(i.width,i.height),this._scale.updateOptions(t)},_setupCodomain:function(){var t,e=this.option("geometry")||{},n=e.startAngle,o=e.endAngle;n=i(n)?d(n):225,o=i(o)?d(o):-45,g(n-o)<1?(o-=360,t={left:-1,up:-1,right:1,down:1}):(n=0||r<=0&&s<=0&&o<=a||r>=0&&s>=0&&o>=a?-1:v(o,a,0),right:r>=0&&s<=0||r>=0&&s>=0&&o>=a||r<=0&&s<=0&&o<=a?1:_(o,a,0),up:o<=0&&a>=0||o<=0&&a<=0&&r>=s||o>=0&&a>=0&&r<=s?-1:-_(r,s,0),down:o>=0&&a<=0||o>=0&&a>=0&&r<=s||o<=0&&a<=0&&r>=s?1:-v(r,s,0)}}(n,o)),this._area={x:0,y:0,radius:100,startCoord:n,endCoord:o,sides:t},this._translator.setCodomain(n,o)},_shiftScale:function(t){var e=this._scale,n=e.getCanvas();n.width=n.height=2*t.radius,e.draw(n);var i=e.getCenter();e.shift({right:t.x-i.x,bottom:t.y-i.y})},_getScaleLayoutValue:function(){return this._area.radius},_getTicksOrientation:function(t){return t.orientation},_getTicksCoefficients:function(t){var e={inner:0,outer:1};return"inside"===t.orientation?(e.inner=1,e.outer=0):"center"===t.orientation&&(e.inner=e.outer=.5),e},_correctScaleIndents:function(t,e,n){e>=0?(t.horizontalOffset=e+n.width,t.verticalOffset=e+n.height):(t.horizontalOffset=t.verticalOffset=0,t.min-=-e+_(n.width,n.height)),t.inverseHorizontalOffset=n.width/2,t.inverseVerticalOffset=n.height/2},_measureMainElements:function(t,e){var n=this._area.radius,i=0,o=1/0,r=0,a=0,s=0,l=0,u=this._scale;return b(t.concat(u),(function(t,u){var c=u.measure?u.measure({radius:n-u.getOffset()}):e;c.min>0&&(o=v(o,c.min)),c.max>0&&(i=_(i,c.max)),c.horizontalOffset>0&&(r=_(r,c.max+c.horizontalOffset)),c.verticalOffset>0&&(a=_(a,c.max+c.verticalOffset)),c.inverseHorizontalOffset>0&&(s=_(s,c.inverseHorizontalOffset)),c.inverseVerticalOffset>0&&(l=_(l,c.inverseVerticalOffset))})),r=_(r-i,0),a=_(a-i,0),{minRadius:o,maxRadius:i,horizontalMargin:r,verticalMargin:a,inverseHorizontalMargin:s,inverseVerticalMargin:l}},_applyMainLayout:function(t,e){var n=this._measureMainElements(t,e),i=this._area,o=i.sides,r={left:(o.left<-.1?n.horizontalMargin:n.inverseHorizontalMargin)||0,right:(o.right>.1?n.horizontalMargin:n.inverseHorizontalMargin)||0,top:(o.up<-.1?n.verticalMargin:n.inverseVerticalMargin)||0,bottom:(o.down>.1?n.verticalMargin:n.inverseVerticalMargin)||0},s=function(t,e,n){var i,o=a({},t),r=0,s=0;n=n||{},e>0&&(o.left+=n.left||0,o.right-=n.right||0,o.top+=n.top||0,o.bottom-=n.bottom||0,C(o)>0&&S(o)>0?((i=S(o)/C(o))>1?ei?s=S(o):r=C(o),r>0||(r=s/e),s>0||(s=r*e),r=(C(o)-r)/2,s=(S(o)-s)/2,o.left+=r,o.right-=r,o.top+=s,o.bottom-=s):(o.left=o.right=(o.left+o.right)/2,o.top=o.bottom=(o.top+o.bottom)/2));return o}(this._innerRect,(o.down-o.up)/(o.right-o.left),r),l=v(C(s)/(o.right-o.left),S(s)/(o.down-o.up));l=l-n.maxRadius+i.radius;var u=s.left-C(s)*o.left/(o.right-o.left),c=s.top-S(s)*o.up/(o.down-o.up);i.x=y(u),i.y=y(c),i.radius=l,s.left-=r.left,s.right+=r.right,s.top-=r.top,s.bottom+=r.bottom,this._innerRect=s},_getElementLayout:function(t){return{x:this._area.x,y:this._area.y,radius:y(this._area.radius-t)}},_getApproximateScreenRange:function(){var t=this._area,e=v(this._canvas.width/(t.sides.right-t.sides.left),this._canvas.height/(t.sides.down-t.sides.up));return e>t.totalRadius&&(e=t.totalRadius),e*=.8,-this._translator.getCodomainRange()*e*w/180},_getDefaultSize:function(){return{width:300,height:300}},_factory:r.clone(l.prototype._factory)});function C(t){return t.right-t.left}function S(t){return t.bottom-t.top}var k=x.prototype._factory.indicators={};x.prototype._factory.createIndicator=p(k),k._default=f._default,k.rectangleneedle=f.rectangleneedle,k.triangleneedle=f.triangleneedle,k.twocolorneedle=f.twocolorneedle,k.trianglemarker=f.trianglemarker,k.textcloud=f.textcloud,k.rangebar=f.rangebar,x.prototype._factory.RangeContainer=m,o("dxCircularGauge",x),t.exports=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.smartFormatter=w,e.formatRange=function(t,e,n,a){var s=a.dataType,l=a.type,c=a.logarithmBase;if("discrete"===l)return"";if("datetime"===s)return function(t,e,n){var o=p(t,e),a=r.default.getDateFormatByTickInterval(n),s=b(i.default.getDateFormatByDifferences(o,a)),l=[];if(n in o){var c=function(t,e){var n=!1;for(var o in t)n?t[o]=!1:o===e?n=!0:t[o]=!0;return b(i.default.getDateFormatByDifferences(t))}(p(t,e),n),d=u(t,c);d&&l.push(d)}else{var h=function(t){var e=!1;for(var n in t)!0===t[n]||"hour"===n||e?(t[n]=!1,e=!0):!1===t[n]&&(t[n]=!0);return b(i.default.getDateFormatByDifferences(t))}(p(t,e)),f=u(t,h);f&&l.push(f),l.push("".concat(u(t,s)," - ").concat(u(e,s)))}return l.join(", ")}(t,e,function(t){if((0,o.isObject)(t)){var e=Object.keys(t);if(1===e.reduce((function(e,n){return t[n]+e}),0)){var n=e.filter((function(e){return 1===t[e]}))[0];return n.slice(0,n.length-1)}}return t}(n));var d={ticks:[],type:l,dataType:s,tickInterval:n,logarithmBase:c,labelOptions:{}};return"".concat(w(t,d)," - ").concat(w(e,d))};var i=l(n(94)),o=n(2),r=l(n(26)),a=n(37),s=n(13);function l(t){return t&&t.__esModule?t:{default:t}}var u=i.default.format,c=Math.abs,d=Math.floor,h=["fixedPoint","thousands","millions","billions","trillions","exponential"],f=["millisecond","second","minute","hour","day","month","year"];function p(t,e,n,i){var o,a,s,l,u,c=f.length;"week"===i?i="day":"quarter"===i?i="month":"shorttime"===i?i="hour":"longtime"===i&&(i="second");var d=f.indexOf(i);if(n){if(a=r.default.getDatesDifferences(e,n),o=r.default.getDatesDifferences(e,t),a[i])for(l=c-1;l>=d;l--)if(s=f[l],l===d)_(a,d+(a.millisecond?2:1));else if(a[s]){g(a,l);break}}else for(o=r.default.getDatesDifferences(t,e),l=c-1;l>=d;l--)if(o[s=f[l]]){if(l-d>1){for(u=d+1;u>=0;u--)g(o,u);break}if(m(e,s)){for(u=l-1;u>0;u--)g(o,u);break}}return n?a:o}function m(t,e){var n,i=[t.getMilliseconds(),t.getSeconds(),t.getMinutes(),t.getHours(),t.getDate(),t.getMonth()],o=f.indexOf(e);for(n=0;n=1?1:(0,a.adjust)(1-c(t),t)),(0,o.isDefined)(P)||"discrete"===e.type||!t||10!==e.logarithmBase&&A||("datetime"!==e.dataType&&(0,o.isDefined)(k)?(D.length&&-1===D.indexOf(t)&&(M=v(D,t),k=(0,a.adjust)(c(t-D[M]),t)),(g=y(k))<2&&(g=y(t)),A?(w=(0,s.getAdjustedLog10)(c(t)))>0?m=h[d(w/3)]||"exponential":w<-4?m="exponential":T=void 0:g.length>1&&!(0,o.isExponential)(k)?(T=g[1].length,m=h[O]):(0,o.isExponential)(k)&&(-1!==I.indexOf(".")||(0,o.isExponential)(t))?(m="exponential",T=(0,o.isExponential)(t)?Math.max(c((0,a.getExponent)(t)-(0,a.getExponent)(k)),c((0,a.getPrecision)(t)-(0,a.getPrecision)(k))):c((S=I.split(".")[1]).length-parseInt(S).toString().length-(0,a.getExponent)(k)+1)):(n=d((0,s.getAdjustedLog10)(k)),f=l=d((0,s.getAdjustedLog10)(c(t))),l-n>=2&&(f=n),E=3*(O=d(f/3)),O<5?(n-E===2&&l>=3&&(E=3*++O),m=h[O]):m=h[h.length-1],E>0&&(g=y(k/Math.pow(10,E)))[1]&&(T=g[1].length)),void 0===m&&void 0===T||(P={type:m,precision:T})):"datetime"===e.dataType&&(m=r.default.getDateFormatByTickInterval(k),e.showTransition&&D.length&&(M=D.map(Number).indexOf(+t),1===D.length&&0===M?m=i.default.getDateFormatByTicks(D):(-1===M?x=v(D,t):(x=0===M?D.length-1:M-1,C=0===M?1:-1),_=p(D[x],t,D[C],m),m=i.default.getDateFormatByDifferences(_,m))),P=b(m))),u(t,P)}},function(t,e,n){"use strict";var i,o=n(13),r=n(26),a=(i=r)&&i.__esModule?i:{default:i},s=n(2),l=n(37),u=n(0);function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){o=!0,r=l}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);ni.interval&&l>=d}function M(t){return function(e,n,i,r){return O((0,o.getLogExt)(e,t),(0,o.getLogExt)(n,t),i,r)}}function P(t,e,n,i){return O(t.valueOf(),e.valueOf(),f(n),i)}function D(t,e){var n=0;return e&&(n=e.reduce((function(t,e){return t+(e.to-e.from)}),0)),m(t.max-t.min-n)}function A(t,e,n,i){var o=e/n-(i||0);return t/(o=o<1?1:o)}function R(t,e){return v(10,g((0,o.getLogExt)(t,10))+(e||0))}function B(t,e,n,i,o,r,a,s,l,u){var c=A(t,e,o,s),d=1,h=!1===a;return i&&n||((c>=1||!h&&c>0)&&(d=N(c,r,h)),(!n||!i&&nn&&(n=u),n}function N(t,e,n){var i=R(t,-1),o=1;return e=e||y,t>0&&(t/=i,o=e.concat(10*e[0]).map((function(t){return 10*t})).reduce((function(e,o){return.1===i&&n&&25===o?e:e=o?i:e}),0)}function F(t){return function(e,n){var i=R(e);return!t&&i<1&&(i=1),(n=n||b).concat(10*n[0]).reduce((function(t,n){return tf(n)&&(n=u)),n}function H(t,e,n,i){var o;for(var r in e=e||function(t){return t&&t>2?x:w}(i))if(o=e[r].reduce(V(t,r),o))break;if(!o)for(var a=1;!(o=y.reduce(z(t,a),o));a*=10);return o}function W(t,e,n,i){return j(t,e,n,!0,i,C)}function U(t,e){return function(n){return n&&e(m((0,l.adjust)(t(n[1])-t(n[0]))))||void 0}}function G(t,e,n){return a.default.addInterval(t,e,n)}function K(t,e,n){return G(t,e,n)}function q(t,e,n){return e=e.filter((function(t){return!t.gapSize})),function(i,o,r){var a;return i=t(i,o,r),e.every((function(e){return i>=t(e.from,o)&&t(i,o)=t.from&&n_&&(y=e(g,n(c/2),v))>_&&(y=e(g,r,v,a=!0)),y=m(y);y<_&&y!==p||f&&y<=_;)b.push(y),p=y,y=m(t(y,r));return(a||y-_===0||!(0,s.isDefined)(a)&&i(_,y,r,v))&&b.push(y),b}}function Y(t,e,n,i,o){return function(r,a,s,l,u,c,d){var h=u/l,f=s[s.length-1],p=s[0],m=d-1;if((null===c||void 0===c?void 0:c.length)&&(e=q(e,c,n)),0===(l=t(l,p,p,h)))return[];var g=i(n(r,u,r),l);l=t(l,p,g,h);for(var _=[];g0);)g>=r&&_.push(g),m--,g=e(g,l);var v=s.reduce((function(n,o){if(m=d-1,null===n.prevTick)return n.prevTick=o,n;l=t(l,o,n.prevTick,h);for(var r=i(n.prevTick,l);r0);)r!==n.prevTick&&n.minors.push(r),m--,r=e(r,l);return n.prevTick=o,n}),{prevTick:null,minors:[]});_=_.concat(v.minors);var y,b=o(a,u,r);for(l=t(l,b,b,h),g=i(f,l);g=n.to)break}return[e[0].concat(o),i]}),[[],0]);return n[0].concat(t.slice(n[1]))}return t}function X(t,e,n,i,o,r,a,s,l,u){function c(e,n,i){return e&&n/a(e)>=i+1&&(t.incidentOccurred("W2003"),e=void 0),e}return function(d,h,f,p,m,g,_,v){m=m||{};var y=e(d,v),b=function(t){return{tickInterval:o(t.majors),ticks:t.majors||[],minorTickInterval:r(t.minors),minorTicks:t.minors||[]}}(m);return isNaN(y)||(0!==y||m.majors?(b=function(e,i,o,r,a,l,d,h){if(d.majors)return e.breaks=h,e;var f,p=h.filter((function(t){return t.gapSize}));return a=t.skipCalculationLimits?a:c(a,o,r),a=n(o,r,a,l,t.axisDivisionFactor,t.numberMultipliers,t.allowDecimals,h.length,p[0]&&p[0].gapSize.days,t.minTickInterval),t.skipTickGeneration||(f=Z(f=s(i,a,t.endOnTick,p,h,o,r,t.axisDivisionFactor,t.generateExtraTick),h=u(h,f,a)),e.breaks=h,e.ticks=e.ticks.concat(f)),e.tickInterval=a,e}(b,d,y,h,f,p,m,v||[]),!t.skipTickGeneration&&y>0&&(b=function(e,n,o,s,u,d,h){if(!t.calculateMinors)return e;if(h.minors)return e;var f=a(e.tickInterval),p=s*f/o,m=e.breaks;return!u&&d?u=r([f/(d+1),f/(d+1)*2]):d=void 0,u=c(u,f,p),u=i(f,p,u,t.minorAxisDivisionFactor),e.minorTicks=Z(e.minorTicks.concat(l(n.min,n.max,e.ticks,u,e.tickInterval,m,d)),m),e.minorTickInterval=u,e}(b,d,y,h,g,_,m))):b.ticks=[d.min]),b}}function J(t,e,n,i){var o=c(e,2),r=o[0],a=o[1];return(!(0,s.isDefined)(r)||m(i(t)-i(r))/n>.25)&&((0,s.isDefined)(a)?r=a:(0,s.isDefined)(r)||(r=t)),r}function Q(t,e,n){return function(i,o,r){var a=t(r),s=.5*a;return i.reduce((function(t,i){var r=o.filter((function(t){return t<=i.from})),l=n(J(i.from,[].concat(r[r.length-1],o[r.length]),a,e),s);r=o.filter((function(t){return t>=i.to}));var u=n(J(i.to,[].concat(r[0],o[o.length-r.length-1]),a,e),-s);return e(u)-e(l)0&&(h=f(d,a)),(!i||!o&&ii&&(i=c),i}),L,U(r,k),U(k,k),k,$(function(t,e){return function(n,i,o){return e(G(t(n),i,o))}}(r,i),E(l,u,M(n),t.endOnTick),F(t.skipCalculationLimits),M(n)),Y((function(t,e,n,i){return Math.max(Math.abs(e),Math.abs(n))/i}),G,l,c,u),Q(k,r,(function(t,e){return i(r(t)+e)})))}e.tickGenerator=function(t){return t.rangeIsEmpty?function(t){return function(e,n,i,o){var r=g(n/t.axisDivisionFactor),a=n/(r=r<1?1:r);return{ticks:a>0?Array.apply(null,new Array(r+1)).map((function(t,e){return a*e})):[],tickInterval:a}}}(t):"discrete"===t.axisType?function(t){return function(e,n,i,r){var a=(0,o.getCategoriesInfo)(e.categories,e.min,e.max).categories;return{ticks:a,tickInterval:_(a.length*t.axisDivisionFactor/n)}}}(t):"logarithmic"===t.axisType?et(t):"datetime"===t.dataType?function(t){function e(e,n){var i=T(k,g,k),o=(0,s.isString)(n)?a.default.getDateIntervalByString(n.toLowerCase()):n,r=f(n);(o.days%7===0||n.quarters)&&(o=H(r));var l=function(e){return a.default.correctDateWithUnitBeginning(e,o,null,t.firstDayOfWeek)},u=function(t){return new Date(g((t.getTime()-6e4*t.getTimezoneOffset())/r)*r+6e4*t.getTimezoneOffset())};return e=l(e),"years"in o?e.setFullYear(i(e.getFullYear(),o.years,0)):"quarters"in o?e=l(u(e)):"months"in o?e.setMonth(i(e.getMonth(),o.months,0)):"weeks"in o||"days"in o?e=l(u(e)):"hours"in o?e.setHours(i(e.getHours(),o.hours,0)):"minutes"in o?e.setMinutes(i(e.getMinutes(),o.minutes,0)):"seconds"in o?e.setSeconds(i(e.getSeconds(),o.seconds,0)):"milliseconds"in o&&(e=u(e)),e}var n=U(k,a.default.convertMillisecondsToDateUnits);return X(t,D,j,W,n,n,f,$(K,E(e,(function(t,n){for(var i=e(t,n);t-i>0;)i=K(i,n);return i}),P,t.endOnTick),H,P),Y(k,K,e,K,k),Q(f,k,(function(t,e){return new Date(t.getTime()+e)})))}(t):function(t){var e=T(k,g,k),n=T(k,_,k),i=U(k,k);return X(t,D,B,L,i,i,k,$(G,E(e,n,O,t.endOnTick),N,O),Y(k,G,e,G,k),Q(k,k,(function(t,e){return t+e})))}(t)}},function(t,e,n){"use strict";var i=n(2).isDefined,o=n(0).extend;function r(t){return{stroke:t.color,"stroke-width":t.width,"stroke-opacity":t.opacity,opacity:1}}e.tick=function(t,e,n,a,s,l,u){var c=u||t._tickOffset,d=t._axisLineGroup,h=t._axisElementsGroup,f=r(n),p=r(a),m=/^\s+$/,g=t.getOptions().label,_=t._textOptions;function v(e,n){var o=t.formatHint(e.value,g,n);i(o)&&""!==o&&e.label.setTitle(o)}return function(r){var u={value:r,updateValue:function(t){this.value=r=t},initCoords:function(){this.coords=t._getTranslatedValue(r,c),this.labelCoords=t._getTranslatedValue(r)},saveCoords:function(){this._lastStoredCoordinates={coords:this._storedCoords,labelCoords:this._storedLabelsCoords},this._storedCoords=this.coords,this._storedLabelsCoords=this.labelCoords},resetCoordinates:function(){this._storedCoords=this._lastStoredCoordinates.coords,this._storedLabelsCoords=this._lastStoredCoordinates.labelCoords},drawMark:function(e){n.visible&&s!==r&&(t.areCoordsOutsideAxis(this.coords)||(this.mark?(this.mark.append(d),t.sharp(this.mark,t.getSharpDirectionByCoords(this.coords)),this.updateTickPosition(e)):(this.mark=t._createPathElement([],f,t.getSharpDirectionByCoords(this.coords)).append(d),this.updateTickPosition(e))))},setSkippedCategory:function(t){s=t},_updateLine:function(e,n,i,o,r){e&&(null!==n.points&&null!==n.r?(o&&i&&null!==i.points?(n.opacity=1,e.attr(i),e.animate(n)):(n.opacity=o?0:1,e.attr(n),o&&e.animate({opacity:1},{delay:.5,partitionDuration:.5})),this.coords.angle&&t._rotateTick(e,this.coords,r)):e.remove())},updateTickPosition:function(e,i){this._updateLine(this.mark,{points:t._getTickMarkPoints(u.coords,n.length,e)},this._storedCoords&&{points:t._getTickMarkPoints(u._storedCoords,n.length,e)},i,!1)},drawLabel:function(n){if(g.visible&&!l&&!t.getTranslator().getBusinessRange().isEmpty()&&!t.areCoordsOutsideAxis(this.labelCoords)){var a=t.formatLabel(r,g,n);if(this.label)return this.label.attr({text:a,rotate:0}).append(h),v(this,n),void this.updateLabelPosition();i(a)&&""!==a&&!m.test(a)&&(this.label=e.text(a).css(function(e){var n=t._textFontStyles,i=g.customizeColor;return i&&i.call&&(n=o({},t._textFontStyles,{fill:i.call(e,e)})),n}(this)).attr(_).data("chart-data-argument",this.value).append(h),this.updateLabelPosition(),v(this,n))}else this.label&&this.label.remove()},fadeOutElements:function(){var e={opacity:1},n={opacity:0},i={partitionDuration:.5};this.label&&this._fadeOutLabel(),this.grid&&this.grid.append(t._axisGridGroup).attr(e).animate(n,i),this.mark&&this.mark.append(t._axisLineGroup).attr(e).animate(n,i)},_fadeInLabel:function(){var e=t._renderer.g().attr({opacity:0}).append(t._axisElementsGroup).animate({opacity:1},{delay:.5,partitionDuration:.5});this.label.append(e)},_fadeOutLabel:function(){var e=t._renderer.g().attr({opacity:1}).animate({opacity:0},{partitionDuration:.5}).append(t._axisElementsGroup);this.label.append(e)},updateLabelPosition:function(t){this.label&&(t&&this._storedLabelsCoords?(this.label.attr({x:this._storedLabelsCoords.x,y:this._storedLabelsCoords.y}),this.label.animate({x:this.labelCoords.x,y:this.labelCoords.y})):(this.label.attr({x:this.labelCoords.x,y:this.labelCoords.y}),t&&this._fadeInLabel()))},updateMultilineTextAlignment:function(){this.label&&this.label.attr({textsAlignment:this.labelAlignment||t.getOptions().label.alignment})},drawGrid:function(e){a.visible&&s!==this.value&&(this.grid?(this.grid.append(t._axisGridGroup),t.sharp(this.grid,t.getSharpDirectionByCoords(this.coords)),this.updateGridPosition()):(this.grid=e(this,p),this.grid&&this.grid.append(t._axisGridGroup)))},updateGridPosition:function(e){this._updateLine(this.grid,t._getGridPoints(u.coords),this._storedCoords&&t._getGridPoints(this._storedCoords),e,!0)},removeLabel:function(){this.label.remove(),this.label=null}};return u}}},function(t,e,n){"use strict";var i=h(n(123)),o=n(94),r=h(n(26)),a=n(0),s=n(726),l=n(4),u=h(n(13)),c=n(2),d=h(n(280));function h(t){return t&&t.__esModule?t:{default:t}}var f=r.default.getNextDateUnit,p=r.default.correctDateWithUnitBeginning,m=Math,g=m.max,_=d.default.top,v=d.default.bottom,y=d.default.left,b=d.default.right,w=d.default.center,x={left:-1,top:-1,right:0,bottom:0,center:-.5};function C(t){return t.sort((function(t,e){return t.from-e.from}))}function S(t,e,n,i){var a=i,s=e&&r.default.getDatesDifferences(e,t);return e&&"year"!==n&&(!function(t,e){var n,i;if("week"===e&&(e="day"),"quarter"===e&&(e="month"),t[e])for(i=0;i=90?90-e%90:e%90)*(m.PI/180);return n>=m.atan(t.height/t.width)?t.height/m.abs(m.sin(n)):t.width}({width:i,height:this._getMaxLabelHeight(t,0)},e)),d.default.getTicksCountInRange(this._majorTicks,this._isHorizontal?"x":"y",i)},_getMaxLabelHeight:function(t,e){return k((function(t){return t.height}),t)+e},_validateOverlappingMode:function(t,e){return this._isHorizontal&&("rotate"===e||"stagger"===e)||!this._isHorizontal?d.default.validateOverlappingMode(t):t},_validateDisplayMode:function(t){return this._isHorizontal?t:"standard"},getMarkerTrackers:function(){return this._markerTrackers},_getSharpParam:function(t){return this._isHorizontal^t?"h":"v"},_createAxisElement:function(){return this._renderer.path([],"line")},_updateAxisElementPosition:function(){var t=this._axisPosition,e=this._getCanvasStartEnd();this._axisElement.attr({points:this._isHorizontal?[e.start,t,e.end,t]:[t,e.start,t,e.end]})},_getTranslatedCoord:function(t,e){return this._translator.translate(t,e)},_initAxisPositions:function(){this.customPositionIsAvailable()&&!(0,c.isDefined)(this._customBoundaryPosition)&&(this._customBoundaryPosition=this.getCustomBoundaryPosition()),!this.customPositionIsAvailable()||this.customPositionIsBoundary()?this._axisPosition=this.getPredefinedPosition(this.getResolvedBoundaryPosition()):this._axisPosition=this.getCustomPosition()},_getTickMarkPoints:function(t,e,n){var i,o=this._isHorizontal,r=this._options.tickOrientation,a=this._options.label.position;if((0,c.isDefined)(r))i=x[r]*e;else{var s=n.shift||0;(!o&&a===y||o&&a!==v)&&(s=-s),i=s+this.getTickStartPositionShift(e)}return[t.x+(o?0:i),t.y+(o?i:0),t.x+(o?0:i+e),t.y+(o?i+e:0)]},getTickStartPositionShift:function(t){var e=this._options.width,n=this.getResolvedBoundaryPosition();return t%2===1?(e%2!==0||n!==y&&n!==_)&&(e%2!==1||n!==b&&n!==v||this.hasCustomPosition())?-Math.floor(t/2):Math.floor(-t/2):-t/2+(e%2===0?0:n===v||n===b?-1:1)},_getTitleCoords:function(){var t=this._isHorizontal,e=this._axisPosition,n=this._axisPosition,i=this._options.title.alignment,o=this._getCanvasStartEnd(),r=t||this._options.position===y,a=r?o.start:o.end,s=r?o.end:o.start,l=i===y?a:i===b?s:o.start+(o.end-o.start)/2;return t?e=l:n=l,{x:e,y:n}},_drawTitleText:function(t,e){var n=this._options,i=n.title,o={opacity:i.opacity,align:i.alignment,class:i.cssClass};if(i.text&&t){e=e||this._getTitleCoords(),this._isHorizontal||(o.rotate=n.position===y?270:90);var r=this._renderer.text(i.text,e.x,e.y).css(u.default.patchFontOptions(i.font)).attr(o).append(t);return this._checkTitleOverflow(r),r}},_updateTitleCoords:function(){this._title&&this._title.element.attr(this._getTitleCoords())},_drawTitle:function(){var t=this._drawTitleText(this._axisTitleGroup);t&&(this._title={element:t})},_measureTitle:function(){this._title&&(this._title.bBox&&!this._title.originalSize&&(this._title.originalSize=this._title.bBox),this._title.bBox=this._title.element.getBBox())},_drawDateMarker:function(t,e,n){var i,o=this._options.marker,r=this._translator.getBusinessRange().invert,a=o.width+o.textLeftIndent;if(null!==e.x){e.withoutStick||(i=this._renderer.path([e.x,e.y,e.x,e.y+o.separatorHeight],"line").attr({"stroke-width":o.width,stroke:o.color,"stroke-opacity":o.opacity,sharp:"h"}).append(this._axisElementsGroup));var s=String(this.formatLabel(t,e.labelOptions,n));return{date:t,x:e.x,y:e.y,cropped:e.withoutStick,label:this._renderer.text(s,e.x,e.y).css(u.default.patchFontOptions(o.label.font)).append(this._axisElementsGroup),line:i,getEnd:function(){return this.x+(r?-1:1)*(a+this.labelBBox.width)},setTitle:function(){this.title=s},hideLabel:function(){this.label.dispose(),this.label=null,this.title=s},hide:function(){i&&(i.dispose(),i=null),this.label.dispose(),this.label=null,this.hidden=!0}}}},_drawDateMarkers:function(){var t,e=this,n=e._options,i=e._translator,o=e._getViewportRange(),a=o.minVisible,s=[];function l(t,n,r){return e._drawDateMarker(t,{x:i.translate(t),y:u,labelOptions:e._getLabelFormatOptions(n),withoutStick:r},o)}if(o.isEmpty()||!n.marker.visible||"datetime"!==n.argumentType||"discrete"===n.type||e._majorTicks.length<=1)return[];var u=e._axisPosition+n.marker.topIndent,c=r.default.getDateUnitInterval(this._tickInterval),d=function(t){var e=f(t);return"quarter"===e&&(e=f(e)),e}(c),h=function(t,e,n){var i,o=t;return t=p(t,n),e=p(e,n),(i=r.default.getSequenceByInterval(t,e,n)).length&&o>i[0]&&(i=i.slice(1)),i}(a,o.maxVisible,d);return(h.length>1||1===h.length&&aa.end)?t.hideLabel():n._checkMarkersPosition(r,t,e)?e=t:t.hide())})),this._dateMarkers.forEach((function(e){if(e.label){var n=e.labelBBox,a=e.y+i.textTopIndent-n.y;e.label.attr({translateX:r?e.x-o-n.x-n.width:e.x+o-n.x,translateY:a+t})}e.line&&e.line.attr({translateY:t})})),n._initializeMarkersTrackers(t),t+i.topIndent+i.separatorHeight):t},_checkMarkersPosition:function(t,e,n){return void 0===n||(t?e.xn.getEnd())},_initializeMarkersTrackers:function(t){var e=this._options.marker.separatorHeight,n=this._renderer,i=this._translator.getBusinessRange(),o=this._getCanvasStartEnd(),r=this._axisElementsGroup;this._markerTrackers=this._dateMarkers.filter((function(t){return!t.hidden})).map((function(a,s,l){var u=l[s+1]||{x:o.end,date:i.max},c=a.x,d=a.y+t,h=n.path([c,d,c,d+e,u.x,d+e,u.x,d,c,d],"area").attr({"stroke-width":1,stroke:"grey",fill:"grey",opacity:1e-4}).append(r);return h.data("range",{startValue:a.date,endValue:u.date}),a.title&&h.setTitle(a.title),h}))},_getLabelFormatOptions:function(t){var e=this._markerLabelOptions;return e||(this._markerLabelOptions=e=(0,a.extend)(!0,{},this._options.marker.label)),(0,c.isDefined)(this._options.marker.label.format)||(e.format=t),e},_adjustConstantLineLabels:function(t){var e=this,n=e._options.position,i=e.getCanvas(),o=i.left,r=i.width-i.right,a=i.top,s=i.height-i.bottom,l=a+(s-a)/2,u=o+(r-o)/2,c=0;return t.forEach((function(t){var i,d,h=e._isHorizontal,f=t.options,p=f.paddingTopBottom,m=f.paddingLeftRight,_=f.label,x=_.verticalAlignment,C=_.horizontalAlignment,S="inside"===_.position,k=t.label,I=t.labelBBox;if(null!==k&&!I.isEmpty){if(h)if(S)switch(i=C===y?t.coord-m-I.x-I.width:t.coord+m-I.x,x){case w:d=l-I.y-I.height/2;break;case v:d=s-p-I.y-I.height;break;default:d=a+p-I.y}else n===x&&(c=g(c,I.height+p)),i=t.coord-I.x-I.width/2,d=x===v?s+p-I.y:a-p-I.y-I.height;else if(S)switch(d=x===v?t.coord+p-I.y:t.coord-p-I.y-I.height,C){case w:i=u-I.x-I.width/2;break;case b:i=r-m-I.x-I.width;break;default:i=o+m-I.x}else n===C&&(c=g(c,I.width+m)),d=t.coord-I.y-I.height/2,i=C===b?r+m-I.x:o-m-I.x-I.width;k.attr({translateX:i,translateY:d})}})),c},_drawConstantLinesForEstimating:function(t){var e=this,n=this._renderer,i=n.g();return t.forEach((function(t){e._drawConstantLineLabelText(t.label.text,0,0,t.label,i).attr({align:"center"})})),i.append(n.root)},_estimateLabelHeight:function(t,e){var n=t.height,i=e.drawingType;if("stagger"!==this._validateDisplayMode(i)&&"stagger"!==this._validateOverlappingMode(e.overlappingBehavior,i)||(n=2*n+e.staggeringSpacing),"rotate"===this._validateDisplayMode(i)||"rotate"===this._validateOverlappingMode(e.overlappingBehavior,i)){var o=u.default.getCosAndSin(e.rotationAngle);n=n*o.cos+t.width*o.sin}return n&&(n+e.indentFromAxis||0)||0},estimateMargins:function(t){this.updateCanvas(t);var e=this._getViewportRange(),n=this._createTicksAndLabelFormat(e),i=n.ticks,o=n.tickInterval,r=this._options,a=this._outsideConstantLines.filter((function(t){return t.labelOptions.visible})).map((function(t){return t.options})),s=this._renderer.root,l=r.label.visible&&!e.isEmpty()&&i.length,u=l&&this.formatLabel(i[i.length-1],r.label,void 0,void 0,o,i),c=l&&this._renderer.text(u,0,0).css(this._textFontStyles).attr(this._textOptions).append(s),d=this._drawTitleText(s,{x:0,y:0}),h=this._drawConstantLinesForEstimating(a),f=c&&c.getBBox()||{x:0,y:0,width:0,height:0},p=d&&d.getBBox()||{x:0,y:0,width:0,height:0},m=h.getBBox(),_=p.height?p.height+r.title.margin:0,v=this._estimateLabelHeight(f,r.label),y=m.height?m.height+a.reduce((function(t,e){return g(t,e.paddingTopBottom)}),0):0,b=v+_,w={left:g(T(f),T(m)),right:g(E(f),E(m)),top:("top"===r.position?b:0)+I(a,"top",y),bottom:("top"!==r.position?b:0)+I(a,"bottom",y)};return c&&c.remove(),d&&d.remove(),h&&h.remove(),w},_checkAlignmentConstantLineLabels:function(t){var e=t.position,n=(t.verticalAlignment||"").toLowerCase(),i=(t.horizontalAlignment||"").toLowerCase();this._isHorizontal?"outside"===e?(n=n===v?v:_,i=w):(n=n===w?w:n===v?v:_,i=i===y?y:b):"outside"===e?(n=w,i=i===y?y:b):(n=n===v?v:_,i=i===b?b:i===w?w:y),t.verticalAlignment=n,t.horizontalAlignment=i},_getConstantLineLabelsCoords:function(t,e){var n=t,i=t;return this._isHorizontal?i=this._orthogonalPositions["top"===e.verticalAlignment?"start":"end"]:n=this._orthogonalPositions["right"===e.horizontalAlignment?"end":"start"],{x:n,y:i}},_getAdjustedStripLabelCoords:function(t){var e=t.options,n=e.paddingTopBottom,i=e.paddingLeftRight,o=e.label.horizontalAlignment,r=e.label.verticalAlignment,a=t.labelBBox,s=a.height,l=a.width,u=t.labelCoords,c=u.y-a.y,d=u.x-a.x;return r===_?c+=n:r===w?c-=s/2:r===v&&(c-=n+s),o===y?d+=i:o===w?d-=l/2:o===b&&(d-=i+l),{translateX:d,translateY:c}},_adjustTitle:function(t){if(t=t||0,this._title){var e=this._options,n=e.position,i=e.title.margin,o=this._title,r=o.bBox,a=r.x,s=r.y,l=r.width,u=r.height,c=this._axisPosition,d=c-i-t,h=c+i+t,f={};this._isHorizontal?f.translateY=n===_?d-(s+u):h-s:f.translateX=n===y?d-(a+l):h-a,o.element.attr(f)}},_checkTitleOverflow:function(t){if(this._title||t){var e=this._getScreenDelta(),n=t?{bBox:t.getBBox(),element:t}:this._title,i=this._options.title,o=n.bBox;if((this._isHorizontal?o.width:o.height)>e)n.element.setMaxSize(e,void 0,{wordWrap:i.wordWrap||"none",textOverflow:i.textOverflow||"ellipsis"}),this._wrapped=i.wordWrap&&"none"!==i.wordWrap;else{var r=n.originalSize&&e>(this._isHorizontal?n.originalSize.width:n.originalSize.height);!this._wrapped&&r&&n.element.restoreText()}}},coordsIn:function(t,e){var n=this.getCanvas(),i=this._options.isHorizontal,o=this._options.position,r=i?e:t;return!(i&&(tn.width-n.right)||!i&&(en.height-n.bottom))&&(i&&o===d.default.top||!i&&o===d.default.left?rn[i?"height":"width"]-n[o])},_boundaryTicksVisibility:{min:!0,max:!0},adjust:function(t){var e=this._seriesData,n={min:e.min,max:e.max};t||(n=this._series.filter((function(t){return t.isVisible()})).reduce((function(t,e){var n=e.getViewport();return t.min=(0,c.isDefined)(n.min)?t.minn.max?t.max:n.max:t.max,e.showZero&&(t=new i.default.Range(t)).correctValueZeroLevel(),t}),{})),(0,c.isDefined)(n.min)&&(0,c.isDefined)(n.max)&&(e.minVisible=n.min,e.maxVisible=n.max),e.breaks=this._initialBreaks=this._getScaleBreaks(this._options,{minVisible:e.minVisible,maxVisible:e.maxVisible},this._series,this.isArgumentAxis),this._translator.updateBusinessRange(this._getViewportRange())},hasWrap:function(){return this._wrapped},getAxisPosition:function(){return this._axisPosition},_getStick:function(){return!this._options.valueMarginsEnabled},_getStripLabelCoords:function(t,e,n){var i,o,r=this._orthogonalPositions,a=this._isHorizontal,s=n.horizontalAlignment,l=n.verticalAlignment;return a?(s===w?i=t+(e-t)/2:s===y?i=t:s===b&&(i=e),o=r[function(t){var e="start";return"center"===t&&(e="center"),"bottom"===t&&(e="end"),e}(l)]):(i=r[function(t){var e="start";return"center"===t&&(e="center"),"right"===t&&(e="end"),e}(s)],l===_?o=t:l===w?o=e+(t-e)/2:l===v&&(o=e)),{x:i,y:o}},_getTranslatedValue:function(t,e){var n=this._translator.translate(t,e,"semidiscrete"===this._options.type&&this._options.tickInterval),i=this._axisPosition,o=this._isHorizontal;return{x:o?n:i,y:o?i:n}},areCoordsOutsideAxis:function(t){var e=this._isHorizontal?t.x:t.y,n=this.getVisibleArea();return en[1]},_getSkippedCategory:function(t){var e;return this._options.type===d.default.discrete&&this._tickOffset&&0!==t.length&&(e=t[t.length-1]),e},_getScaleBreaks:function(t,e,n,i){var o=this,a=(t.breaks||[]).map((function(t){return{from:o.parser(t.startValue),to:o.parser(t.endValue)}}));return"discrete"!==t.type&&"datetime"===t.dataType&&t.workdaysOnly&&(a=a.concat((0,s.generateDateBreaks)(e.minVisible,e.maxVisible,t.workWeek,t.singleWorkdays,t.holidays))),!i&&"discrete"!==t.type&&"datetime"!==t.dataType&&t.autoBreaksEnabled&&0!==t.maxAutoBreakCount&&(a=a.concat(function(t,e,n){for(var i=t.logarithmBase,o=t.type,r=t.maxAutoBreakCount,a=[],s="logarithmic"===o?function(t,e){return u.default.getLog(e/t,i)}:function(t,e){return e-t},l=s(n.minVisible,n.maxVisible),d=e.reduce((function(t,e){var n=e.getPointsInViewPort();return t[0]=t[0].concat(n[0]),t[1]=t[1].concat(n[1]),t}),[[],[]]),h=.3*l,f=function(t,e,n){var i,o,r,a,s,l=null,u=[];for(i=1,o=t.length;i=0?(!l||s>l.length)&&(l={start:r,end:a,length:s}):(l&&s=h&&!(l<=f[_].length);_++)((l-=f[_].length)>p||l<-p)&&(a.push({from:f[_].start,to:f[_].end}),h=.3*l);return C(a),a}(t,n,e))),function(t,e,n){var i=e.minVisible,o=e.maxVisible,a=n?n.width:0;return t.reduce((function(t,e){var n,s=e.from,l=e.to,u=t[t.length-1];if(!(0,c.isDefined)(s)||!(0,c.isDefined)(l))return t;if(s>l&&(l=[s,s=l][0]),t.length&&su.to&&(u.to=l>o?o:l,u.gapSize&&(u.gapSize=void 0,u.cumulativeWidth+=a));else if((s>=i&&si)&&l-s=i?s:i,to:l=l<=o?l:o,cumulativeWidth:(null!==(d=null===u||void 0===u?void 0:u.cumulativeWidth)&&void 0!==d?d:0)+a},e.gapSize)n.gapSize=r.default.convertMillisecondsToDateUnits(l-s),n.cumulativeWidth=null!==(h=null===u||void 0===u?void 0:u.cumulativeWidth)&&void 0!==h?h:0;t.push(n)}return t}),[])}(C(a),e,t.breakStyle)},_drawBreak:function(t,e,n,i,o,r){var a=t-(this._translator.isInverted()?0:i+1),s={"stroke-width":1,stroke:o.borderColor,sharp:o.isWaved?void 0:o.isHorizontal?"h":"v"},l={stroke:o.color,"stroke-width":i},u=this._isHorizontal?M:function(t){return t},c=O(this._renderer,r,u,e,a,n,o.isWaved);c(i/2,l),c(0,s),c(i,s)},_createBreakClipRect:function(t,e){var n,i=this._canvas,o=e-t;return n=this._isHorizontal?this._renderer.clipRect(i.left,t,i.width,o):this._renderer.clipRect(t,i.top,o,i.height),this._breaksElements=this._breaksElements||[],this._breaksElements.push(n),n.id},_createBreaksGroup:function(t,e){var n=this._renderer.g().attr({class:this._axisCssPrefix+"breaks","clip-path":this._createBreakClipRect(t,e)}).append(this._scaleBreaksGroup);return this._breaksElements=this._breaksElements||[],this._breaksElements.push(n),n},_disposeBreaksGroup:function(){(this._breaksElements||[]).forEach((function(t){t.dispose()})),this._breaksElements=null},drawScaleBreaks:function(t){var e,n,i,o,r,a=this,s=a._options,l=s.breakStyle,u=s.position,c=a._translator.getBusinessRange().breaks||[];if(a._disposeBreaksGroup(),c&&c.length){var d={color:a._options.containerColor,borderColor:l.color,isHorizontal:a._isHorizontal,isWaved:"straight"!==l.line.toLowerCase()};t?(e=t.start,n=t.end):(e=a._orthogonalPositions.start-(!s.visible||a._axisShift||u!==y&&u!==_?0:3),n=a._orthogonalPositions.end+(!s.visible||u!==b&&u!==v?0:3));var h=a._createBreaksGroup(e,n);a._axisShift&&s.visible&&(o=a._axisPosition-a._axisShift-3,r=o+6,i=a._createBreaksGroup(o,r)),c.forEach((function(t){if(!t.gapSize){var u=a._getTranslatedCoord(t.to);a._drawBreak(u,e,n,l.width,d,h),a._axisShift&&s.visible&&a._drawBreak(u,o,r,l.width,d,i)}}))}},_getSpiderCategoryOption:l.noop,shift:function(t){var e=this._options,n=e.isHorizontal,i=this.getMultipleAxesSpacing(),o=this._axisConstantLineGroups;function r(e,o){var r={translateX:0,translateY:0},a=t[e]?t[e]+i:0;return r[n?"translateY":"translateX"]=(e===y||e===_?-1:1)*a,(o[e]||o).attr(r),a}this._axisShift=r(e.position,this._axisGroup),(n?[_,v]:[y,b]).forEach((function(t){r(t,o.above),r(t,o.under)}))},getCustomPosition:function(t){var e,n=this.getOrthogonalAxis(),i=null!==t&&void 0!==t?t:this.getResolvedPositionOption(),o=this.getOptions().offset,r=n.getTranslator(),a=n.getOptions().type,s=n.validateUnit(i);return"discrete"===a&&(!r._categories||r._categories.indexOf(s)<0)&&(s=void 0),e=this.positionIsBoundary(i)?this.getPredefinedPosition(i):(0,c.isDefined)(s)?r.to(s,-1):this.getPredefinedPosition(this.getOptions().position),isFinite(e)&&isFinite(o)&&(e+=o),e},getCustomBoundaryPosition:function(t){var e=this.getOrthogonalAxis(),n=null!==t&&void 0!==t?t:this.getResolvedPositionOption(),i=e.getTranslator(),o=i.getCanvasVisibleArea();if((0,c.isDefined)(e._orthogonalPositions)&&0!==i.canvasLength){var r=this.getCustomPosition(n);return(0,c.isDefined)(r)?r<=o.min?this._isHorizontal?_:y:r>=o.max?this._isHorizontal?v:b:r:this.getResolvedBoundaryPosition()}},getResolvedPositionOption:function(){var t,e=this.getOptions();return null!==(t=e.customPosition)&&void 0!==t?t:e.position},customPositionIsAvailable:function(){var t=this.getOptions();return(0,c.isDefined)(this.getOrthogonalAxis())&&((0,c.isDefined)(t.customPosition)||isFinite(t.offset))},hasCustomPosition:function(){return this.customPositionIsAvailable()&&!this.customPositionIsBoundary()},getResolvedBoundaryPosition:function(){return this.customPositionIsBoundary()?this._customBoundaryPosition:this.getOptions().position},customPositionEqualsToPredefined:function(){return this.customPositionIsBoundary()&&this._customBoundaryPosition===this.getOptions().position},customPositionIsBoundary:function(){return this.positionIsBoundary(this._customBoundaryPosition)},positionIsBoundary:function(t){return[_,y,v,b].indexOf(t)>=0},getPredefinedPosition:function(t){var e;return null===(e=this._orthogonalPositions)||void 0===e?void 0:e[t===_||t===y?"start":"end"]},resolveOverlappingForCustomPositioning:function(t){var e=this;if(e.hasCustomPosition()||e.customPositionIsBoundary()||t.some((function(t){return t.hasCustomPosition()}))){var n={axes:[],ticks:[]};t.filter((function(t){return t.pane===e.pane})).forEach((function(t){for(var i=0;i0&&h>0&&(h-d>1?f[s]+=d+a:d-h>1?f[s]-=h+a:f[s]+=r===l?d+a:-(h+a),t.attr(f))},_shiftThroughAxisOverlappedTick:function(t){var e,n=t.label;if(n){var i=n.getBBox(),o=null===(e=t.mark)||void 0===e?void 0:e.getBBox(),r=this.getAxisPosition(),a=this.getOptions().label,s=a.indentFromAxis,l=a.position,u=this._isHorizontal?_:y,c=this._isHorizontal?"translateY":"translateX",d=n.attr(c),h=(this._isHorizontal?i.y:i.x)+d,f=this._isHorizontal?i.height:i.width,p={};if(p[c]=d+(l===u?r-h+s:-(h-r+f+s)),n.attr(p),t.mark){var m=this._isHorizontal?o.y:o.x,g=this._isHorizontal?o.height:o.width;p[c]=2*(r-m)-g+1,t.mark.attr(p)}}},_detectElementsOverlapping:function(t,e){if(!t||!e)return!1;var n=t.getBBox(),i=n.x+t.attr("translateX"),o=n.y+t.attr("translateY"),r=e.getBBox(),a=r.x+e.attr("translateX"),s=r.y+e.attr("translateY");return(a>=i&&a<=i+n.width||i>=a&&i<=a+r.width)&&(s>=o&&s<=o+n.height||o>=s&&o<=s+r.height)}}}},function(t,e,n){"use strict";var i=n(5),o=n(283).BaseElement,r=Number,a=Math.abs,s=n(2).isString,l=Array.isArray,u=isFinite,c=i.each,d=o.inherit({_init:function(){this._root=this._renderer.g().attr({class:"dxg-range-container"}).linkOn(this._container,"range-container")},_dispose:function(){this._root.linkOff()},clean:function(){return this._root.linkRemove().clear(),this._options=this.enabled=null,this},_getRanges:function(){var t,e=this._options,n=this._translator,i=n.getDomain()[0],o=n.getDomain()[1],d=o-i,g=d>=0?p:m,_=d>=0?h:f,v=[],y=[{start:i,end:o}],b=a(d)/1e4,w=s(e.backgroundColor)?e.backgroundColor:"none",x=e.width||{},C=r(x>0?x:x.start),S=r(x>0?x:x.end),k=S-C;if(void 0!==e.ranges&&!l(e.ranges))return null;if(!(C>=0&&S>=0&&C+S>0))return null;t=(l(e.ranges)?e.ranges:[]).reduce((function(t,e,i){e=e||{};var o=n.adjust(e.startValue),r=n.adjust(e.endValue);return u(o)&&u(r)&&g(o,r,b)&&t.push({start:o,end:r,color:e.color,classIndex:i}),t}),[]);var I=this._themeManager.createPalette(e.palette,{type:"indicatingSet",extensionMode:e.paletteExtensionMode,keepLastColorInEnd:!0,count:t.length});return c(t,(function(t,e){var n=I.getNextColor();e.color=s(e.color)&&e.color||n||"none",e.className="dxg-range dxg-range-"+e.classIndex,delete e.classIndex})),c(t,(function(t,e){var n,i,o,r,a,s=[],l=[];for(n=0,i=v.length;n=t&&t>=i.end)return e=i.color,!1})),e}});function h(t,e,n,i){var o;return n>t&&i=e||i<=t?o=[{start:t,end:e}]:n<=t&&i>=e?o=[]:n>t?o=[{start:t,end:n}]:ie?o=[{start:t,end:n},{start:i,end:e}]:n<=e||i>=t?o=[{start:t,end:e}]:n>=t&&i<=e?o=[]:ne&&(o=[{start:i,end:e}]),o}function p(t,e,n){return e-t>=n}function m(t,e,n){return t-e>=n}t.exports=d},function(t,e,n){"use strict";var i,o=n(6),r=n(15),a=n(2).isFunction,s=n(118),l=n(0).extend,u=n(11).addNamespace,c=n(28),d=n(13).pointInCanvas,h="sparkline-tooltip",f=u([c.down,c.move],h),p=n(282),m=l,g=Math.floor,_=n(4).noop;function v(t){var e=t.data.widget;e._enableOutHandler(),e._showTooltip()}function y(t,e,n){var i=function(t,e){var n=t.lineSpacing,i=(void 0!==n&&null!==n?n:2)+t.size;return function(t){for(var n="",o=t.valueText,r=0;r"+o[r]+""+o[r+1]+"";return{html:""+n+"
"}}}(e,n);return a(t)?function(e){var n=t.call(e,e);return"html"in n||"text"in n||m(n,i.call(e,e)),n}:i}function b(t){var e=new p.Translator2D({},{},{shiftZeroValue:!t,isHorizontal:!!t});return{getTranslator:function(){return e},update:function(t,n,i){e.update(t,n,i)},getVisibleArea:function(){var t=e.getCanvasVisibleArea();return[t.min,t.max]},visualRange:_,calculateInterval:_,getMarginOptions:function(){return{}}}}var w=s.inherit({_getLayoutItems:_,_useLinks:!1,_themeDependentChanges:["OPTIONS"],_initCore:function(){this._tooltipTracker=this._renderer.root,this._tooltipTracker.attr({"pointer-events":"visible"}),this._createHtmlElements(),this._initTooltipEvents(),this._argumentAxis=b(!0),this._valueAxis=b()},_getDefaultSize:function(){return this._defaultSize},_disposeCore:function(){this._disposeWidgetElements(),this._disposeTooltipEvents(),this._ranges=null},_optionChangesOrder:["OPTIONS"],_change_OPTIONS:function(){this._prepareOptions(),this._change(["UPDATE"])},_customChangesOrder:["UPDATE"],_change_UPDATE:function(){this._update()},_update:function(){this._tooltipShown&&(this._tooltipShown=!1,this._tooltip.hide()),this._cleanWidgetElements(),this._updateWidgetElements(),this._drawWidgetElements()},_updateWidgetElements:function(){var t=this._getCorrectCanvas();this._updateRange(),this._argumentAxis.update(this._ranges.arg,t,this._getStick()),this._valueAxis.update(this._ranges.val,t)},_getStick:function(){},_applySize:function(t){this._allOptions.size={width:t[2]-t[0],height:t[3]-t[1]},this._change(["UPDATE"])},_setupResizeHandler:_,_prepareOptions:function(){return m(!0,{},this._themeManager.theme(),this.option())},_getTooltipCoords:function(){var t=this._canvas,e=this._renderer.getRootOffset();return{x:t.width/2+e.left,y:t.height/2+e.top}},_initTooltipEvents:function(){var t={widget:this};this._renderer.root.off("."+h).on(f,t,v)},_showTooltip:function(){this._tooltipShown||(this._tooltipShown=!0,this._getTooltip().isEnabled()&&this._tooltip.show(this._getTooltipData(),this._getTooltipCoords(),{}))},_hideTooltip:function(){this._tooltipShown&&(this._tooltipShown=!1,this._tooltip.hide())},_stopCurrentHandling:function(){this._hideTooltip()},_enableOutHandler:function(){var t=this;if(!t._outHandler){var e=function(e){var n=e.pageX,i=e.pageY,o=t._renderer.getRootOffset(),r=o.left,a=o.top,s=g(n-r),l=g(i-a);(function(t,e,n){var i=t.left,o=t.top,r=t.bottom,a=t.right,s=t.width,l=t.height;return d({left:i,top:o,right:s-a,bottom:l-r,width:s,height:l},e,n)})(t._canvas,s,l)||(t._hideTooltip(),t._disableOutHandler())};o.on(r.getDocument(),f,e),this._outHandler=e}},_disableOutHandler:function(){this._outHandler&&o.off(r.getDocument(),f,this._outHandler),this._outHandler=null},_disposeTooltipEvents:function(){this._tooltipTracker.off(),this._disableOutHandler(),this._renderer.root.off("."+h)},_getTooltip:function(){var t=this;return t._tooltip||(i.apply(this,arguments),t._setTooltipRendererOptions(t._tooltipRendererOptions),t._tooltipRendererOptions=null,t._setTooltipOptions()),t._tooltip}});t.exports=w,w.addPlugin(n(122).plugin),i=w.prototype._initTooltip,w.prototype._initTooltip=_;var x=w.prototype._disposeTooltip;w.prototype._disposeTooltip=function(){this._tooltip&&x.apply(this,arguments)},w.prototype._setTooltipRendererOptions=function(){var t=this._getRendererOptions();this._tooltip?this._tooltip.setRendererOptions(t):this._tooltipRendererOptions=t},w.prototype._setTooltipOptions=function(){var t=this._tooltip,e=t&&this._getOption("tooltip");t&&t.update(m({},e,{customizeTooltip:y(e.customizeTooltip,e.font,this.option("rtlEnabled")),enabled:e.enabled&&this._isTooltipEnabled()}))};var C=l(!0,{},n(119).plugin,{init:_,dispose:_,customize:null,members:{_getExportMenuOptions:null}});w.addPlugin(C)},function(t,e,n){"use strict";var i=n(0).extend,o=n(141),r=i,a=Math.round,s=Math.sqrt,l=Math.acos,u=180/Math.PI,c=Math.abs,d=n(13),h=d.normalizeAngle,f=d.getCosAndSin,p=n(2).isDefined,m=d.getVerticallyShiftedAngularCoords,g=n(140).radialLabelIndent;t.exports=r({},o,{_updateData:function(t,e){o._updateData.call(this,t),!e&&p(this._visible)||(this._visible=!0),this.minValue=this.initialMinValue=this.originalMinValue=p(t.minValue)?t.minValue:0},animate:function(t,e,n){this.graphic.animate({x:this.centerX,y:this.centerY,outerRadius:this.radiusOuter,innerRadius:this.radiusInner,startAngle:this.toAngle,endAngle:this.fromAngle},{delay:n,partitionDuration:e},t)},correctPosition:function(t){this.correctRadius(t),this.correctLabelRadius(t.radiusOuter+g),this.centerX=t.centerX,this.centerY=t.centerY},correctRadius:function(t){this.radiusInner=t.radiusInner,this.radiusOuter=t.radiusOuter},correctLabelRadius:function(t){this.radiusLabels=t},correctValue:function(t,e,n){this.value=(n||this.normalInitialValue)+t,this.minValue=t,this.percent=e,this._label.setDataField("percent",e)},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_getShiftLabelCoords:function(){var t=this._label.getBoundingRect(),e=this._getLabelCoords(this._label),n=this._getVisibleArea();return this._isLabelDrawingWithoutPoints?this._checkLabelPosition(e,t,n):this._getLabelExtraCoord(e,this._checkVerticalLabelPosition(e,t,n),t)},_getLabelPosition:function(t){return t.position},_getLabelCoords:function(t){var e,n,i=t.getBoundingRect(),o=t.getLayoutOptions(),r=f(this.middleAngle),s=this._getLabelPosition(o),l=this.radiusInner,u=this.radiusOuter,c=this.radiusLabels,d="columns"===s;return"inside"===s?(e=l+(u-l)/2+o.radialOffset,n=this.centerX+e*r.cos-i.width/2):(e=c+o.radialOffset,n=r.cos>.1||d&&r.cos>=0?this.centerX+e*r.cos:r.cos<-.1||d&&r.cos<0?this.centerX+e*r.cos-i.width:this.centerX+e*r.cos-i.width/2),{x:n,y:a(this.centerY-e*r.sin-i.height/2)}},_correctLabelCoord:function(t,e){var n=this._label,i=n.getBoundingRect().width,o=n.getLayoutOptions(),r=this._getVisibleArea(),a=r.maxX-i,s=r.minX,l=h(this.middleAngle),u=this.centerX,c=o.connectorOffset,d=t.x;return"columns"===o.position?(d=l<=90||l>=270?a:s,t.x=d):"inside"!==o.position&&e&&(l<=90||l>=270?d-cu&&(d=u-i-c),t.x=d),t},drawLabel:function(){this.translate(),this._isLabelDrawingWithoutPoints=!0,this._drawLabel(),this._isLabelDrawingWithoutPoints=!1},updateLabelCoord:function(t){var e=this._label.getBoundingRect(),n=this._correctLabelCoord(e,t);n=this._checkHorizontalLabelPosition(n,e,this._getVisibleArea()),this._label.shift(a(n.x),a(e.y))},_checkVerticalLabelPosition:function(t,e,n){var i=t.x,o=t.y;return t.y+e.height>n.maxY?o=n.maxY-e.height:t.yn.maxX?i=n.maxX-e.width:t.x0?r=i.maxX-this.centerX-this.radiusLabels:"inside"===o?r>i.maxX-i.minX&&(r=i.maxX-i.minX):t&&n.xthis.centerX?r=Math.floor((i.maxX-i.minX)/2):n.x+r>i.maxX?r=i.maxX-n.x:n.xthis.radiusOuter||0===r)&&((n=l(i/r)*u*(o>0?-1:1))<0&&(n+=360),a===d&&c(this.toAngle-this.fromAngle)>1e-4||(a>=d?n<=a&&n>=d:!(n>=a&&n<=d)))}})},function(t,e,n){"use strict";var i=n(5).each,o=n(0).extend,r=n(4).noop,a=n(289),s=n(141),l=o,u=n(2).isDefined,c=Math,d=c.abs,h=c.min,f=c.max,p=c.round;t.exports=l({},s,{deleteLabel:function(){this._topLabel.dispose(),this._topLabel=null,this._bottomLabel.dispose(),this._bottomLabel=null},hideMarker:function(t){var e=this.graphic,n=e&&e[t+"Marker"],i=this["_"+t+"Label"];n&&"hidden"!==n.attr("visibility")&&n.attr({visibility:"hidden"}),i.draw(!1)},setInvisibility:function(){this.hideMarker("top"),this.hideMarker("bottom")},clearVisibility:function(){var t=this.graphic,e=t&&t.topMarker,n=t&&t.bottomMarker;e&&e.attr("visibility")&&e.attr({visibility:null}),n&&n.attr("visibility")&&n.attr({visibility:null})},clearMarker:function(){var t=this.graphic,e=t&&t.topMarker,n=t&&t.bottomMarker,i=this._emptySettings;e&&e.attr(i),n&&n.attr(i)},_getLabelPosition:function(t){var e="inside"===this._options.label.position;return this._options.rotated?"top"===t^e?"right":"left":"top"===t^e?"top":"bottom"},_getLabelMinFormatObject:function(){return{index:0,argument:this.initialArgument,value:this.initialMinValue,seriesName:this.series.name,originalValue:this.originalMinValue,originalArgument:this.originalArgument,point:this}},_updateLabelData:function(){var t=this._getLabelFormatObject();t.index=1,this._topLabel.setData(t),this._bottomLabel.setData(this._getLabelMinFormatObject())},_updateLabelOptions:function(){var t=this._options.label;(!this._topLabel||!this._bottomLabel)&&this._createLabel(),this._topLabel.setOptions(t),this._bottomLabel.setOptions(t)},_createLabel:function(){var t={renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this};this._topLabel=new a.Label(t),this._bottomLabel=new a.Label(t)},_getGraphicBBox:function(t){var e=this._options,n=this._getImage(e.image),i="top"===t?this._checkImage(n.top):this._checkImage(n.bottom),o=this._getPositionFromLocation(t);return e.visible?i?this._getImageBBox(o.x,o.y):this._getSymbolBBox(o.x,o.y,e.styles.normal.r):{x:o.x,y:o.y,width:0,height:0}},_getPositionFromLocation:function(t){var e,n,i="top"===t;return this._options.rotated?(e=i?f(this.x,this.minX):h(this.x,this.minX),n=this.y):(e=this.x,n=i?h(this.y,this.minY):f(this.y,this.minY)),{x:e,y:n}},_checkOverlay:function(t,e,n){return ts&&(u+=l=s-c-e[o],c+=l),{coord1:u,coord2:c}},_checkLabelsOverlay:function(t){var e=this._topLabel.getBoundingRect(),n=this._bottomLabel.getBoundingRect(),i={};this._options.rotated?"top"===t?this._checkOverlay(e.x,n.x,n.width)&&(i=this._getOverlayCorrections(n,e),this._topLabel.shift(i.coord2,e.y),this._bottomLabel.shift(i.coord1,n.y)):this._checkOverlay(n.x,e.x,e.width)&&(i=this._getOverlayCorrections(e,n),this._topLabel.shift(i.coord1,e.y),this._bottomLabel.shift(i.coord2,n.y)):"top"===t?this._checkOverlay(n.y,e.y,e.height)&&(i=this._getOverlayCorrections(e,n),this._topLabel.shift(e.x,i.coord1),this._bottomLabel.shift(n.x,i.coord2)):this._checkOverlay(e.y,n.y,n.height)&&(i=this._getOverlayCorrections(n,e),this._topLabel.shift(e.x,i.coord2),this._bottomLabel.shift(n.x,i.coord1))},_drawLabel:function(){var t=[],e=this._options.rotated?this.x>=this.minX:this.yn,d=u[0]>o&&u[0]>i||u[1]o,a=u[0]=i,e&&(t=r,r=a,a=t)),this.visibleTopMarker=r,this.visibleBottomMarker=a,s},getTooltipParams:function(){var t,e,n=this._options.rotated,i=n?h(this.x,this.minX):h(this.y,this.minY),o=n?"width":"height",r=this._getVisibleArea(),a=n?r.minX:r.minY,s=n?r.maxX:r.maxY,l=f(a,i),u=h(s,i+this[o]);return n?(e=this.y,t=l+(u-l)/2):(t=this.x,e=l+(u-l)/2),{x:t,y:e,offset:0}},_translate:function(){var t=this._options.rotated;s._translate.call(this),this.height=t?0:d(this.minY-this.y),this.width=t?d(this.x-this.minX):0},hasCoords:function(){return s.hasCoords.call(this)&&!(null===this.minX||null===this.minY)},_updateData:function(t){s._updateData.call(this,t),this.minValue=this.initialMinValue=this.originalMinValue=t.minValue},_getImageSettings:function(t,e){return{href:e.url||e.toString(),width:e.width||20,height:e.height||20,translateX:t.translateX,translateY:t.translateY}},getCrosshairData:function(t,e){var n=this._options.rotated,i=this.minX,o=this.minY,r=this.vx,a=this.vy,s=this.value,l=this.minValue,u=this.argument,c={axis:this.series.axis,x:r,y:a,yValue:s,xValue:u};return n?(c.yValue=u,d(r-t)=d(o-e)&&(c.y=o,c.yValue=l),c},_updateOneMarker:function(t,e){this.graphic&&this.graphic[t]&&this.graphic[t].attr(e)},_updateMarker:function(t,e){this._drawMarker(void 0,void 0,!1,!1,e)},_getFormatObject:function(t){var e=this.initialMinValue,n=this.initialValue,i=this.initialArgument,o=t.formatValue(e),r=t.formatValue(n);return{argument:i,argumentText:t.formatValue(i,"argument"),valueText:o+" - "+r,rangeValue1Text:o,rangeValue2Text:r,rangeValue1:e,rangeValue2:n,seriesName:this.series.name,point:this,originalMinValue:this.originalMinValue,originalValue:this.originalValue,originalArgument:this.originalArgument}},getLabel:function(){return[this._topLabel,this._bottomLabel]},getLabels:function(){return[this._topLabel,this._bottomLabel]},getBoundingRect:r,coordsIn:function(t,e){var n=this._storeTrackerR(),i=t>=this.x-n&&t<=this.x+n,o=e>=this.y-n&&e<=this.y+n;return this._options.rotated?o&&(i||t>=this.minX-n&&t<=this.minX+n):i&&(o||e>=this.minY-n&&e<=this.minY+n)},getMaxValue:function(){return"discrete"!==this.series.valueAxisType&&this.minValue>this.value?this.minValue:this.value},getMinValue:function(){return"discrete"!==this.series.valueAxisType?this.minValue10?10:n,this.width=n+n%2,this.xCorrection=t.offset},_getMarkerGroup:function(t){return this._isReduction&&this._isPositive?t.reductionPositiveMarkersGroup:this._isReduction?t.reductionMarkersGroup:this._isPositive?t.defaultPositiveMarkersGroup:t.defaultMarkersGroup},_drawMarker:function(t,e){this._drawMarkerInGroup(this._getMarkerGroup(e),this._getStyle(),t)},_getSettingsForTracker:function(){var t,e,n,i,o=this.highY,r=this.lowY,a=this._options.rotated;return o===r&&(o=a?o+2:o-2,r=a?r-2:r+2),a?(t=l(r,o),e=this.x-this.width/2,n=s(r-o),i=this.width):(t=this.x-this.width/2,e=l(r,o),n=this.width,i=s(r-o)),{x:t,y:e,width:n,height:i}},_getGraphicBBox:function(t){var e=this._options.rotated,n=this.x,i=this.width,o=this.lowY,r=this.highY;if(t){var a=this.series.getValueAxis().getVisibleArea();r=this._truncateCoord(r,a),o=this._truncateCoord(o,a)}var s={x:e?o:n-c(i/2),y:e?n-c(i/2):r,width:e?r-o:i,height:e?i:o-r};if(t){var l="top"===t;this._options.rotated?(s.x=l?s.x+s.width:s.x,s.width=0):(s.y=l?s.y:s.y+s.height,s.height=0)}return s},getTooltipParams:function(t){if(this.graphic){var e=l(this.lowY,this.highY),n=u(this.lowY,this.highY),i=this._getVisibleArea(),o=this._options.rotated,r=o?i.minX:i.minY,a=o?i.maxX:i.maxY,s=u(r,e),c=l(a,n),d=this.getCenterCoord();return"edge"===t&&(d[o?"x":"y"]=o?c:s),d.offset=0,d}},getCenterCoord:function(){if(this.graphic){var t,e,n=l(this.lowY,this.highY),i=u(this.lowY,this.highY),o=this._getVisibleArea(),r=this._options.rotated,a=r?o.minX:o.minY,s=r?o.maxX:o.maxY,c=u(a,n),d=c+(l(s,i)-c)/2;return r?(e=this.x,t=d):(t=this.x,e=d),{x:t,y:e}}},hasValue:function(){return null!==this.highValue&&null!==this.lowValue},hasCoords:function(){return null!==this.x&&null!==this.lowY&&null!==this.highY},_translate:function(){var t=this._options.rotated,e=this._getValTranslator(),n=this._getArgTranslator().translate(this.argument);this.vx=this.vy=this.x=null===n?n:n+(this.xCorrection||0),this.openY=null!==this.openValue?e.translate(this.openValue):null,this.highY=e.translate(this.highValue),this.lowY=e.translate(this.lowValue),this.closeY=null!==this.closeValue?e.translate(this.closeValue):null;var i=l(this.lowY,this.highY)+s(this.lowY-this.highY)/2;this._calculateVisibility(t?i:this.x,t?this.x:i)},getCrosshairData:function(t,e){var n,i,o=this._options.rotated,r=o?t:e,a=this.argument,l="low";return s(this.lowY-r)=s(this.openY-r)&&(n=this.openY,l="open"),s(n-r)>=s(this.highY-r)&&(n=this.highY,l="high"),(i=o?{y:this.vy,x:n,xValue:this[l+"Value"],yValue:a}:{x:this.vx,y:n,xValue:a,yValue:this[l+"Value"]}).axis=this.series.axis,i},_updateData:function(t){var e=this._label,n=this._options.reduction.color;this.value=this.initialValue=t.reductionValue,this.originalValue=t.value,this.lowValue=this.originalLowValue=t.lowValue,this.highValue=this.originalHighValue=t.highValue,this.openValue=this.originalOpenValue=t.openValue,this.closeValue=this.originalCloseValue=t.closeValue,this._isPositive=t.openValuet&&(t=n.width),t}),0),i=n;return n&&(t.outerLabelsCount++,t.outerLabelsCount>1&&(n+=o.default.pieLabelSpacing),i+=o.default.pieLabelSpacing),t.sizes.push(n),t.rSizes.push(i),t.common+=n,t}),{sizes:[],rSizes:[],common:0,outerLabelsCount:0})}function g(t,e,n,i,o,r){var a,l,u=0,c=t.sizes,d=t.rSizes;for(l=0;l.8?.8:e}function v(){}function y(t,e,n,i){return(t-e-d-n.left)/i.outerLabelsCount}function b(t,e,n,i,o,r){var a,s=m(n),l=function(t,e,n){return t-e.left-(n.outerLabelsCount>0?n.common+d:0)}(o,e,s);return la&&(i=y(e.centerX,e.radiusOuter,n,o)),g(o,r,t,n,i,e.centerX)},needMoreSpaceForPanesCanvas:function(t,e,n){var o=this._options,r=o.width,a=o.height,s=o.piePercentage,l=(0,i.isNumeric)(s),d=0,h=0;return t.forEach((function(t){var i=t.canvas,o=l?u(i.width,i.height)*s:void 0,f=n?n(t):{width:!1,height:!1},p=f.width?0:(l?o:r)-(i.width-i.left-i.right),m=f.height?0:(l?o:a)-(i.height-i.top-i.bottom);e?(d+=p>0?p:0,h=c(m>0?m:0,h)):(d=c(p>0?p:0,d),h+=m>0?m:0)})),(d>0||h>0)&&{width:d,height:h}},layoutInsideLegend:function(t,e){var n=t.getLayoutOptions();if(n){var i=n.position,o=n.cutSide,r={horizontal:i.horizontal,vertical:i.vertical};e[n.cutLayoutSide]+="horizontal"===n.cutSide?n.width:n.height,r[o]={left:"right",right:"left",top:"bottom",bottom:"top",center:"center"}[r[o]],t.position({of:w(e),my:r,at:i})}}},e.LayoutManager=v},function(t,e,n){"use strict";var i=n(0),o=n(16),r=n(5),a=m(n(123)),s=m(n(226)),l=m(n(410)),u=n(286),c=m(n(411)),d=n(230),h=n(2),f=n(4),p=n(13);function m(t){return t&&t.__esModule?t:{default:t}}var g=Array.isArray;function _(t){return g(t)?0===t.length?[{}]:t:[t]}function v(t,e,n,i){var o,r,a,s,l;if(n){r=t.value,o={skipEventRising:!0};var u=t.fullName.split("."),c=u[u.length-1];"endValue"!==c&&"startValue"!==c||(o={allowPartialUpdate:!0},a={},s=c,l=t.value,s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,r=a)}else r=((0,h.isDefined)(i)?t.value[i]:t.value).visualRange;e.visualRange(r,o)}var y=u.BaseChart.inherit({_setDeprecatedOptions:function(){this.callBase.apply(this,arguments),(0,i.extend)(this._deprecatedOptions,{barWidth:{since:"18.1",message:"Use the 'commonSeriesSettings.barPadding' or 'series.barPadding' option instead"},equalBarWidth:{since:"18.1",message:"Use the 'commonSeriesSettings.ignoreEmptyPoints' or 'series.ignoreEmptyPoints' option instead"}})},_fontFields:["commonAxisSettings.label.font","commonAxisSettings.title.font"],_partialOptionChangesMap:{visualRange:"VISUAL_RANGE",_customVisualRange:"VISUAL_RANGE",strips:"REFRESH_AXES",constantLines:"REFRESH_AXES"},_partialOptionChangesPath:{argumentAxis:["strips","constantLines","visualRange","_customVisualRange"],valueAxis:["strips","constantLines","visualRange","_customVisualRange"]},_initCore:function(){this._panesClipRects={},this.callBase()},_disposeCore:function(){var t=this._disposeObjectsInArray,e=this._panesClipRects;this.callBase(),t.call(e,"fixed"),t.call(e,"base"),t.call(e,"wide"),this._panesClipRects=null},_dispose:function(){var t=this._disposeObjectsInArray;this.callBase(),this.panes=null,this._legend&&(this._legend.dispose(),this._legend=null),t.call(this,"panesBackground"),t.call(this,"seriesFamilies"),this._disposeAxes()},_createPanes:function(){this._cleanPanesClipRects("fixed"),this._cleanPanesClipRects("base"),this._cleanPanesClipRects("wide")},_cleanPanesClipRects:function(t){(this._panesClipRects[t]||[]).forEach((function(t){return t&&t.dispose()})),this._panesClipRects[t]=[]},_getElementsClipRectID:function(t){var e=this._panesClipRects.fixed[this._getPaneIndex(t)];return e&&e.id},_getPaneIndex:function(t){var e,n=t||"default";return(0,r.each)(this.panes,(function(t,i){if(i.name===n)return e=t,!1})),e},_updateSize:function(){this.callBase(),(0,p.setCanvasValues)(this._canvas)},_reinitAxes:function(){this.panes=this._createPanes(),this._populateAxes(),this._axesReinitialized=!0},_getCrosshairMargins:function(){var t=this._getCrosshairOptions()||{},e=t.enabled,n=c.default.getMargins();return{x:e&&t.horizontalLine.visible?n.x:0,y:e&&t.verticalLine.visible?n.y:0}},_populateAxes:function(){var t,e,n=this,i=n.panes,a=n._isRotated(),s=_(n.option("argumentAxis")||{})[0],l=n.option("valueAxis"),u=_(l||{}),c=[],d=[],h=0,f=n._getCrosshairMargins();e=a?"right"===s.position?i[i.length-1].name:i[0].name:"top"===s.position?i[0].name:i[i.length-1].name,t=(0,p.map)(i,(function(t){var i=t.name!==e;return n._populateAxesOptions("argumentAxis",s,{pane:t.name,name:null,optionPath:"argumentAxis",crosshairMargin:a?f.x:f.y},a,i)})),(0,r.each)(u,(function(t,e){var i,s=[],u=e.name;u&&-1!==(0,o.inArray)(u,d)?n._incidentOccurred("E2102"):(u&&d.push(u),e.pane&&s.push(e.pane),(null===(i=e.panes)||void 0===i?void 0:i.length)&&(s=s.concat(e.panes.slice(0))),(s=(0,p.unique)(s)).length||s.push(void 0),(0,r.each)(s,(function(i,o){var r=g(l)?"valueAxis[".concat(t,"]"):"valueAxis";c.push(n._populateAxesOptions("valueAxis",e,{name:u||"defaultAxisName"+h++,pane:o,priority:t,optionPath:r,crosshairMargin:a?f.y:f.x},a))})))})),n._redesignAxes(t,!0,e),n._redesignAxes(c,!1)},_redesignAxes:function(t,e,n){var i=this,o=[],a=e?i._argumentAxes:i._valueAxes;(0,r.each)(t,(function(t,n){var s=a&&a.filter((function(t){return t.name===n.name&&(!(0,h.isDefined)(n.pane)&&i.panes.some((function(e){return e.name===t.pane}))||t.pane===n.pane)}));s&&s.length>0?(0,r.each)(s,(function(t,r){var a=function(t,e,n){if(n)return{argumentAxisType:t.argumentAxisType,argumentType:t.argumentType};var i=t.groups.filter((function(t){return t.valueAxis===e}))[0];return{valueAxisType:i.valueAxisType,valueType:i.valueType}}(i._groupsData,r,e);r.updateOptions(n),e?r.setTypes(a.argumentAxisType,a.argumentType,"argumentType"):r.setTypes(a.valueAxisType,a.valueType,"valueType"),r.validate(),o.push({axis:r})})):o.push({options:n})})),a?(0,r.reverseEach)(a,(function(t,n){o.some((function(t){return t.axis&&t.axis===n}))||i._disposeAxis(t,e)})):a=e?i._argumentAxes=[]:i._valueAxes=[],(0,r.each)(o,(function(t,o){var r=o.axis;o.axis&&e?o.axis.isVirtual=o.axis.pane!==n:o.options&&(r=i._createAxis(e,o.options,e?o.options.pane!==n:void 0),a.push(r)),r.applyVisualRangeSetter(i._getVisualRangeSetter())}))},_disposeAxis:function(t,e){var n=e?this._argumentAxes:this._valueAxes,i=n[t];i&&(i.dispose(),n.splice(t,1))},_disposeAxes:function(){var t=this._disposeObjectsInArray;t.call(this,"_argumentAxes"),t.call(this,"_valueAxes")},_appendAdditionalSeriesGroups:function(){this._crosshairCursorGroup.linkAppend(),this._scrollBar&&this._scrollBarGroup.linkAppend()},_getLegendTargets:function(){var t=this;return(this.series||[]).map((function(e){var n=t._getLegendOptions(e);return n.legendData.series=e,e.getOptions().showInLegend||(n.legendData.visible=!1),n}))},_legendItemTextField:"name",_seriesPopulatedHandlerCore:function(){this._processSeriesFamilies(),this._processValueAxisFormat()},_renderTrackers:function(){var t;for(t=0;t0?n._setCustomVisualRange(i,o,e):("object"===(0,h.type)(e)||g(e))&&i.indexOf("Axis")>0&&JSON.stringify(e).indexOf("visualRange")>0&&((0,h.isDefined)(e.visualRange)?n._setCustomVisualRange(i,o,e.visualRange):g(e)&&e.forEach((function(t,e){return(0,h.isDefined)(t.visualRange)&&n._setCustomVisualRange(i,e,t.visualRange)})))},_setCustomVisualRange:function(t,e,n){var i=this._options.silent(t);i&&((0,h.isDefined)(e)?i[e]._customVisualRange=n:i._customVisualRange=n,this._axesReinitialized=!0)},_raiseZoomEndHandlers:function(){this._valueAxes.forEach((function(t){return t.handleZoomEnd()}))},_setOptionsByReference:function(){this.callBase(),(0,i.extend)(this._optionsByReference,{"valueAxis.visualRange":!0})},_notifyOptionChanged:function(t,e,n){this.callBase.apply(this,arguments),this._optionChangedLocker||this._parseVisualRangeOption(t,e)},_notifyVisualRange:function(){var t=this;t._valueAxes.forEach((function(e){if(e.getOptions().optionPath){var n="".concat(e.getOptions().optionPath,".visualRange"),i=(0,p.convertVisualRangeObject)(e.visualRange(),!g(t.option(n)));e.skipEventRising&&(0,p.rangesAreEqual)(i,t.option(n))?e.skipEventRising=null:t.option(n,i)}}))},_notify:function(){this.callBase(),this._axesReinitialized=!1,!0!==this.option("disableTwoWayBinding")&&this._notifyVisualRange()},_getAxesForScaling:function(){return this._valueAxes},_getAxesByOptionPath:function(t,e,n){var i,o=this._getAxesForScaling(),r=[];e?(t.fullName&&(i=t.fullName.slice(0,t.fullName.indexOf("."))),r=o.filter((function(t){return t.getOptions().optionPath===i}))):"object"===(0,h.type)(t.value)?r=o.filter((function(e){return e.getOptions().optionPath===t.name})):g(t.value)&&t.value.forEach((function(e,i){var a=o.filter((function(e){return e.getOptions().optionPath==="".concat(t.name,"[").concat(i,"]")}))[0];(0,h.isDefined)(e[n])&&(0,h.isDefined)(a)&&(r[i]=a)}));return r},_optionChanged:function(t){if(!this._optionChangedLocker){var e,n=t.fullName.indexOf("visualRange")>0||!(this.getPartialChangeOptionsName(t).indexOf("visualRange")>-1)&&void 0;(0,h.isDefined)(n)&&(e=this._getAxesByOptionPath(t,n,"visualRange"))&&(e.length>1||g(t.value)?e.forEach((function(e,i){return v(t,e,n,i)})):1===e.length&&v(t,e[0],n))}this.callBase(t)},_change_VISUAL_RANGE:function(){if(this._recreateSizeDependentObjects(!1),!this._changes.has("FULL_RENDER")){var t=this.option("resizePanesOnZoom");this._doRender({force:!0,drawTitle:!1,drawLegend:!1,adjustAxes:null!==t&&void 0!==t?t:this.option("adjustAxesOnZoom")||!1,animate:!1}),this._raiseZoomEndHandlers()}},resetVisualRange:function(){var t=this;t._valueAxes.forEach((function(e){e.resetVisualRange(!1),t._applyCustomVisualRangeOption(e)})),t._requestChange(["VISUAL_RANGE"])},_legendDataField:"series",_adjustSeriesLabels:f.noop,_correctValueAxes:f.noop});e.AdvancedChart=y},function(t,e,n){"use strict";var i=n(2),o=n(0),r=n(5),a=n(37),s=n(4),l=n(13),u=Math.round,c=Math.abs,d=Math.pow,h=Math.sqrt,f=Math.min;function p(t,e,n,o,a,s,l){t.forEach((function(t){var u,c=l(e.indexOf(o),e.length),d=t.getPointsByArg(n,!0),h=function(t){return t<0||t>1?void 0:t}(t.getOptions().barPadding),f=t.getOptions().barWidth,p=_(c,a),m=a.width;-1!==c&&(((0,i.isDefined)(h)||(0,i.isDefined)(f))&&(m=(u=g(s,e.length,1-h,f)).width,p=_(c,u)),function(t,e,n){(0,r.each)(t,(function(t,i){i.correctCoordinates({width:e,offset:n})}))}(d,m,p))}))}function m(t,e,n){var i,o=[],r=[],a={},s=e.barWidth,l=e.barGroupWidth,u=t[0]&&t[0].getArgumentAxis().getTranslator().getInterval(),c=l?u>l?l:u:u*(1-((i=e.barGroupPadding)<0||i>1?.3:i));t.forEach((function(t,e){var n,i=t.getStackName()||t.getBarOverlapGroup()||e.toString();for(n in t.pointsByArgument)-1===r.indexOf(n.valueOf())&&r.push(n.valueOf());-1===o.indexOf(i)&&(o.push(i),a[i]=[]),a[i].push(t)})),r.forEach((function(t){var i=o.reduce((function(n,i){return function(t,e,n){return t.some((function(t){return n&&!t.getOptions().ignoreEmptyPoints||t.getPointsByArg(e,!0).some((function(t){return t.hasValue()}))}))}(a[i],t,e.equalBarWidth)&&n.push(i),n}),[]),r=g(c,i.length,s);o.forEach((function(e){p(a[e],i,t,e,r,c,n)}))}))}function g(t,e,n,o){var r,a;return o?(a=f(o,u(t/e)),r=e>1?u((t-a*e)/(e-1)):0):(0,i.isDefined)(n)?(a=u(t*n/e),r=u(e>1?(t-t*n)/(e-1):0)):(r=u(t/e*.2),a=u((t-r*(e-1))/e)),{width:a>1?a:1,spacing:r,middleIndex:e/2}}function _(t,e){return(t-e.middleIndex+.5)*e.width-(e.middleIndex-t-.5)*e.spacing}function v(t){return t.series.filter((function(t){return t.isVisible()}))}function y(t,e,n){return((t.positive[e]||{})[n]||0)+(-(t.negative[e]||{})[n]||0)}function b(t){return t?function(t,e){return e-t-1}:function(t){return t}}function w(t){return t[0]&&t[0].getArgumentAxis().getTranslator().isInverted()}function x(){var t=v(this);m(t,this._options,b(w(t)))}function C(){var t=this._options.negativesAsZeroes,e=v(this),n={positive:{},negative:{}},i={left:{},right:{}},r={},s={};e.forEach((function(e){var l=e.getStackName()||e.getBarOverlapGroup(),u=!1,d=function(t){for(var e,n=t.getPoints(),i=0;i0)break}return(0,a.sign)(e)}(e)<0?s:r;e._prevSeries=d[l],d[l]=e,e.holes=(0,o.extend)(!0,{},i),e.getPoints().forEach((function(o,r,a){var s=o.initialValue&&o.initialValue.valueOf(),c=o.argument.valueOf(),d=s>=0?n.positive:n.negative,h="bar"!==e.type;t&&s<0&&(d=n.positive,s=0,o.resetValue()),d[l]=d[l]||{};var f=d[l];if(f[c]?(h&&o.correctValue(f[c]),f[c]+=s):(f[c]=s,h&&o.resetCorrection()),o.hasValue())u&&(u=!1,i.left[c]=(i.left[c]||0)+(o.value.valueOf()-(isFinite(o.minValue)?o.minValue.valueOf():0)),o._skipSetLeftHole=!0);else{var p=a[r-1];!u&&p&&p.hasValue()&&(c=p.argument.valueOf(),p._skipSetRightHole=!0,i.right[c]=(i.right[c]||0)+(p.value.valueOf()-(isFinite(p.minValue)?p.minValue.valueOf():0))),u=!0}}))})),e.forEach((function(t){var e=t.holes;t.getPoints().forEach((function(t){var n=t.argument.valueOf();t.resetHoles(),!t._skipSetLeftHole&&t.setHole(e.left[n]||i.left[n]&&0,"left"),!t._skipSetRightHole&&t.setHole(e.right[n]||i.right[n]&&0,"right"),t._skipSetLeftHole=null,t._skipSetRightHole=null}))})),this._stackKeepers=n,e.forEach((function(t){t.getPoints().forEach((function(e){var o=e.argument.valueOf(),r=t.getStackName()||t.getBarOverlapGroup(),a=y(n,r,o),s=function(t,e,n){return((t.positive[e]||{})[n]||0)+((t.negative[e]||{})[n]||0)}(n,r,o);e.setPercentValue(a,s,i.left[o],i.right[o])}))}))}function S(){var t=this,e=v(t),n=t._stackKeepers,o={positive:{},negative:{}};(0,r.each)(e,(function(e,i){var a=i.getOptions().minBarSize,s=i.getValueAxis().getTranslator(),l=a&&s.getMinBarSize(a),u=i.getStackName();(0,r.each)(i.getPoints(),(function(e,i){if(i.hasValue()){var r=i.initialValue&&i.initialValue.valueOf(),a=i.argument.valueOf();t.fullStacked&&(r=r/y(n,u,a)||0);var c=s.checkMinBarSize(r,l,i.value),d=function(t){return t>=0?"positive":"negative"}(c),h=o[d][u]=o[d][u]||{};h[a]?(i.minValue=h[a],h[a]+=c):h[a]=c,i.value=h[a]}}))})),t.fullStacked&&function(t,e){(0,r.each)(t,(function(t,n){var o=n.getStackName?n.getStackName():"default";(0,r.each)(n.getPoints(),(function(t,n){var r=y(e,o,n.argument.valueOf());n.value=n.value/r,(0,i.isNumeric)(n.minValue)&&(n.minValue=n.minValue/r)}))}))}(e,o)}function k(){(0,r.each)(this.series,(function(t,e){var n=e.getOptions().minBarSize,i=e.getValueAxis().getTranslator(),o=n&&i.getMinBarSize(n);o&&(0,r.each)(e.getPoints(),(function(t,e){e.hasValue()&&(e.value=i.checkMinBarSize(e.initialValue,o))}))}))}function I(){var t=v(this);m(t,{barWidth:null,equalBarWidth:!0,barGroupPadding:.3},b(w(t)))}function T(){var t=v(this);if(t.length){var e,n,i=this._options,o=t[0].getArgumentAxis().getVisibleArea(),a=t[0].getValueAxis().getVisibleArea(),s=f(o[1]-o[0],a[1]-a[0]),l=d(i.minBubbleSize,2),p=d(s*i.maxBubbleSize,2),m=(s*i.maxBubbleSize+i.minBubbleSize)/2,g=1/0,_=-1/0;(0,r.each)(t,(function(t,e){(0,r.each)(e.getPoints(),(function(t,e){_=_>e.size?_:e.size,g=gi[o[1]]&&(a[o[0]]-=s[o[0]]+s[o[1]]+l*o[5]-i[o[1]]),o[4]-s[o[3]]/2<0?a[o[2]]-=o[4]-s[o[3]]/2:o[4]+s[o[3]]/2>i[o[3]]&&(a[o[2]]-=o[4]+s[o[3]]/2-i[o[3]]),a}}function h(t,e,n,i){this._renderer=t,this._crosshairGroup=i,this._options={},this.update(e,n)}e.getMargins=function(){return{x:8,y:4}},h.prototype={constructor:h,update:function(t,e){var n=e.canvas;this._canvas={top:n.top,bottom:n.height-n.bottom,left:n.left,right:n.width-n.right,width:n.width,height:n.height},this._axes=e.axes,this._panes=e.panes,this._prepareOptions(t,"horizontal"),this._prepareOptions(t,"vertical")},dispose:function(){this._renderer=this._crosshairGroup=this._options=this._axes=this._canvas=this._horizontalGroup=this._verticalGroup=this._horizontal=this._vertical=this._circle=this._panes=null},_prepareOptions:function(t,e){var n=t[e+"Line"];this._options[e]={visible:n.visible,line:{stroke:n.color||t.color,"stroke-width":n.width||t.width,dashStyle:n.dashStyle||t.dashStyle,opacity:n.opacity||t.opacity,"stroke-linecap":"butt"},label:(0,o.extend)(!0,{},t.label,n.label)}},_createLines:function(t,e,n){for(var i=[],o=this._canvas,r=[o.left,o.top,o.left,o.top],a=0;a<2;a++)i.push(this._renderer.path(r,"line").attr(t).sharp(e).append(n));return i},render:function(){var t=this._renderer,e=this._options,n=e.vertical,i=e.horizontal,o=i.visible?i.line:n.line,r={stroke:o.stroke,"stroke-width":o["stroke-width"],dashStyle:o.dashStyle,opacity:o.opacity},a=this._canvas;this._horizontal={},this._vertical={},this._circle=t.circle(a.left,a.top,0).attr(r).append(this._crosshairGroup),this._horizontalGroup=t.g().append(this._crosshairGroup),this._verticalGroup=t.g().append(this._crosshairGroup),n.visible&&(this._vertical.lines=this._createLines(n.line,"h",this._verticalGroup),this._vertical.labels=this._createLabels(this._axes[0],n,!1,this._verticalGroup)),i.visible&&(this._horizontal.lines=this._createLines(i.line,"v",this._horizontalGroup),this._horizontal.labels=this._createLabels(this._axes[1],i,!0,this._horizontalGroup)),this.hide()},_createLabels:function(t,e,n,o){var r,a,s,l,u,c=this._canvas,d=this._renderer,h=[],f=e.label;return f.visible&&t.forEach((function(t){var p=t.getOptions().position;if(!t.getTranslator().getBusinessRange().isEmpty()){u=t.getLabelsPosition(),n?(a=c.top,r=u):(r=c.left,a=u);var m="top"===p||"bottom"===p?"center":"right"===p?"left":"right";l=d.rect(0,0,0,0).attr({fill:f.backgroundColor||e.line.stroke}).append(o),s=d.text("0",0,0).css((0,i.patchFontOptions)(e.label.font)).attr({align:m,class:f.cssClass}).append(o),h.push({text:s,background:l,axis:t,options:f,pos:{coord:u,side:p},startXY:{x:r,y:a}})}})),h},_updateText:function(t,e,n,i,o){var r=this;n.forEach((function(n){var a=n.axis,s=n.startXY,l=n.text,u=n.background,d="";a.name&&a.name!==e||(d=a.getFormattedValue(t,n.options,i)),d?(l.attr({text:d,x:s.x,y:s.y}),l.attr(o(l.getBBox(),n.pos.side,s)),r._updateLinesCanvas(n),u.attr(c(l.getBBox()))):(l.attr({text:""}),u.attr({x:0,y:0,width:0,height:0}))}))},hide:function(){this._crosshairGroup.attr({visibility:"hidden"})},_updateLinesCanvas:function(t){var e=t.pos.side,n=t.pos.coord,i=this._linesCanvas,o=this._canvas;i[e]=i[e]!==o[e]&&a(i[e]-o[e])=t&&i.top<=e&&i.bottom>=e)return o[n].clipRect;return{id:null}},show:function(t){var e=t.point,n=e.getCrosshairData(t.x,t.y),i=e.getPointRadius(),o=this._horizontal,r=this._vertical,a=i?i+3:0,s=this._canvas,l=u(n.x),c=u(n.y);l>=s.left&&l<=s.right&&c>=s.top&&c<=s.bottom?(this._crosshairGroup.attr({visibility:"visible"}),this._resetLinesCanvas(),this._circle.attr({cx:l,cy:c,r:a,"clip-path":this._getClipRectForPane(l,c).id}),o.lines&&(this._updateText(n.yValue,n.axis,o.labels,e,d(l,c,!0,s)),this._updateLines(o.lines,l,c,a,!0),this._horizontalGroup.attr({translateY:c-s.top})),r.lines&&(this._updateText(n.xValue,n.axis,r.labels,e,d(l,c,!1,s)),this._updateLines(r.lines,l,c,a,!1),this._verticalGroup.attr({translateX:l-s.left}))):this.hide()}},e.Crosshair=h},function(t,e,n){"use strict";t.exports=n(765),t.exports.default=t.exports},function(t,e,n){"use strict";var i=n(3),o=n(6),r=n(33),a=n(0).extend,s=n(117),l=n(12),u=n(18),c=n(8),d=n(62),h=n(142),f=n(102),p=n(223),m=n(25),g="dx-colorview-palette-gradient",_="dx-colorview-palette-gradient-white",v="dx-colorview-palette-gradient-black",y="dx-colorview-color-preview",b="dx-colorview-color-preview-color-current",w="dx-colorview-color-preview-color-new",x=d.inherit({_supportedKeys:function(){var t=this.option("rtlEnabled"),e=this,n=function(t){var n=100/e._paletteWidth;return t.shiftKey&&(n*=e.option("keyStep")),n=n>1?n:1,Math.round(n)},i=function(t){var n=e._currentColor.hsv.s+t;n>100?n=100:n<0&&(n=0),e._currentColor.hsv.s=n,l()},o=function(t){var n=100/e._paletteHeight;return t.shiftKey&&(n*=e.option("keyStep")),n=n>1?n:1,Math.round(n)},s=function(t){var n=e._currentColor.hsv.v+t;n>100?n=100:n<0&&(n=0),e._currentColor.hsv.v=n,l()};function l(){e._placePaletteHandle(),e._updateColorFromHsv(e._currentColor.hsv.h,e._currentColor.hsv.s,e._currentColor.hsv.v)}var u=function(t){var n=360/(e._hueScaleWrapperHeight-e._hueScaleHandleHeight);return t.shiftKey&&(n*=e.option("keyStep")),n=n>1?n:1},c=function(t){e._currentColor.hsv.h+=t,e._placeHueScaleHandle();var n=r.locate(e._$hueScaleHandle);e._updateColorHue(n.top+e._hueScaleHandleHeight/2)},d=function(n){var i=1/e._alphaChannelScaleWorkWidth;return n.shiftKey&&(i*=e.option("keyStep")),i=i>.01?i:.01,i=t?-i:i},h=function(t){e._currentColor.a+=t,e._placeAlphaChannelHandle();var n=r.locate(e._$alphaChannelHandle);e._calculateColorTransparencyByScaleWidth(n.left+e._alphaChannelHandleWidth/2)};return a(this.callBase(),{upArrow:function(t){t.preventDefault(),t.stopPropagation(),t.ctrlKey?this._currentColor.hsv.h<=360&&!this._isTopColorHue&&c(u(t)):this._currentColor.hsv.v<100&&s(o(t))},downArrow:function(t){t.preventDefault(),t.stopPropagation(),t.ctrlKey?this._currentColor.hsv.h>=0&&(this._isTopColorHue&&(this._currentColor.hsv.h=360),c(-u(t))):this._currentColor.hsv.v>0&&s(-o(t))},rightArrow:function(e){e.preventDefault(),e.stopPropagation(),e.ctrlKey?(t?this._currentColor.a<1:this._currentColor.a>0&&this.option("editAlphaChannel"))&&h(-d(e)):this._currentColor.hsv.s<100&&i(n(e))},leftArrow:function(e){e.preventDefault(),e.stopPropagation(),e.ctrlKey?(t?this._currentColor.a>0:this._currentColor.a<1&&this.option("editAlphaChannel"))&&h(d(e)):this._currentColor.hsv.s>0&&i(-n(e))},enter:function(t){this._fireEnterKeyPressed(t)}})},_getDefaultOptions:function(){return a(this.callBase(),{value:null,matchValue:null,onEnterKeyPressed:void 0,editAlphaChannel:!1,keyStep:1,stylingMode:void 0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return"desktop"===u.real().deviceType&&!u.isSimulator()},options:{focusStateEnabled:!0}}])},_init:function(){this.callBase(),this._initColorAndOpacity(),this._initEnterKeyPressedAction()},_initEnterKeyPressedAction:function(){this._onEnterKeyPressedAction=this._createActionByOption("onEnterKeyPressed")},_fireEnterKeyPressed:function(t){this._onEnterKeyPressedAction&&this._onEnterKeyPressedAction({event:t})},_initColorAndOpacity:function(){this._setCurrentColor(this.option("value"))},_setCurrentColor:function(t){var e=new s(t=t||"#000000");e.colorIsInvalid?this.option("value",this._currentColor.baseColor):this._currentColor&&this._makeRgba(this._currentColor)===this._makeRgba(e)||(this._currentColor=e,this._$currentColor&&this._makeTransparentBackground(this._$currentColor,e))},_setBaseColor:function(t){var e=new s(t||"#000000");e.colorIsInvalid||this._makeRgba(this.option("matchValue")!==this._makeRgba(e))&&this._$baseColor&&this._makeTransparentBackground(this._$baseColor,e)},_initMarkup:function(){this.callBase(),this.$element().addClass("dx-colorview"),this._renderColorPickerContainer()},_render:function(){this.callBase(),this._renderPalette(),this._renderHueScale(),this._renderControlsContainer(),this._renderControls(),this._renderAlphaChannelElements()},_makeTransparentBackground:function(t,e){e instanceof s||(e=new s(e)),t.css("backgroundColor",this._makeRgba(e))},_makeRgba:function(t){return t instanceof s||(t=new s(t)),"rgba("+[t.r,t.g,t.b,t.a].join(", ")+")"},_renderValue:function(){this.callBase(this.option("editAlphaChannel")?this._makeRgba(this._currentColor):this.option("value"))},_renderColorPickerContainer:function(){var t=this.$element();this._$colorPickerContainer=i("
").addClass("dx-colorview-container").appendTo(t),this._renderHtmlRows()},_renderHtmlRows:function(t){var e=this._$colorPickerContainer.find(".dx-colorview-container-row"),n=e.length,o=n-(this.option("editAlphaChannel")?2:1);if(o>0&&e.eq(-1).remove(),o<0){o=Math.abs(o);var r,a=[];for(r=0;r").addClass("dx-colorview-container-row"));if(n)for(r=0;r").addClass("dx-colorview-container-cell").addClass(n).appendTo(e.find(".dx-colorview-container-row").eq(t))},_renderPalette:function(){var t=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer,"dx-colorview-palette-cell"),e=i("
").addClass([g,_].join(" ")),n=i("
").addClass([g,v].join(" "));this._$palette=i("
").addClass("dx-colorview-palette").css("backgroundColor",this._currentColor.getPureColor().toHex()).appendTo(t),this._paletteHeight=this._$palette.height(),this._paletteWidth=this._$palette.width(),this._renderPaletteHandle(),this._$palette.append([e,n])},_renderPaletteHandle:function(){this._$paletteHandle=i("
").addClass("dx-colorview-palette-handle").appendTo(this._$palette),this._createComponent(this._$paletteHandle,p,{contentTemplate:null,boundary:this._$palette,allowMoveByClick:!0,boundOffset:function(){return-this._paletteHandleHeight/2}.bind(this),onDragMove:function(){var t=r.locate(this._$paletteHandle);this._updateByDrag=!0,this._updateColorFromHsv(this._currentColor.hsv.h,this._calculateColorSaturation(t),this._calculateColorValue(t))}.bind(this)}),this._paletteHandleWidth=this._$paletteHandle.width(),this._paletteHandleHeight=this._$paletteHandle.height(),this._placePaletteHandle()},_placePaletteHandle:function(){r.move(this._$paletteHandle,{left:Math.round(this._paletteWidth*this._currentColor.hsv.s/100-this._paletteHandleWidth/2),top:Math.round(this._paletteHeight-this._paletteHeight*this._currentColor.hsv.v/100-this._paletteHandleHeight/2)})},_calculateColorValue:function(t){var e=Math.floor(t.top+this._paletteHandleHeight/2);return 100-Math.round(100*e/this._paletteHeight)},_calculateColorSaturation:function(t){var e=Math.floor(t.left+this._paletteHandleWidth/2);return Math.round(100*e/this._paletteWidth)},_updateColorFromHsv:function(t,e,n){var i=this._currentColor.a;this._currentColor=new s("hsv("+[t,e,n].join(",")+")"),this._currentColor.a=i,this._updateColorParamsAndColorPreview(),this.applyColor()},_renderHueScale:function(){var t=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer,"dx-colorview-hue-scale-cell");this._$hueScaleWrapper=i("
").addClass("dx-colorview-hue-scale-wrapper").appendTo(t),this._$hueScale=i("
").addClass("dx-colorview-hue-scale").appendTo(this._$hueScaleWrapper),this._hueScaleHeight=this._$hueScale.height(),this._hueScaleWrapperHeight=this._$hueScaleWrapper.outerHeight(),this._renderHueScaleHandle()},_renderHueScaleHandle:function(){this._$hueScaleHandle=i("
").addClass("dx-colorview-hue-scale-handle").appendTo(this._$hueScaleWrapper),this._createComponent(this._$hueScaleHandle,p,{contentTemplate:null,boundary:this._$hueScaleWrapper,allowMoveByClick:!0,dragDirection:"vertical",onDragMove:function(){this._updateByDrag=!0,this._updateColorHue(r.locate(this._$hueScaleHandle).top+this._hueScaleHandleHeight/2)}.bind(this)}),this._hueScaleHandleHeight=this._$hueScaleHandle.height(),this._placeHueScaleHandle()},_placeHueScaleHandle:function(){var t=this._hueScaleWrapperHeight,e=this._hueScaleHandleHeight,n=(t-e)*(360-this._currentColor.hsv.h)/360;t=360&&(this._isTopColorHue=!0,e=0),this._updateColorFromHsv(e,n,i),this._$palette.css("backgroundColor",this._currentColor.getPureColor().toHex())},_renderControlsContainer:function(){var t=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer);this._$controlsContainer=i("
").addClass("dx-colorview-controls-container").appendTo(t)},_renderControls:function(){this._renderColorsPreview(),this._renderRgbInputs(),this._renderHexInput()},_renderColorsPreview:function(){var t=i("
").addClass("dx-colorview-color-preview-container").appendTo(this._$controlsContainer),e=i("
").addClass("dx-colorview-color-preview-container-inner").appendTo(t);this._$currentColor=i("
").addClass([y,w].join(" ")),this._$baseColor=i("
").addClass([y,b].join(" ")),this._makeTransparentBackground(this._$baseColor,this.option("matchValue")),this._makeTransparentBackground(this._$currentColor,this._currentColor),e.append([this._$baseColor,this._$currentColor])},_renderAlphaChannelElements:function(){this.option("editAlphaChannel")&&(this._$colorPickerContainer.find(".dx-colorview-container-row").eq(1).addClass("dx-colorview-alpha-channel-row"),this._renderAlphaChannelScale(),this._renderAlphaChannelInput())},_renderRgbInputs:function(){this._rgbInputsWithLabels=[this._renderEditorWithLabel({editorType:h,value:this._currentColor.r,onValueChanged:this._updateColor.bind(this,!1),labelText:"R",labelAriaText:l.format("dxColorView-ariaRed"),labelClass:"dx-colorview-label-red"}),this._renderEditorWithLabel({editorType:h,value:this._currentColor.g,onValueChanged:this._updateColor.bind(this,!1),labelText:"G",labelAriaText:l.format("dxColorView-ariaGreen"),labelClass:"dx-colorview-label-green"}),this._renderEditorWithLabel({editorType:h,value:this._currentColor.b,onValueChanged:this._updateColor.bind(this,!1),labelText:"B",labelAriaText:l.format("dxColorView-ariaBlue"),labelClass:"dx-colorview-label-blue"})],this._$controlsContainer.append(this._rgbInputsWithLabels),this._rgbInputs=[this._rgbInputsWithLabels[0].find(".dx-numberbox").dxNumberBox("instance"),this._rgbInputsWithLabels[1].find(".dx-numberbox").dxNumberBox("instance"),this._rgbInputsWithLabels[2].find(".dx-numberbox").dxNumberBox("instance")]},_renderEditorWithLabel:function(t){var e=this,n=i("
"),r=i("